Moving to another frame as a result of the previous

Hello again guys,
Just another question - is it possible to go to another frame as a result of the previous one you came from. So for instance, I have some a picture displayed on frame 1 that I wish to keep referring to. So in frame 2 I create a button that goes back to frame 1, equally I do the same in frames 5 and 6, so there are 3 frames that return to frame 1. I then want frame 1 to return to each of the individual frames based on the one you have just come from. So for instance, I returned from frame 5 to frame 1, I then wish to return from frame 1 to frame 5 by pressing another button. The same button must then return you to frames 2 and 6 respectively based on which frame you just came from (2 back to 2 and 6 back to 6). Is this possible or am I barking up the wrong tree and am I going to have to make multiple frames with the same picture and changing the action script for the button?!
Cheers,
Chris

assign a variable to store the previous frame and use that variable in your frame 1 button:
//frame 1:
returnBtn.onRelease=function(){
if(previousFrame){
gotoAndStop(previousFrame;
// your other frames:
previousFrame=this._currentframe;

Similar Messages

  • Moving to a frame in Movieclip timeline from the main timeline

    I am in the learning process. Working with FlashCS5 and AS3.
    Please bear with me if the issue appears to be too simple for you. Placed a movieclip(mcassessJohn) on the main timeline and moved to the frame labelled "johnFeedback" in the movieclip timeline using the following actionscript code.
    mcassessJohn.addEventListener(MouseEvent.CLICK, onJohnClick);
    function onJohnClick(evt:MouseEvent):void {
       mcassessJohn.gotoAndPlay("johnFeedback");
    This works fine. However problem starts when I place a button "questionJohn" in the movieclip(mcassessJohn) time line at frame "johnFeedback" and try to move to another frame by clicking the button and using the following actionscript code;
    questionJohn.addEventListener(MouseEventClick,onClick);
    function onClick(evt:MouseEvent):void {
      gotoAnd Play("johnFeedback");
    Placed the above code in actions layer in the movieclip timeline at frame "johnFeedback". I had placed the button also in the movieclip timeline at Frame "johnFeedback in layer buttons. No compiler error.No runtime error. Just nothing happens when I click on the button "questionJohn".
    Would appreciate if you can let me know where I am going wrong.

    Thats because if u assign the listeners to a parent movieclip it will not pickup listener assigned to its child.
    A work around is put a invisible btn inside mcassessJohn movieclip on frame 1 and assign onJohnClick function to that.
    And one more thing, i think u r trying to perform same operation on both the btns
    http://www.darshanrane.com

  • Submit a frame and get result on the next frame using one button

    hi
    i have my page divided into 2 frames.1st frame (master.jsp)displays records from a master table and 2nd displays corresponding records in its transcation table(trans.jsp).There is a textbox in master.jsp which indicates the record number.Now this text field is to be submitted to the master page so as to get that record at the same time submit it to the trans page so as to get its corresponding transaction table records.
    now i have two buttons with submitfrm() and getrecords()...function submitfrm()on submit button to submit the master page and function getrecords() on the 'Get record' button so as to call trans.jsp.
    function submitfrm()
    document.frm.action="master.jsp";
    document.frm.target="frame1";
    document.frm.submit();
    and
    function getrecords()
    document.frm.method="post";
    document.frm.action="trans.jsp";
    document.frm.target="frame2";
    document.frm.submit();
    i want that both funtions submitfrm() and get() to be called through a single button.if i call getrecords() from submitfrm() i get records corressponding to the previous value submitted.
    how do i go about it???

    This is a java forum, not javascript and thus you may not find all the help you require over here (realted this subject);
    If you want you can try a simple search on google with the following key words "Javascript Forums" to find forums just dedicated to javascript.
    One good forum is the following:
    http://www.codingforums.com/forumdisplay.php?s=1118745c12e46c9852dde4950af8c373&f=2
    regards,
    sim085

  • SAVE BOOKMARS TO BE MOVED TO ANOTHER COMPUTER (I DO NOT HAVE THE BUTTONS).

    I TRIED TO FIND HINTS, BUT THE BUTTONS IN THE HELP GUIDES DO NOT EXIST ON MY VERSION OF FIREFOX. FIREFOX IS CURRENT. IF I HAD THOSE BUTTONS, IT WOULD BE A SNAP.

    https://support.mozilla.com/en-US/kb/Exporting%20bookmarks%20to%20an%20HTML%20file#os=win&browser=fx7
    Basically, open the bookmarks menu (Ctrl + Shift + B), click import/export, and choose export....

  • Change the Post Moved to another Forum procedure

    When a post gets moved to another forum, and you click on the green-arrow Moved: it shows you a new screen with the new link, and info where it is moved to.
    See here and here
    Could that be changed in such a way, that when you click on the Moved: it takes you direct to that post in the new forum, without the in-between message?
    Message Edited by RealBlackStuff on 12-22-2007 10:01 AM

    I wonder if it would do what you're asking if we didn't put anything in the comment box?  I'll try that.
    I had been leaving a placeholder and filling in that comment in for now just to reinforce the idea that people should watch where they're posting in the first place.  I wasn't planning to keep doing that once things are firmly established here, and we don't leave a trail of breadcrumbs at TPF any more when we move something.  It's just clutter.
    OK, I tried not putting a comment in, and it didn't change anything.  I did find out that I can delete the placeholder, though, without deleting the moved thread.  In phpBB, deleting the placeholder dumps the whole thread.  I think that's an improvement from Lithium over phpBB.
    Message Edited by nonny on 12-22-2007 11:01 AM
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество
    Jane
    2015 X1 Carbon, ThinkPad Slate, T410s, X301, X200 Tablet, T60p, HP TouchPad, iPad Air 2, iPhone 5S, IdeaTab A2107A, Yoga Tablet, Yoga 3 Pro
    I am not a Lenovo Employee.
    I AM one of those crazy ThinkPad zealots!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!

  • I have lost my facetime option when moved to another country. pls suggest how can i get it back

    Hi ,
    Recenlty i have bouhgt  new iphone5s from middle east . When i was using the phone over there the facetime was working perfect for me .
    Now when i moved to another country i can not see the facetime option in the iphone .
    Could you pls suggest how can i get it back .

    Hi Stedman ,
    Thanks for the information !!
    I have checked the article and i can clear see that my Wireless carrier support the facetime feature
    so what could be the reason am not able to use the facetime option .

  • Moving to another country need to change my payment account

    I am moving to another country and need to change the payment account to the new place. I will like to retain my current account name and password and keep all my purchases. Please help.
    Ed

    Change the country of your iTunes Store, App Store, iBooks Store, and Mac App Store account - http://support.apple.com/kb/ht6119
    I can't change the country of my iTunes Store, App Store, iBooks Store, or Mac App Store account - http://support.apple.com/kb/TS5375

  • Iphone, area code, moving to another area code ( lol @ topic title)

    I'm really close to getting an iphone 3gs, but I just have some last questions before I go ahead with the purchase. Bare with me if I don't know what I am trying to ask because I'm confuse myself, so pardon my nubness **** I don't even know how to make the topic title for this topic lol.
    I currently live in a city in California who's name will be kept anonymous. I don't know if I plan on staying here for another year. I've been planning on moving to another area in California, either the bay area or maybe southern california or perhaps New York next year, who knows. I have a cellphone number but its under my parents' family plan, so I'm not really paying for anything. I'm thinking of getting an iphone and get a new cell phone number as well to go with it.
    My question is basically regarding the cellphone number. My friend said not to get the iphone because if I do move to lets say to those said places above, my area code for the cellphone will be different and if people call me, I will get charged and they will get charged long distance or what not. That's what my friend said. Does that make sense? Can somebody please clarify/explain to me what happens if I move to another city with a different area code and whatnot? What kind of charges I will incur as a result.

    You can always change you cell phone number.
    If you move to another place you can change you phone number or not, your choice.
    I have never been charged for changing a phone number.

  • Spinning a wheel, randomly stops and then takes you to another frame.

    I would like to be able to spin a wheel in flash, this wheel has 8 sections to it split up equally, it spins for a random amount of time, 3 - 7 seconds and then stops. the section which lands on the marker is the result and will take you to a specific frame. Also i would like it when it stops to gradually slow down however this is not vital.
    this code works for just rotating a wheel but i want to know how to randomly stop it and how to take it to another frame.
    onClipEvent (enterFrame){
    this.ang=ang+0.01;
    _alpha=190*Math.sin(this.ang)+190;
    _rotation++;
    _xscale=260*Math.sin(this.ang)+1900;
    i do not know a lot of coding, so do not use complicated words and if you could post how to do this it would help alot.
    thanks

    import mx.transitions.Tween;
    var obj:Object = {};
    start_mc.onRelease=spinF;
    function spinF(){
    obj.x = wheel_mc._rotation;
    var myTween:Tween = new Tween(obj, "x", mx.transitions.easing.Strong.easeInOut,0, Math.random()*360*5, 3+Math.floor(Math.random()*5), true);
    myTween.onMotionChanged = function() {
        wheel_mc._rotation = obj.x
    myTween.onMotionFinished=function(){
    yourmovieclip.gotoAndStop("yourframelabelornumber");
    p.s.  please mark helpful/correct answers.

  • How to instruct servlet to output to another frame?

    Hi all,
    This is what my application is about:
    Display a page with 3 frames.
    The 1st frame is a form, and the user is to fill out the form and submit a post request. The servlet invoked will perform some query and generate a list of results with links in another frame.
    Then the user will click on a link and more computation will be performed and result will be displayed in the 3rd page.
    my first question is: how to generate the result in another frame using servlet? Is RequestDispatcher an answer? I've tried using RequestDispatcher to forward the request to the .jsp file which represents the 2nd frame but nothing in the 2nd frame happens when I submit the form in the 1st frame. Rather, the 1st frame displays a page with message "The page cannot be found."...
    My second question is: should I write 3 separate .jsp files for each frame? Do I need a jsp file for the 2nd frame? I don't really understand how I can generate result in the 2nd frame which will in turn generate other results in the 3rd page when the user submits request in the 2nd frame.
    Thanks for your attention. Your help will be greatly appreciated!

    Have a look at a problem posted by nalinisp today. It might help.

  • Frame inside another Frame

    Hi,
    I am developing a GUI application like VB. How do I get Frame inside another Frame which can be moved.
    kumanan

    Hi,
    The only way:
    JDeskTopPane (as main window GUI)
    and then use:
    JInternalFrame (all other moveable windows)
    Regards,
    Manfred.

  • Want to open another project from Quiz Results - can't get it to work.

    I have been trying to get my course to open another project (an instruction slide) after the user completes a quiz and it is not working. The course always closes after the quiz results. I have set the Project End Options and the Pass or Fail options to all open another project (the instruction slide), but instead, after the user clicks 'Continue' on the quiz results page, the course always closes. What could I be missing? (Am using Captivate 5.)

    Just finally getting my head above water and am able to respond and update. Yes, I was using a tool called RELOAD to update the imsmanifest file. Actually a great tool that I can recommend now that I worked out the kinks with Captivate. Please see this post for more information. http://www.caddicks.com/blog/2012/02/17/how-to-publish-a-multi-file-captivate-project-as-a -single-scorm-course/#comment-249711
    Here's a quick summary of how I ended up resolving this - I can't even remember all the different options I tried until I settled on this! I never resolved the issue with launching another project from the quiz results page, but found a workaround that works even better.
    The course starts with a brief introduction module. The 'Continue' button on the last slide is set to launch another project, which opens the course's 'main menu.'
    The 'main menu' project has several buttons that launch appropriate sub-topic projects.
    On the last slide of each of the 'sub-topic' projects has the 'Continue' button set to launch the 'main menu' again. Each of these had quiz questions, but feedback was set at the question level only - no quiz results page.
    The last option on the 'main menu' project was a 'Course Completion' button - which launches a project containing the final quiz. (NOTE: This was always the only project that had the "Show score at the end of the quiz" set to display under Preferences / Quiz / Settings. After a lot of hair-pulling, I realized that it wasn't necessary to open another project to accomplish what I wanted to do, which was return the user to some basic instructions before they retook the quiz.)Here is how the last project was set up.
    The first slide is a content slide with instructions for the quiz. When the user clicks the "Back" button from this slide, it will launch the 'main menu' project. 'Next' simply goes to the next slide.
    Slides 2-5 are quiz questions
    Slide 6 is the quiz results slide (turned on under Preferences / Quiz / Settings). Buttons are: Review Quiz and Continue.
    Slide 7 is a content slide with instructions on what to do next. This slide has a text button that I called "Retry" and under Properties / Reporting for the button the "Include in quiz" is NOT checked. The Retry button takes the user back to the first slide in the quiz.

  • How can I Copy/paste the pixels within a frame in a video layer to another frame? (It duplicates the whole frame instead.)

    I'm making a handdrawn animation in the timeline using video layers, so each video layer contains the frames for the animation. The method works great..except for this -
    If lasso select a section of one frame and try to paste into another frame, it duplicates the the whole frame and pastes it with an arbitrary long frame duration for some reason (not the same duration as the frame its copied from)....not at all what I'm trying to do. Any work around? I've tried all the variations of 'paste special' to no avail.
    Thanks.

    Images and other object can either be floating or be inline. Yours are floating and will not move with the text. Inline object will move with the text but can't be outside the text layer. It doesn't help if you have created section in the document. Floating images doesn't care. Nor will it help if you create several documents that you want to merge later. Doesn't make any difference.
    My suggestion is that until your text is finished you have the images inline. Then as a last editing you can start make the images floating and move them a little.

  • How to put a string from one Frame to another Frame?

    Dear all,
    How can I put a String from one Frame to another Frame?
    When the application started, the Frame 'WindowX' will be displayed. After you press the 'openButton', a whole new Frame (inputFrame) will be shown. In this Frame )(inputFrame) you can write a String in a TextField. After pressing the okButton, this String will be sent to the first Frame 'WindowX'.
    But does anyone know how to realize the sending part?
    I've tested this code on Win98 SE and JDK1.2.2.
    Hope someone can help me. Thanks in advance.
    import java.awt.*;
    import java.awt.event.*;
    public class WindowX extends Frame implements ActionListener, WindowListener
         private Button openButton;
         private TextField resultField;
         public static void main(String [] args)
              WindowX wx = new WindowX();
              wx.setSize(300,100);
              wx.setVisible(true);
         public WindowX()
              setLayout(new FlowLayout());
              openButton=new Button("open");
              add(openButton);
              openButton.addActionListener(this);
              resultField=new TextField(10);
              add(resultField);
              resultField.addActionListener(this);
              addWindowListener(this);     
         public void actionPerformed(ActionEvent evt)
              if (evt.getSource()==openButton)
                   inputFrame ip=new inputFrame();
                   ip.setSize(200,80);
                   ip.show();
         public void place(String theString) //this doesn't work
              resultField.setText(theString);
         public void windowClosing(WindowEvent event)
              System.exit(0);
         public void windowIconi......
    class inputFrame extends Frame implements ActionListener,WindowListener
         String theString = "";
         Button okButton;
         TextField inputField;
         WindowX myWX=new WindowX();   //??
         public inputFrame()
              setLayout(new FlowLayout());
              inputField=new TextField(10);
              add(inputField);
              inputField.addActionListener(this);
              okButton=new Button("OK");
              add(okButton);
              okButton.addActionListener(this);     
              addWindowListener(this);     
         public static void main(String[] args)
              Frame f = new Frame();
              f.show();
         public void actionPerformed(ActionEvent evt)
              if (evt.getSource()==okButton)
                   theString=inputField.getText();
                   myWX.place(theString);   //??
                   dispose();
        public void windowClosing(WindowEvent e) {
        dispose();
        public void windowIconi......
    }

    Thanks for your reply!
    But I got an other problem:
    I can't refer to the object (wx) made from the main Frame 'WindowX', because it's initialized in 'public static void main(String [] args)'...
    Hope you can help me again... Thanks!
    import java.awt.*;
    import java.awt.event.*;
    public class WindowX extends Frame implements ActionListener, WindowListener
         private Button openButton;
         private TextField resultField;
         public static void main(String [] args)
              WindowX wx = new WindowX();   //!!
              wx.setSize(300,100);
              wx.setVisible(true);
         public WindowX()
              setLayout(new FlowLayout());
              openButton=new Button("open");
              add(openButton);
              openButton.addActionListener(this);
              resultField=new TextField(10);
              add(resultField);
              resultField.addActionListener(this);
              addWindowListener(this);     
         public void actionPerformed(ActionEvent evt)
              if (evt.getSource()==openButton)
                   inputFrame ip=new inputFrame(wx);
                   ip.setSize(200,80);
                   ip.show();
         public void place(String theString)
              resultField.setText(theString);
         public void windowClosing(WindowEvent event)
              System.exit(0);
         public void windowIconi....
    class inputFrame extends Frame implements ActionListener,WindowListener
         String theString = "";
         Button okButton;
         TextField inputField;
         WindowX parent;
         public inputFrame(WindowX parent)
              setLayout(new FlowLayout());
              this.parent=parent;
              inputField=new TextField(10);
              add(inputField);
              inputField.addActionListener(this);
              okButton=new Button("OK");
              add(okButton);
              okButton.addActionListener(this);     
              addWindowListener(this);     
         public static void main(String[] args)
              Frame f = new Frame();
              f.show();
         public void actionPerformed(ActionEvent evt)
              if (evt.getSource()==okButton)
                   theString=inputField.getText();
                   parent.place(theString);
                   dispose();
        public void windowClosing(WindowEvent e) {
        dispose();
        public void windowIconi..........
    }          

  • Passing data from one frame to another frame

    hello all, i am having a problem with passing data from one frame from another. I have a main frame when you click on connect button it display the second frame(class) that has 2 text fields and 2 buttons. When i click on connect it check if the data is correct. If the data is correct i want that frame to close and pass the data back to main frame. How can i do that.
    thank you

    hello all, i am having a problem with passing data
    from one frame from another. I have a main frame when
    you click on connect button it display the second
    frame(class) that has 2 text fields and 2 buttons.
    When i click on connect it check if the data is
    correct. If the data is correct i want that frame to
    close and pass the data back to main frame. How can
    i do that.
    thank you
    the original problem sounded like an ideal opportunity to use Modal Dialog. if you want one frame to display another to get user input then you need to stop the method in the main frame from executing until you recieve a valid input.
    you can use your own class and keep all of the components that you have in the connect frame but you would have to extend JDialog instead of JFrame.
    there is a way around it!
    if you must use JFrame for both, then you need to have access to the main frame in the connect frame, maybe pass the pointer to the constructor??
    anyway, when the connect frame is done with its duties, you have to use the pointer to call another method in the main frame that will continue the process. otherwise main frame doesn't know when connect frame is done and by that time, the method in main frame that instantiated the connect frame has long since died.
    also, it allows things to happen in the other window that you may not want to happen until the connect frame is done
    typically users of software start clicking around on things and you could have three or four connect frames going at the same time
    it's really best to use a Modal Dialog, it really can look just like a JFrame!!!!!!!!!!!!!!

Maybe you are looking for

  • Imac sleep settings don't work - imac forces sleep

    many people seem to have an issue where they can't get their computer to sleep. i have the opposite problem, i can't prevent it from going to sleep, regardless of all sleep settings, which also closes all open applications. if i walk away for an hour

  • Cannot Deliver as low on stock

    Hi all, I have support case. The problem is we can't deliver because we don't have enough stock, but we don't want any availability check which is why we use item category ZBN. The schedule line category is L1 which doesn't have availability check, b

  • Misalignment in browser when window size changes

    I have two ap elements within content, one aligned to the left side of the content, the other next to it, i.e. aligned to the right side of the content. Preview in browsers such as IE7 and firefox in full window the content expands beyond the right a

  • Oracle on Linux OEL Cluster

    Dear all, I want to install oracle on Linux OS cluster instaed of Oracle RAC. I need help on this i haven't configured cluster on linux and want to know setps i am using OEL 5.3. i am trying to install this on HP servers and HP Storage. i am using HP

  • Labview 8 with 4350 DAQ board

    I upgraded from LabView 6 to Labview 8.  At the same time, I put the old 4350 board into this new WinXP computer.  The board works great in MAX, but LabView can't seem to find it.   And can't use all of my old data acquisition VIs. According to MAX,