dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Is it possible?

  1. #1
    Member
    Join Date
    Jul 2000
    Posts
    56
    Is it possible to write an ActionScript for a button to tell a movieclip to play 7 frames then skip to frame 30? This is without haivng actionscript on the frame itself.

  2. #2
    Member
    Join Date
    Jun 2001
    Posts
    37
    ok create a button with the following actionscript
    on (release) {
    _root.mc.play ();
    }

    where mc is the instance name of the movie clip you want to play

    in the first frame of your movie clip put the action stop

    now inside your movie clip create a empty movie clip

    apply these actions to the first and second frame
    if (_root.mc._currentframe == (7)) {
    _root.mc.gotoandstop(30);
    }

    i have set it up to go to the 30th frame and stop
    you can change this by changing the statement
    _root.mc.gotoandstop(30); to
    _root.mc.gotoandplay (30);

    let me know if this works for you
    Jon

  3. #3
    Member
    Join Date
    Jul 2000
    Posts
    56
    Would

    if (_root.mc._currentframe == (7)) {
    _root.mc.gotoandstop(30);
    }

    mean that if it is at frame 7 then go to frame 30?
    i need it where when i push a button it will play 7 fames when it hits the 7th frame to go to frame 30 and play.

    Is it possible for a button to tell a movie clip to play only 7 frames then jump to frame 30? Would it be easier to put a stop on the 7th frame? I cant put "goto and play frame 30" on the time line b/c I dont want it to work that away. Thanks for the help

    Scott

  4. #4
    Member
    Join Date
    Jun 2001
    Posts
    37
    You Said
    "Would

    if (_root.mc._currentframe == (7)) {
    _root.mc.gotoandstop(30);
    }

    mean that if it is at frame 7 then go to frame 30?
    i need it where when i push a button it will play 7 fames when it hits the 7th frame to go to frame 30 and play. "

    that is exactly what my code is doing
    check it here

    http://www.sub7designs.com/test.swf
    http://www.sub7designs.com/test.fla

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