A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: ActionScript Play Controls Malfunction

  1. #1
    Senior Member bluephoenix's Avatar
    Join Date
    Nov 2002
    Location
    Upstate/Central New York
    Posts
    144

    ActionScript Play Controls Malfunction

    Hey all...

    I'm doing a presentation for work consisting of several photos, animations and sound clips. I've encapuslated the project so that it is made up of a series of movie clips (based on each sound clip).

    My time line resembles:
    [--------'----------'----------'-----------'------]
    [actions][a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a|a]
    [m_clips][o|o|o|o|o|o|o|o|o|o|o|o|o|o|o|o|o|o]

    stop(); has been assigned to each action frame.

    at the end of each movie clip I've assigned the actionscript:
    stop();
    _parent.play();

    The idea is that the playhead moves to frame 1, stops while the first clip plays. Once the first clip is done playing it tells the main timeline to play again. The playhead moves to frame 2 but stops again to let the 2nd clip play. This goes on and on until all clips have played, ending the movie.

    I've done this before and it's worked fine for me. However I seem to be running into a problem with my current project. The playhead moves and stops all the way up to, say, frame 9. The ninth movie clip plays... but then that's it.

    I'm not sure where the hang up is, either clip 10 isn't playing, clip 9's not advancing the main playhead, or whatever else.

    I've checked to see if there were some stray ActionScripting statements, but I didn't find any. And the function calls are the same. That is...

    frame 9 [actions]: stop();
    frame 10[actions]: stop();

    movieclip9[last frame]: stop(); _parent.play();
    movieclip10[last frame]: stop(); _parent.play();

    Has anyone run into this problem before? Is there anything else that can interfere with ActionScript's play controls?

    Thanks in advance,

    -Tim
    Timothy Boronczyk
    -http://home.twcny.rr.com/organman20/bluephoenix

  2. #2
    Senior Front End Developper
    Join Date
    Dec 2000
    Location
    Montréal
    Posts
    568
    i never ever use the play() function.

    instead use _parent.gotoAndStop(_parent.currentframe + 1);

  3. #3
    Senior Member bluephoenix's Avatar
    Join Date
    Nov 2002
    Location
    Upstate/Central New York
    Posts
    144

    answers always stare us in the face, don't they?

    Bah! never mind. I figured it out.

    It's movie clips that play, not graphics. I must have been half alseep when I converted the initial objects to a movie clip.

    ... we don't have an embarassed emoticon available, do we?

    -Tim
    Timothy Boronczyk
    -http://home.twcny.rr.com/organman20/bluephoenix

  4. #4
    gotta bounce solomatrix's Avatar
    Join Date
    Mar 2002
    Location
    Naptown
    Posts
    225
    Solo

  5. #5
    Senior Member bluephoenix's Avatar
    Join Date
    Nov 2002
    Location
    Upstate/Central New York
    Posts
    144
    Yeah, lol. I guess everyone's entitled to have a brain-fart once in a while.

    I like the idea of _parent.gotoAndStop(_parent.currentframe + 1), but I'm curious if there's a particular reason you're not using the stop and play functions.

    -Tim
    Timothy Boronczyk
    -http://home.twcny.rr.com/organman20/bluephoenix

  6. #6
    Senior Front End Developper
    Join Date
    Dec 2000
    Location
    Montréal
    Posts
    568
    for some reason, the play() and stop() methods seems to have a higher priority than gotoAndPlay() and gotoAndStop() so if there's already a stop() in a timeline and you call gotoAndPlay(), the goto part will be executed but not the play part.

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