A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: [RESOLVED] Move to next frame

  1. #1
    Junior Member
    Join Date
    Sep 2007
    Posts
    11

    resolved [RESOLVED] Move to next frame

    I am using Koolmoves to create a simple .swf file that allows a user to click on a picture and it moves to the next frame and stops. I created the two frames, created a button on the picture in the first frame, designated that on mouse events press and release go to frame 2 and stop. But when I play the movie, the first frame appears and then the second frame appears without any action on my part. I'd appreciate any help that you offer.

    Thanks.

  2. #2
    Senior Member
    Join Date
    Jul 2008
    Posts
    391
    Did you put stop (); on the first frame?

  3. #3
    Junior Member
    Join Date
    Sep 2007
    Posts
    11
    Sorry,Flashulous, but I have not worked much with this aspect of KM. I am using the Basic mode. Here's what I have:

    2 frames - the first one shows some coins and when students click on it, they move to the second one which shows the value of the coins so that they could add them.

    For the button on frame 1 I have the following: btn 1 - Actions - multiple
    Actions - Go to key frame 1 and stop (on press and release)
    Actions - Go to key frame 2 and stop.

    I appreciate your help working me through this problem. Thanks.

  4. #4
    Junior Member
    Join Date
    Aug 2011
    Location
    Copenhagen, Denmark
    Posts
    4
    Can you post your code so we can see how far you are?
    Will be easier to help you with it.

  5. #5
    Senior Member
    Join Date
    Jul 2008
    Posts
    391
    Sounds like you're using some sort of "make-coding-easier" program and from the looks of it, you still don't have an action that tells the movie to stop on the first frame. The button's actions are: if you press the button and release, go to the first frame; go to the second frame. Doesn't quite make sense to me. Can't you add that same action "go to key frame 1 and stop" to the first frame that affects the entire movie?

  6. #6
    Junior Member
    Join Date
    Sep 2007
    Posts
    11
    5Five555 - I am using Koolmoves in the Basic mode which has a "make-coding-easy" component and obviously it isn't doing what I want it to do. I would greatly appreciate it if you could help me or point me in the direction of some online resource that could help.

    Here's what I want to do: 1. display a picture. 2. Click on the picture to go to a second picture. 3. Stop there.

    I then could convert this into a .swf file and insert it into another program - which I know how to do.

    Thanks so much.

  7. #7
    Senior Member
    Join Date
    Jul 2008
    Posts
    391
    I don't know how Koolmoves works but maybe this might spark some ideas, this is the AS3 code for achieving what you want to
    PHP Code:
    firstImage.addEventListener (MouseEvent.CLICKonFirstImageClick);
    function 
    onFirstImageClick (e:MouseEvent) {
        
    gotoAndStop (2);
    }

    var 
    loader:Loader = new Loader ();
    loader.load ("thatSWF.swf");
    loader.contentLoaderInfo.addEventListener (Event.COMPLETEonLoadComplete);
    function 
    onLoadComplete (e:Event) {
        
    addChild (loader);

    First part is the picture thing and second is the SWF thing.

  8. #8
    Junior Member
    Join Date
    Sep 2007
    Posts
    11
    5Five555

    Thanks for your suggestion, but someone from KoolMoves contacted me and said that I need 2 copies of the first frame in order for the action to work properly. Sure enough, when I added the second frame and put in the instructions to go to the 3rd frame, it worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center