MouseEvents, page navigation

Hello

I want to create 2 buttons and 2 pages (in the future, it must be able to change to 3 or 4 or etc...).

If I click on button1 I see page 1, if I click button2 I see page2.

I have a queestion.

1. Please look at the button in the Flash IDE. There, I created dymanic label field. And now he look like when I change this label I'll see the same text on my 2 buttons. How can I make just a button and a label on flash IDE library and writing .as for button1 Text1 and Text2 for button2?


2. open the .swf and the button for the thumb. When I have more mouse on the text, I don't see thumb. Just when I'm apart of the label and still stand on the sidelines, I can see thumb... So what's the problem?

3. How can I optimize the code? Because everything now seems the same names of button just changing for example.

Code:

package 
{
     import flash.display.MovieClip;
     import flash.events.MouseEvent;
     
     import fl.transitions.Tween;
     import fl.transitions.easing.*;     

     public class  Pages extends MovieClip
     {
          //constructor
          public function Pages()
          {
               mainMenu();
          }
          
          public function mainMenu():void
          {
               homeBtn.buttonMode = true;
               homeBtn.addEventListener(MouseEvent.CLICK, homeBtnEvent);
               homeBtn.addEventListener(MouseEvent.MOUSE_UP, homeBtnUp);
               homeBtn.addEventListener(MouseEvent.MOUSE_OVER, homeBtnOver);
               homeBtn.addEventListener(MouseEvent.MOUSE_OUT, homeBtnOut);               
               //homeBtn.homeLabel.text = "HOME";
               
               aboutBtn.buttonMode = true;
               aboutBtn.addEventListener(MouseEvent.CLICK, aboutBtnEvent);
               aboutBtn.addEventListener(MouseEvent.MOUSE_UP, aboutBtnUp);
               aboutBtn.addEventListener(MouseEvent.MOUSE_OVER, aboutBtnOver);
               aboutBtn.addEventListener(MouseEvent.MOUSE_OUT, aboutBtnOut);               
               //aboutBtn.homeLabel.text = "ABOUT";
          }
          
          
          
          public function homeBtnEvent(event:MouseEvent):void
          {
               trace("home button clicked");
               gotoAndStop('p1');
               var homePage:Tween = new Tween(homePage_mc, "x", Elastic.easeOut, -200, 19, 2, true);
          }
          public function homeBtnUp(event:MouseEvent):void
          {
               homeBtn.gotoAndPlay('up');
          }
          public function homeBtnOver(event:MouseEvent):void
          {
               homeBtn.gotoAndPlay('over');
          }
          public function homeBtnOut(event:MouseEvent):void
          {
               homeBtn.gotoAndPlay('out');
          }
          
          
          
          public function aboutBtnEvent(event:MouseEvent):void
          {
               trace("about button clicked");
               gotoAndStop('p2');
               var aboutPage:Tween = new Tween(aboutPage_mc, "x", Elastic.easeOut, -200, 19, 2, true);
          }
          public function aboutBtnUp(event:MouseEvent):void
          {
               aboutBtn.gotoAndPlay('up');
          }
          public function aboutBtnOver(event:MouseEvent):void
          {
               aboutBtn.gotoAndPlay('over');
          }
          public function aboutBtnOut(event:MouseEvent):void
          {
               aboutBtn.gotoAndPlay('out');
          }
     }     
}

I can attach an example. But see not the button attach: (help please?

Is your button, a component, or a clip? If you change the text of a single instance, in the IDE, the text of the other instance of the same object is modified. In code, you can set the text independently.

For the hand cursor work on the text, you must disable the mouse for that: homeBtn.homeLabel.mouseEnabled = false;

You can use event.currentTarget to get the target of event - so you must separate the functions for everything. So instead of saying homeBtnOut just do btnOut:

private void btnOut(e:MouseEvent):void

{

e.currentTarget.gotoAndPlay ("out");

}

And really, these functions should be private, not public, since they are called from inside the class only.

Tags: Adobe Animate

Similar Questions

  • NoScript 2.1.0.2 causes double hearder more loss of page navigation arrows

    Noscript 2.1.0.2 installation caused a page header double (blue lines with minimize/maximize/output double, X) with a Firefox button and the loss of the page navigation arrows.

    Disabling Noscript corrects the situation.

    XP service pack 3 and Forefox 4.0 version

    http://forums.InformAction.com/viewforum.php?f=3

  • JavaScript doesn't work is not on the page navigation

    Hello

    I have a manual tabular presentation on the emp table. There is a javascript function that calls for the deptno column change. If deptno is RESEARCH (20), then it turns off the field for this employee hiring date.


    The same function is called on page load using the threshold:

    $("[name=f04]').change ();


    It works fine when the page is loaded for the first time. When I navigate to see the next set of rows (for example, 16 to 30) then the javascript code does not work.


    An example can be seen on apex.oralce.com:

    https://Apex.Oracle.com/pls/Apex/f?p=30264:28


    Workspace: apex2014

    Username: forum

    Password: abc123

    Application: 30264 Dev2

    Page: 28

    Can someone explain why it behaves like this?

    Thank you

    ZKay wrote:

    I have a manual tabular presentation on the emp table. There is a javascript function that calls for the deptno column change. If deptno is RESEARCH (20), then it turns off the field for this employee hiring date.


    The same function is called on page load using the threshold:

    $("[name=f04]').change ();


    It works fine when the page is loaded for the first time. When I navigate to see the next set of rows (for example, 16 to 30) then the javascript code does not work.

    Can someone explain why it behaves like this?

    This occurs because the function is called only once the page loads, and therefore affects only the lines that existed when the page is initially rendered. Page navigation performs a partial page of AJAX (PPR) refresh that completely replaces a set of lines of form (including their properties dynamically applied) with a new series with different properties. It is necessary to apply the function whenever a new set of lines is displayed. The best way to proceed is to call the function using an dynamic after Refresh with a dynamic range action:

    Event: After refresh

    Selection type: Region

    Region:

    Action: Run the JavaScript Code

    Scope of the event: Dynamics

    Fire on Page load: Yes

    Code:$('[name=f04]').change();

    Note that rows 13 & 18 in your function cause errors of execution. As I do not understand the purpose of these that I commented on them in order to demonstrate the dynamic action solution:

    function test2(pThis){  // orpheus4192
      var v_item_value = pThis.value;
      var v_hiredate_item = $(pThis).closest('tr').find('td[headers=HIREDATE] input[name=f05]');
      var v_hiredate_button = $(pThis).closest('tr').find('td[headers=HIREDATE] button');
      var currIndex = $('select[name="'+pThis.name+'"]').index(pThis);
      var currRow  = currIndex+1;
    
        //alert(pThis.name);
      if ( v_item_value == '20' ){
          v_hiredate_item.prop('readOnly',true);
          v_hiredate_button.prop('disabled',true);
    
          //document.getElementById("f08_"+[currRow]).disabled=true;
      }
      else{
          v_hiredate_item.prop('readOnly',false);
          v_hiredate_button.prop('disabled',false);
          //document.getElementById("f08_"+[currRow]).disabled=false;
      }
    }
    

    Things are not helped by the mixture of techniques here. The code would be easier to understand and maintain if a coherent approach was followed. It is recommended to always use jQuery to select and manipulate items, then select the items of dynamically across the table from the declarative mode headers attributes, rather than trying to understand the absolute values of ID from the control of the name and line numbers. It's much more intuitive, generally requires less code and is waterproof later insertions and changes in the order of the columns. Potential problems are only the changes to the control type or the column alias (because the latter is generally required in the selector), but these changes are likely to occur less frequently.

    Do not forget that to get the headers consistent and understandable static ID selectors must be applied manually to the IR columns in APEX 5.0...

  • passing the parameter through links page (navigation)

    Hello

    suggest me the way to pass the parameter through links in the page navigation.

    I tried it in EL, I'm not able to get on the page.

    is it a right approach or any other.

    Thank you

    A

    After showing the steps in the similar thread, I found this thread then re-post here.

    Pass the connection parameter to connected in portal Builder page


    Here are the steps to pass the parameter in a URL to another page:

    OR

    Sign in to your personalized Portal (say MyPortal1)

    http://127.0.0.1:8888 / webcenter/Portal/MyPortal1

    Click the settings (e.g. Pages & portals Actions)-> manage-> all settings

    It will take you to the page view of all of the current portal (i.e. MyPortal1).

    Then click attributes in the left pane, and you can create/edit/delete the custom attributes for the current portal on the right side.

    • Click Add an attribute and specify the following information:

    Attribute name = myvar

    This is the attribute that we will refer to any page using the EL "MyVar".

    Attribute value = #{param.myvarval}

    "Myvarval" is the name of the query parameter (i.e. suffix query param & myvarval = TestSuccess will be passed as part of the URL later)

    • Now, create a new page "TestPage" and add the element of HTML markup on the page using the composer.
    • In the Properties window, change the HTML markup element.

    Replace the existing value

    #{componentExtensionBundle.OUTPUT_TEXT_TEXT}

    with

    #{spaceContext.currentSpace.metadata.customAttributes ['myvar']}

    • Click apply and then click OK to close the pop-up window.
    • Click on save and view Portal


    • CHECK: Replace/change the URL the following OR open in a new tab in the browser

    Http://127.0.0.1:8888 / webcenter, portal, MyPortal1, TestPage ? myvarval = TestSuccess

    and you will see "TestSuccess' message in the"TestPage"rendered using the HTML markup component.

    This confirms passing the parameter to a page URL works as expected.

    Now, to add a link to the "TestPage" passing a parameter in the URL of the page in another page (Home Page say).

    • Now goto homepage, correct it in composer and add the hyperlink element. Click change to set the hyperlink in the Properties window.
    1. Set the title to display (i.e. the value of the title TestPage)
    2. Set the Destination URL by clicking on the search icon and choose "TestPage".

    Destination is defined with values that resembles

    /faces/Oracle/WebCenter/page/scopedMD/sf5926dd1_9e6a_45ab_a99c_d79fabb362c0/Page1.JSPX

    Add a suffix '& myvarval = TestWorks' to him.

    • Click apply & OK.
    • Click on save and view Portal
    • CHECK: Since your home portal or the home page, click on the link "TestPage" which brings you to the TestPage and you will see "TestWorks' message in the"TestPage"rendered using the HTML markup component.

    I hope it helps.

    References:

    How to pass a parameter of argument the query URL to a parameter input workflow? (Doc ID 1545808.1)

    https://mosemp.us.Oracle.com/epmos/faces/DocumentDisplay?ID=1545808.1

    Works with the global attributes in portals

    http://docs.Oracle.com/CD/E29542_01/WebCenter.1111/e27738/wcadm_ps_attrib.htm#WCADM11701

  • Popup before the page navigation

    Hello.

    I'm showing a popup before I have a navigation page. The popup is designed as a loading screen with and animated GIF.

    There is a button on the screen, when you click on it it should show the popup and then make navigation. (If the window is displayed until the next load of the page, the navigation link in the taskflow bacuse calls several methods between the two screens)

    First tried to use the ShowPopupBehaviour, which I discovered was not possible because he cancel the action of the button when encountered.

    Then I tried to do a program like this:

    public String cb1_action() {}
    FacesContext context = FacesContext.getCurrentInstance ();

    PopupUtil.invokePopup (p1.getClientId (context)); same as popup.show (hints)


    context.getApplication () .getNavigationHandler () .handleNavigation (null, "next_method_in_taskflow", context);

    Returns a null value.
    }

    However, it does not, since the popup is not showed.

    The question is, how to display the pop-up window before the page navigation is performed.

    TIA

    TIA, please tell us your jdev version.

    Your use case is best done using the #027 examples (http://www.oracle.com/technetwork/developer-tools/adf/learnmore/27-long-running-queries-169166.pdf) of http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html

    Timo

  • Urgent Page Navigation display the naming of files like 03_02.JPG

    Hi all

    I got the PDF of my client, he do some stuff in the display of pdf file name in the page navigation bar, how they made this view, please find below for your referecne snapshots.

    1 see the pag navigation tab shownin the 03_00C0.jpg next to the (1/54), it's the 1st page.

    Picture 2.png

    2. This page also showed the name of the file in the navigation page tab this page is 2nd 03_01.jpg actual page is (2/54)

    Picture 3.png

    Please help me how to do this and get the same view of the navigation tab of page mentioning the name of file as photos.1jpg or 05 - 115.tiff.

    I have more jpg file 200 how do like that. Please help it is very urgent. I can't ask my client.

    The system configuration:

    I use Acrobat 9 Pro Mac OS 10.5.6.

    THX

    csm_phil

    It may not be easy, but you must use the dialog box Page numbers by right clicking on the page in the thumbnails of Pages and enter the name of the file as the page number like this

  • States in Flex and Page Navigation

    I have a doubt regarding the page navigation in flex. How to navigate from one page to the other for example on the presentation of a flex form? If the States are used so not the entire application will be a file single mxmxl?

    Please help me

    Hi there, you can use viewstacks instead of viewstates or any other navigator container, and divide you app as files as much as you want you can read more about this here:


    http://livedocs.Adobe.com/Flex/3/HTML/modular_1.html

  • Page navigation does not not having activated the ADF security

    Hi all

    I am facing a strange problem. I have 3 pages namely Login.jspx,.jspx Upload and summary.jspx. Untied task flow (adfc-config. (XML), I created the navigation as Login-> Upload-> summary. There is also a back navigation to download-> login page. The user enters the user id and password on the login screen and click on the "submit" button. If the credentials are correct then control flows to the download page. On page load user selects an excel file and click on the download button and the control moves to the summary screen. There is a button more called out on the download screen, which directs the user to the login screen. The navigation works perfectly well if ADF security is disabled. The time where security is enabled, the navigation fails. I used below link to implement security where it is created a java class to manage the authentication of users and move to the next page. On activation of security, I am only able to navigate from screen to connect to the loading screen. After the failure of this navigation. He won't go to the summary page, or it goes back to the login page. Just on the loading screen. Please let me know how to solve this problem. Jdeveloper version is 12.1.3.0

    http://docs.Oracle.com/CD/E15523_01/Web.1111/b31974/adding_security.htm#ADFFD877

    Thank you

    V

    Problem solved. In the java file authentication, I had put under instruction to navigate to the Page of Upload

    LoginUrl = string ' / adfAuthentication? success_url = / faces/Upload.jspx«;»

    I found below old son that says to remove .jspx of the URL and it worked.

    Unbounded task flow works is not in standalone Weblogic Server

    Navigation of the page using adf-config does not

    Correct statement is

    LoginUrl = string ' / adfAuthentication? "success_url = / faces/Upload ';

    Thank you

    V

  • Prevent validation when the page navigation

    I use Jdev 11.1.1.7.0.

    I have a jspx page that has an empty form.

    But when I want to leave the page without entering anything, I get the form validation error messages.

    How can I prevent the validation error without worrying if the form has input values?

    Set the immediate property of the component of the navigation (link... button) to 'true '.

    Timo

  • Page navigation for forum?

    Seems only a page of messages, where is the navigation for others? No navigation at the foot of page 1.

    osgood_ (NOT of M Guérard)

    My favorite is currently on the main page general summary. Looks like that Osgood is correct: there is a list of topics and not the option to navigate to older subjects beyond those illustrated. However, if I click on the tab CONTENT in the upper part, it takes me to a new page where I post all content (either shown as pictures or details), to move to previous pages or search in 98 K nets almost by various delimiters.

    BTW... I don't see too, which made the most recent post response. And it remains to be seen if this iteration will actually save my connection so I not whenever I want to react.

    Chris

  • A Folio HTML Page - navigation and analytics?

    Hey there.

    I need some advice. My company is planning to do a folio, but everything is done in HTML. Thus, it would be essentially one page website with several 'items '. The navigation would be done in HTML.

    If we did it:

    (1) would we be able to tap into the native navigation (when you tap on the screen and the nav up & down happens - you can rub through articles or jump to a specific article)

    (2) could we have the folio shoot all the same analytics that we would have if we built the regular way to DPS.

    1. as far as I know, typing on a web space does not bring to the top of the navigation bar. I'll leave that to someone else to answer

    2. with the Site Catlyst Analytics(JavaScript API) Yes, its possible to capture all the Analytics individual tabs/HTML. The default analytics would be only web content

  • Using the page curl but not effect page navigation icons

    I want to create an online magazine where the page curl is available.

    It works very well.

    I also want to add navigation to page down icons so that users can edit pages.

    The problem is that page icons are part of the effect of curvature of page.

    Is it possible to use the hemmed page and do not make the icons on page?

    You mean like this:

    http://www.edocker.com/_demo/edocker-online-demo/index.html

    I m afraid can´t you place your navigation out of the page using InDesign area only. I think it was possible in InDesign CS4 but changed when CS5 is out.

    With CS5 or CS5.5 you only option is to use solutions like eDocker third 3rd...

  • Problem with Page Navigation TaskFlow

    There, hell
    using Jdev 11.1.1.3.0, I created a task flow with no page fragment, defined two pages, a case of control flow (success) is used to navigate a page 'page A' page to the other "B"
    the button on the page that has an ActionListener to a method defined in the java bean and his 'property' Action is set on the case of control flow defined in the TaskFlow 'Please note that it is displayed in the action list',

    but after that the process, executed in the page it navigates to the page.
    without exception no errors only triggered.

    However, if I added this page to the face-config, completed successfully navigation.

    What could be the reason, what are the TaskFlow properties must I together, where can I get the reason.

    all advice please

    Thanks in advance.

    Check the URL that you use to launch the application on the server. There a ".jspx' at the end?
    If so remove this outcome, otherwise you just call the page but do not start the workflow (and can not navigate).

    Timo

  • Page navigation 'swipe' may be lost?

    We recently published a children's book with the suite Adobe DPS. We have received excellent feedback for most, but many professional reviewers app had several usability issues with the platform, specifically the menu system and the sensitivity to slide from side to side to go through the pages.

    They were kind enough to not give us a review at all, because it would have been negative from their point of view.

    They said that if we were to solve these technical problems, they would give us an excellent review.

    After spending a lot of money on the effort, critical of sites pro as 148 apps are essential in the manufacture of the apps and the magazines a commercial success.

    So, my questions to Adobe (some of these repetitions of the pre-release of last year program)

    • Transformable navigation, allowing the developer to control the navigation in a .folio?
    • The way the menu system is called can be changed? A few ideas:
      • Press and hold to call up the menu
      • Double tap to call up the menu
      • book an area (upper-left, for example) to call the menu
      • It is anything but simple tap, since IMO the gesture should be reserved for interactive elements, not basic navigation.

    The answer is no to all of this. You can put an invisible button on top of everything, remove the single tap for the menu but other than that, it is what it is.

    Bob

  • Apex Page navigation

    We have several means of navigation to get to the same page. Let's say Page 5 which is a visible page and can navigate to other pages that could, potentially, navigate back to the same Page 5 with different information about this... All our pages that allow entry have cancel that goes to the previous page in a P #_PAGEGO field on the page, he came and a branch that returns to the P #_PAGEGO after the page has been sent. The problem is that we can enter a cyclic with P adjustment model #_PAGEGO P #_PAGEGO only stores a single value and if the same page (IE Page 5) is obtained by different pages (as in the first sample path 5 from the Page was first of all of the Page 3 Page 4 and later versions), return simply navigate us through the page 3 and Page 5 in the end AND we want the user to one click back to the Page 6 or Page 7 (user will probably need to use it much)

    Here are a few sample tracks
    Page 1 (home) - > 2 (Interactive Report)-> in Page Page 3 (entry)-> Page 4 (entry)-> Page 5 (view only) -> Page 3 (entry [different information))-> * Page 5 (display only) * [NOTE: P5_PAGEGO has only Page 3, Page 3 Page 5]

    Page 1 (home)-> Page 6 (dashboard)-> Page 5 (view only) ->... [You can return to the page 5 times]

    Page 1 (home)-> Page 7 (HTML Page with information sorted for the user) - Page 5 (display only) >->

    Page 1 (home)-> Page 7 (HTML Page with information sorted for the user)-> Page - > 3 (Entry)... [You can return to the page 5]

    Page 1 (home)-> Page 7 (HTML Page with information sorted for the user)-> Page - > 4 (Entry)... [You can return to the page 5]


    Our path breadcrumbs Page 1 (home)-> 2 (Interactive Report)-> Page 3 Page (entry)-> Page 4 (entry)-> Page 5 (view only) missing Page 6 and 7 Page since it is a path to the site map


    We thought of several solutions but do not know if one is feasible...

    (1) page 5 have a Javascript Button with onclick = "javascript:History.back()"; " -> This will help alleviate the problem, but we were told to never use the back button of the browser in the Apex.

    (2) to have a second round of bread crumbs on the Page (just the Page 5)...-> not as ideal, but bread could allow the user to one click to pages not on our initial list of the navigation bar. Original breadcrumb is on Page 0 and we do not know how to add a new set of bread crumbs just to the Page 5.

    (3) dynamically change bread crumbs? -> Can be a lot of work, probably not really the penalty effort and solving problems, not sure if this could easily be done at the Apex.


    Suggestions or comments on possible solutions...

    I did the test and created a branch of type 'Branch to the Page identified by the (name of the use element) element' and it works with a point of application. There is the name of the item that is entered as APP_ITEM without and commercial and a point at the end. Thus, it definitelly works as I have suggested. See here:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:1

    Button: go to the previeous page

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

Maybe you are looking for

  • Cannot remove ps4ux Hijack of Chrome

    Anyone has been able to remove this from Chrome? He re-lance of Web sites and appear randomly. I tried Avira and Malware bytes, but they did not remove it.

  • question on storage

    HP Slate 2800 7 8 GBSerial number [edited by Moderator]No. E0H92AA #UUFI have a problem of internal storage, after that it's been fixed in the center of HP service because of the display of garbage. 8 GB, now it's up to 1 GB. I brought it here (servi

  • Windows 7 does not connect to the internet after the clean install

    I did a clean install on my Windows 7 computer, but means doing so my computer not connect to internet more that connection drivers were lost. I'm going back between Web sites up-to-date, but without success. I someone could direct me to the link wit

  • My clean install of windows 7 used 44GB twice what Microsoft postpones is necessary.

    I installed windows 7 ultimate on a new (never used) 120 gig OCZ vertex SSD. Installing windows 7 a 44 GB before anything else was installed. This seems to be twice the told microsoft that it requires space. Why has my new installation of windows 7 u

  • version 2 Hyperion on 1 Server

    Hi Experts,My client wants to know if we could install 2 versions of hyperion (2.3 and 2.4) on a linux VM and they must run at the same time.Given the ports will be reassigned differently. I have no problem to do.Thank youConcerning