A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Manipulating frames in the timeline

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    18

    Manipulating frames in the timeline

    Hi everyone,

    I've got a first frame in the timeline in which the stage has a play button that, when pressed, advances the timeline to the next frame, where the game should actually start, with UFO's and stuff flying through the stage. But I want the "action" to start only in the second frame of the timeline. I tried this, it doesn't work: the UFO's don't appear in the first frame but don't appear in the second either, as I wanted.

    function Main():void
    {
    if (currentFrame == 2) //it's wrong, I was just trying...
    {
    Mouse.hide();
    stage.addEventListener(MouseEvent.MOUSE_MOVE,mexe_ mira);
    ...
    ...
    ...
    ...
    }
    }

    If I don't put the "if", in the first frame (with the play button) all the UFO's appear, flying across the stage. They aren't supposed to.
    If I put the "if", there are no UFO's at all, in any frame.

    Any ideas? Thanks
    Chiapa

  2. #2
    Flash/Flex Developer samac1068's Avatar
    Join Date
    Apr 2007
    Location
    Here, no there
    Posts
    1,813
    Hard to tell without actually seeing the timeline. If you are loading your characters by as3, then ,make sure you don't have a keyframe that ends the as code for the rest of the timeline. If you are loading the characters manually, then make sure to have a keyframe in the second frame with your characters and in your first frame a stop command waiting until the button is pressed.

    It could be easier to help, if you post your code and not just a excerpt of it.
    Some people are like Slinkies, not really good for anything, but they bring a smile to your face when pushed down the stairs.

  3. #3
    Junior Member
    Join Date
    Jun 2012
    Posts
    18
    Thanks again, I now have what I need.

    Cheers,

    Chiapa

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