dcsimg
A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: making main timeline play from button inside MC

  1. #1
    Senior Member
    Join Date
    May 2001
    Posts
    485

    making main timeline play from button inside MC

    Hello,

    i think the title says it all.
    I have done this a million times, but for some reason I seemed to have missed something.

    My button is inside a movie clip, the AC on the button is this...

    on (release) {
    gotoAndStop(6);
    _root.play();
    }

    _root.play(); isnt working....

  2. #2
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    on(release){
    _root.gotoAndPlay(6);
    }
    If you don't think you're going to like the answer, then don't ask the question.

  3. #3
    Senior Member
    Join Date
    May 2001
    Posts
    485
    hi,

    No, the gotoAndPlay 6 is for the MC the button resides in, that works....
    _root.play(); is supposed to control the main timeline

  4. #4
    Senior Member
    Join Date
    May 2001
    Posts
    485
    an even weirder part, is on frame 6, i have a different button (pause button), it has a _root.stop();
    which is working fine...

  5. #5
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    do you want the movieclip to play or the _root timeline to play?
    If you don't think you're going to like the answer, then don't ask the question.

  6. #6
    Senior Member
    Join Date
    May 2001
    Posts
    485
    _root.timeline needs to play.... It is a simple flash file which contains audio, Im making a play/pause button..... The Play/Pause button is a MC with 2 button in it.. frame 1-5 has the play button, frame 6-10 has the pause button..

    hence..

    the play button has this AC

    on (release) {
    gotoAndStop(6); // it is playing, so the MC goers to frame 6, where u see a pause button instead of a play button
    _root.play();
    }

    the pause button has this AC

    on (release) {
    gotoAndStop(1); // now you see the play button again
    _root.stop(); // this works
    }

    the audio is just dumped on the main timeline

  7. #7
    Senior Member
    Join Date
    May 2001
    Posts
    485
    i have attached screen shots..

    one for the main time line..

    2 for my controller MC, one shot shows the play button and the other shows the pause button, and the AC that goes with them
    Attached Images Attached Images

  8. #8
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    what version of flash are u using, so i can post a fla
    If you don't think you're going to like the answer, then don't ask the question.

  9. #9
    Senior Member
    Join Date
    May 2001
    Posts
    485
    mx 2004

  10. #10
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    try this fla and let me know if it's what you want
    If you don't think you're going to like the answer, then don't ask the question.

  11. #11
    Senior Member
    Join Date
    May 2001
    Posts
    485
    hi,

    tx so much, that is exactly what i want... and exactly what i built.. i dont understand why mine isnt working...

  12. #12
    Senior Member EQFlash's Avatar
    Join Date
    Jun 2002
    Location
    where i'm at
    Posts
    2,735
    there is some tweaking to the codes
    glad i could help
    1 tip though, you should try loading your sounds via actionscript rather on the timeline to decrease file size, and loading time.
    Last edited by EQFlash; 11-11-2005 at 02:01 PM.
    If you don't think you're going to like the answer, then don't ask the question.

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