Back button in AS3

I did a search on this and didn't find a successful answer
yet. I need to have a back button in AS3 that'll remember the last
frame visited from any frame in the site. There are various buttons
to get to various frames, and the one back button will always be
showing.
What's the script to make that happen from any frame
utilizing AS3?

OK, syntax was wrong and I fixed that (I knew it had to be
some silly error like that).
So now, if I go to one of the pages (frames), then go back to
the home page (home frame), and click the back button it works to
take you back to whatever subpage you were just on. However, it
only works from the home page to go back to a subpage. You can't
use the back button to go from one subpage to another you were just
on, or back to the home page again. Why would that be? Is there a
way to make the back button work from anywhere?
Also, it only works if I don't assign the home page a
backvalue (probably why you can't go "back" to the home page). But,
since it works to go back from there to any other page you were
just on, I think it must be close to working across the
board… just curious what the problem could be…
help??

Similar Messages

  • Enable Browser Back Button in AS3.0 with Flash

    Hi All,
    Is there any way in actionscript 3.0 to enable Browser Back
    Button in flash website.
    Thanks
    Shane

    The best way I know of to do that is using swfaddress:
    http://www.asual.com/swfaddress/

  • How to make a back button using AS3

    I'm trying to do my first project using ActionScript in CS4. I need to make a back button that will take the user back to the last "slide" they were on.
    I went through the effort of creating a back button that I only realized didn't work after I was finished. I had it set up to just go to the previous slide and totally ignored the fact that there are several branching scenarios.

    I'm more or less having to teach myself at this point. Where should I go to learn about using an array?

  • SCENES BACK BUTTON

    I did a search on this and didn't find a successful answer yet.
    I need to have a back button in AS3 that'll remember the last SCENE visited from any frame in the site. There are various buttons to get to various SCENES, and the one back button will always be showing.
    What's the script to make that happen from any frame utilizing AS3?

    you should execute the following once:
    var sceneA:Array = [];
    function addSceneF(scene:Scene):void{
        sceneA.push(scene);
    function prevSceneF():void{
        sceneA.pop();
        this.gotoAndStop(1,sceneA.pop().name);
    // then on frame 1 of each scene use:
    addSceneF(this.currentScene);
    and have your previous scene button call prevSceneF whenever you want to return to a previously visited scene.
    (and you should do some error checking to make sure sceneA.length >0 before applying that goto.)

  • Enabling Back Button behavior in browser?

    How can I allow the back button in a browser to function like
    a .html
    page in a .SWF?
    Thanks in advance.

    dzedward wrote:
    >
    http://www.asual.com/swfaddress/
    Thanks for the link. Out of curiosity, is this using a level
    of AS3 that
    would be way too advanced for a beginner to even consider?

  • Forward / back buttons jump one slide

    Hello. I have a problem.
    When i use specific skin (designed by someone else), and when I publish / preview the presentation and I press the Forward button on the playbar, the presentation doesn't go on the next slide, but on the slide after next.
    Example, if I am on 3rd slide and press forward, the presentation will jump on 5th slide, if I press forward again it goes on 7th slide, if on 7th slide I press the back button it goes on 5th and it also marks as read the slides in between (slide 4 and 6 in this examples). If i let the presentation to flow normally and don't press buttons everything is ok.
    Sometimes it happens the button to work normally, but not very often which is a reason why I think its not because of the skin. I am using Captivate 6 for this
    Really don't have an idea what should be the problem. if i set another skin on the projext everything is OK, the problem is showing with one skin only...
    Did anyone know what would be the solution for this problem?
    Thanks in advance...

    If the problem is evident with one particular skin, then the person that created or modified this skin has done something to cause the issue.  You need to go back to THAT person and ask them to look into it.  If you have the FLA file that they used to generate the skin then perhaps another AS3 programmer could investigate the issue for you if the original developer is unavailable or unreachable.  But if you only have the SWF of the skin file, and the original developer cannot debug it for you, the only option you really have is to use a different skin that doesn't have the issue.

  • How do I use edge commons composition loader to load multiple compositions with a next and back button?

    I am working on an interactive book and have set up each page as a separate composition in edge.
    I am using  the edge commons JS library to load multiple compositions into a main composition.
    You can see how this works here: Edge Commons - Extension Library for Edge Animate and Edge Reflow | EdgeDocks.com
    The way the edge commons tutorial is set up requires a button for each composition i want to load. I am interested in loading multiple compositions with a "next" and "back" button, and a "swipe left, "swipe right" gesture on the content symbol that each composition is loaded into. I also need the swipe features on the content symbol not to interfere with the interactive elements on the loaded composition.
    Please suggest a solution that will work without adding additional scripts beyond edge commons and jquery.

    Sort of. I'm using this code inside an action for a button symbol. But it doesn't work perfectly. Trying to debug it.
    Let me know if you have any luck.
    //Check to see if pageCounter already exists
    if (typeof EC.pageCounter === 'undefined') {
      // it doesn't exist so initialize it to first page
        EC.pageCounter = 2;
    //check if the page is only 1 digit -- patch for single digit
    if (EC.pageCounter < 9) {
       // it is, so we need to pad a 0 on the front.
      EC.pageCounterString = "0" + EC.pageCounter;
      //e.g.  01 ...09,11,12,13....115,222352,,....
    else {
      EC.pageCounterString = EC.pageCounter;
    EC.loadComposition(EC.pageCounterString + "/publish/web/" + EC.pageCounterString + ".html", sym.$("container"));
    EC.pageCounter = EC.pageCounter + 1;
    //TODO for back  -1

  • Why do google search results reset to match the search bar terms when i use the back button?

    Since the update to FF 23, the list of Google search results clears and the on-page search box is reset to match the address bar search box when I hit the back button to re-view the results list after checking a result.
    To see this issue for yourself, set your search provider to Google and make sure Instant is on. Type a search term into the search bar and press enter. A google page appears with your results list. Now, change your search terms or conduct a new search directly from the google page (without using the FF search bar). Click on the first result in the search list, then click the back button to return to the search results so you can check a differest result. As FF goes back to the google page, it will reset the on-page search box to match the FF search bar (although you were no longer on this search) and all search results will disappear, replaced by the message "Press enter to search". Pressing enter reconducts your old search, not the one you were on.
    This is incredibly maddening since searching for something requires frequent use of the back button to check through the list of search results, and then frequently trying the search again with slightly different terms. Although it sounds like a Google issue, it did not occur on the old firefox and has me wanting to revert. I tried to revert to the old search function via the "keyword search" addon, but this did not fix my issue. Is there a way to force FF to go back to the actual google search page I was just on instead of conducting a new google search from the FF search box when I hit the back button?

    In Firefox 23 versions and later the keyword.URL pref is no longer supported and it is no longer possible to specify the search engine for the location bar via the keyword.URL pref.<br />
    The search engine that is used on the location bar and on the about:home page is the search engine that is selected in the search Bar on the Navigation Toolbar.<br />
    Current Firefox versions do not update the about:home home page until you refresh the page (future versions will do this automatically without a refresh) and that is what happens if you use the Back key.
    You can install the Keyword Search extension to specify with search engine to use for the location bar and which search engine to use for the about:home page via the Options/Preferences windows of this extension, accessible via the about:addons page.
    * Keyword Search: https://addons.mozilla.org/firefox/addon/keyword-search/

  • Browser back button not working with ADF Application integrated with SSO

    I have integrated an adf application with Oracle SSO Authentication. Application is running fine.
    Though, while navigating between pages, using browser back button , it is not redirecting the url properly
    Should Redirect it to : http://<hostname>:<port>/<contex-root>/<servlet>/<id>
    Presently Redirecting it to :http://<hostname>:<port>/<contex-root>
    As, directory browsing is not allowed, there is Error 403--Forbidden .
    Can anybody tell what changes needs to be made to make browser back button work.

    In some of the documentation I have read, they have mentioned that using the back button in a browser doesn't work too well with any JSF type of application (not just ADF and Jdeveloper apps).
    http://docs.oracle.com/cd/E15051_01/web.1111/b31974/web_form.htm#CFHHJGJH
    Instead, they suggest using buttons on the form.
    There is a video on using navigation between forms that may be of value: http://www.youtube.com/watch?v=bsPtmRID5XI&feature=plcp
    Stuart
    Edited by: Stuart Fleming on Sep 11, 2012 5:30 AM

  • Wrong folder pressing back button

    Hi gurus,
    we are facing a problem with a custom button on the standard transaction IL03.
    On the transaction we have created years ago a custom folder with a custom button that brings to another custom dynpro. When you access to this custom dynpro and press the back button you come back to the custom folder.
    Now we have to add a new custom button on the custom folder using the same flow, but when we press the back button from the new custom dynpro we are not able to come back to the same custom folder, instead the system brings us back to the first standard folder of IL03, mantaining the title of the custom folder but inserting the standard fields of the first folder.
    We used this code to call the program:
          SUBMIT xxxxxxxxxx WITH xxxxxxxxxxxx  AND RETURN.
    and in the xxxxxxxxxxx program we used this form
      IF SY-UCOMM = 'BACK' OR
        SY-UCOMM = 'STOP'.
        SET SCREEN 0.
    but it seems not to work properly.
    Someone can help us?
    Thank you!
    Edited by: silfabb on Aug 1, 2011 11:50 AM

    Hi silfabb,
    replace the code section
    IF SY-UCOMM = 'BACK' OR
    SY-UCOMM = 'STOP'.
    SET SCREEN 0.
    with new code
    CLEAR SY-UCOMM.
    Regards
    Clemens

  • How do you use forward and back button on mouse and use "zoom" in web browser.

    Ok so apparently this forum is ruled with an iron fist or something my very honest and truthful problems with these issues seem to have been instantly deleted in my last discussion?
    I'll try this once more.
    1) How do you use the forward and back button on a mouse without having to buy a product like Steer Mouse? There must be a way to do this without having to buy a program given it's such a useful feature that 99% of users need. I don't want to spend hours researching something that should already work. Any advice?
    2) How do you zoom in for web browsers like Chrome without it globally zooming in everything on the monitor (even background applications). I don't want to zoom in background applications. I want to be able to zoom in the web browser and still maintain all the features like the side bar, not just a little magnifying glass type thing.
    I'm currently zooming in with the CTRL-Middle Mouse button, but I can't find a way to use this feature so it's useful to browse the web it seems to not scale the browser correctly but rather is a global zoom. Any solution for this?

    Thanks so much!
    Like I said I am new to Apple products so it's still unclear to me which programs I do or don't need as I'm setting up and configuring all my software and devices.
    The Logitech Control Center appears to work perfectly for what I was trying to do!
    I accidently clicked "This helped me" instead of "This Solved My Question", sorry about that this was a solve!

  • Problems with Next and Back Buttons ActionScript 3.0

    Hi,
    I have set up a Back, Play and Next buttons in a slideshow I am making.  The next and back buttons work correctly until it gets to the end. 
    If I press the Next button it goes back to what appears to be Frame 1 and will not go to the next slide. If I press the Back button it will then go to Frame 201 and If I press next again it will go to Frame 1.  It will only go back and forth in between those frames.
    If I press the Back button from the beginning it goes through the slide show correctly then it gets stuck at Frame 1.  If I press next button it goes to Frame 121 and gets stuck in between 121 and 1.
    I can't figure this out please help.
    My code on Frame 1 is:
    stop();
    play_btn.addEventListener(MouseEvent.CLICK,playslideshow);
    function playslideshow(event:MouseEvent) { gotoAndPlay(2); }
    forward_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_2);
    function fl_ClickToGoToAndStopAtFrame_2(event:MouseEvent):void
      gotoAndStop(40);
    back_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_8);
    function fl_ClickToGoToAndStopAtFrame_8(event:MouseEvent):void
      gotoAndStop(281);
    My code on Frame 40 is:
    forward_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_7);
    function fl_ClickToGoToAndStopAtFrame_7(event:MouseEvent):void
      gotoAndStop(121);
    back_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_9);
    function fl_ClickToGoToAndStopAtFrame_9(event:MouseEvent):void
      gotoAndStop(1);
    My code on Frame 121 is:
    forward_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_3);
    function fl_ClickToGoToAndStopAtFrame_3(event:MouseEvent):void
      gotoAndStop(201);
    back_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_10);
    function fl_ClickToGoToAndStopAtFrame_10(event:MouseEvent):void
      gotoAndStop(40);
    My code on Frame 201 is:
    forward_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_4);
    function fl_ClickToGoToAndStopAtFrame_4(event:MouseEvent):void
      gotoAndStop(281);
    back_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_11);
    function fl_ClickToGoToAndStopAtFrame_11(event:MouseEvent):void
      gotoAndStop(121);
    My code on Frame 281 is:
    forward_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_5);
    function fl_ClickToGoToAndStopAtFrame_5(event:MouseEvent):void
      gotoAndStop(1);
    back_btn.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame_12);
    function fl_ClickToGoToAndStopAtFrame_12(event:MouseEvent):void
      gotoAndStop(201);

    I found the solution!  Flash CS5 Tutorial 6 Click On Button Go To Another Frame.avi - YouTube
    I had to Convert to Keyframes each frames I wanted to jump to on the buttons layer.  Then highlight the button and give each another instance name! Like forward1_btn, forward2_btn, back1_btn, back2_btn...  I did that and adjusted the action-script for each button.
    Frame 1
    stop();
    play_btn.addEventListener(MouseEvent.CLICK,playslideshow);
    function playslideshow(event:MouseEvent)
    gotoAndPlay(2);
    forward1_btn.addEventListener(MouseEvent.CLICK, Shoot_1);
    function Shoot_1(event:MouseEvent):void
      gotoAndStop(40);
    back1_btn.addEventListener(MouseEvent.CLICK, Back_1);
    function Back_1(event:MouseEvent):void
      gotoAndStop(281);
    Frame 40
    forward2_btn.addEventListener(MouseEvent.CLICK, Shoot_2);
    function Shoot_2(event:MouseEvent):void
      gotoAndStop(121);
    back5_btn.addEventListener(MouseEvent.CLICK, Back_5);
    function Back_5(event:MouseEvent):void
      gotoAndStop(1);
    And so on...

  • Text Click box not working when using back button on playbar

    I have an interstesting situation.
    I have a slide that has 2 text clickboxes (Slide B)
    Each text click box has an advanced action associated that controls what is displayed on the next slide (Slide C) . The click boxes and the advanced actions work just fine except for the following situation:
    The learner is on Slide C and uses the 'back button' on the playbar to return to the slide where the two text click boxes are (Slide B), then the click boxes don't seem to work.
    However if the learner goes back one additional slide, the slide before slide B (let's call that one slide A) and the continues from Slide A to Slide B, then the click boxes on Slide B work again.
    Can't figure out why that is?
    has anyone come across this issue before?

    Not for native Captivate interactive objects that suffer with this limitation.  There are interactive widgets such as the Infosemantics Event Handler that have preference options to Reset Success/Fail Criteria After Action.
    You could download a trial version and give that a go:
    http://www.infosemantics.com.au/adobe-captivate-widgets/download-free-trial-widgets
    You can attach this widget to any kind of screen object to make that object interactive.

  • Re: [iPlanet-JATO] Back Button functionality

    Hi Mike,
    Our test environment does not include proxy server.
    regards,
    syam.
    Please respond to [email protected]
    cc:
    Subject: Re: [iPlanet-JATO] Back Button functionality
    Guys,
    Please clarify something for me, the JATO code is commented as follows
    protected void addResponseHeaders(RequestContext requestContext)
    // These values should make any proxy between the client and
    // server avoid caching, and ensure that pages from one user
    // can never be seen by another user (if they're cached anyway)
    requestContext.getResponse().addHeader("Pragma","no-cache");
    requestContext.getResponse().addHeader
    ("Cache-Control","private");Yet you make no mention of whether your test environment includes a Proxy
    Server, or does your browser
    go directly to the Application Server's web server?
    Can you clarify, please?
    ----- Original Message -----
    From: <syam_reddy@p...>
    Sent: Wednesday, April 25, 2001 2:59 PM
    Subject: [iPlanet-JATO] Back Button functionality
    >
    Hi,
    We observed the following difference in behaviour between JATO pages
    and NetD served pages.
    We have the following scenario. User will login to the
    site. After login he will get a frame set. This frame set has threeframes.
    Top and bottom frames are used for navigation (to switch between various
    sections on the site.) .The middle frame(main frame) shows the actual
    content. When the the frame set gets loaded main frame shows page1. User
    will click on a link on page1. Page 2 will be loaded in main frame. Atthis
    point if the user clicks on back button , with migrated application(JATO
    pages) the following message appears in the main frame.
    In Netscape Communicator 4.61 the following message appears in the main
    frame :
    Data Missing
    This document resulted from a POST operation and has expired fromcache.If
    you wish you can repost the form data to recreate the document by
    presenting the reload button.
    In IE 4.72/5.5 the following message appears in the main frame:
    Warning : Page has Expired
    The page you requested was created using information you submitted in a
    form.This page is no longer available.As a security precaution, Internet
    Explorer does not automatically resubmit your information for you. To
    resubmit your information and view the web page click teh refresh button.
    However, in the NetD site page1 will appear in main frame.
    How do we mimic the NetD behaviour with the migrated
    applications ?
    We think the above behaviour with migrated Apps, is due to the
    headers that are get set in Application ServletBase , see the following
    code snippet :
    protected void addResponseHeaders(RequestContext requestContext)
    // These values should make any proxy between the client and
    // server avoid caching, and ensure that pages from one user
    // can never be seen by another user (if they're cached anyway)
    requestContext.getResponse().addHeader("Pragma","no-cache");
    requestContext.getResponse().addHeader
    ("Cache-Control","private");
    If we comment the above code , we were able to mimic theNetD
    behaviour. Are there any alternatives/thoughts on how to mimic the NetD
    behaviour ?
    Thanks in Advance,
    syam&ravi.
    [email protected]
    [email protected]

    OK, here's what I'm trying to do: We have, like you said, a menu
    page. The pages that it goes to and the number of links are all
    variable and read from the database. In NetD we were able to create
    URLs in the form
    pgXYZ?SPIDERSESSION=abcd
    so this is what I'm trying to replicate here. So the URL that works
    is
    pgContactUs?GXHC_GX_jst=fc7b7e61662d6164&GXHC_gx_session_id_=cc9c6dfa5
    601afa7
    which I interpreted to be the equivalent of the old Netd way. Our
    javascript also loads other frames of the page in the same manner.
    And I believe the URL-rewritten frame sources of a frameset look like
    this too.
    This all worked except for the timeout problem. In theory we could
    rewrite all URLs to go to a handler, but that would be...
    inconvenient.

  • How to get the values retained on clicking the back button in jsp page

    Hi All,
    I had two jsp's search and results. In the search page when i enter some values in the text fields, the rsults will be displayed for that search criteria. I had a back button in the results page. When i click on this back button i will get back to my search page. I am using the following code for this back button.
    <INPUT TYPE="button" VALUE='Back' onClick="javascript:history.go(-1)" class="button">
    Now the problem is when i get back to search page using this back button, i am not able to get the values in the search page which i entered, i am getting all blank values. What should i change to get these values back in the search page. Should i maintain any sessions for this?

    You have no control at all over the back button process. To the server, it's indistinguishable from the user simply tying the URL of your search page. So, you need to store this data server side*.
    When your search page is submitted and processed, store the values you received for each of the fields into the user's session. Then, when the search page is generated, check the session for these values, and for any values that are not null, put their values into the html as the default values for the textboxes and controls you are using. This lets you handle the whole matter on the server's side.
    *barring convoluted, unportable, black-magic javascript trickery which you should definitely avoid                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • Loan from Vendor Employee

    Hi Our directors are created as Employee Vendor. There are some cases where company take loan from directors. We have created these "loansfrom directors" as as special GL indicators. Now i want to know how to take loan from directors vendors. I tried

  • ORA-00932: inconsistent datatypes: expected DATE got NUMBER at OCI call OCIStmtExecute in OBIEE 11g

    Hi Friends, I am getting this error : ORA-00932: inconsistent datatypes: expected DATE got NUMBER at OCI call OCIStmtExecute when I am trying to put the filter condition on the date column. "Dim-Time"."Day" <= cast(MAX("Dim-Time"."Day") as date)  and

  • OBIEE11g  dynamic currency reports

    Hi All Is there a way to have a report build that will show data in different currencies when opened from different locations. For example i have a report as below. PRODUCT_ID,PRODUCT_NAME,SALES_AMOUNT When opened in INDIA i see the SALES_AMOUNT in r

  • JNLP runtime error

    Hi All, We are currently undergoing weblogic upgrade from 8.1sp6 to 10.0.1. We have successfully deployed the application. The application can be downloaded in two ways. 1) Using AppletWrapper 2) Using JNLP The application work fine when we launch us

  • Masking a bank account number in a DFF (R12)

    we have bank account numbers stored in a DFF in Payables on the Supplier record (additionally due to specific requirements).  Is there a way to 'mask' the number that it is not available/visable when a user queries the Supplier record where the DFF i