A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Button inside Movieclip cannot control main timeline

  1. #1
    Junior Member
    Join Date
    May 2003
    Posts
    2

    Button inside Movieclip cannot control main timeline

    I come accross a reoccuring problem, where a button nested inside a movieclip cannot control the main timeline, in terms of skipping to certain scenes or frames. I've tried

    _root.gotoAndPlay("Scene2");
    _level0.gotoAndPlay("Scene2");

    but this action doesn't seem to affect the main timeline. Does anyone know how to select the main timeline as the object?

    Kind Regards,
    Scott Lahney
    --
    James Cook University
    Townsville, Australia

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Posts
    155
    try to use
    _root.gotoAndPlay("Scene2", 1);
    or make a label in Scene2 and call the label

  3. #3
    Junior Member
    Join Date
    May 2003
    Posts
    2
    No luck I'm afraid, I tried both

    _level0.gotoAndPlay("Scene 2", 1);
    _root.gotoAndPlay("Scene 2", 1);

    and after adding a frame lable called "here" in scene 2 tried

    _level0.gotoAndPlay("Scene 2", "here");
    _root.gotoAndPlay("Scene 2", "here");

    The only way I can find to work around this is to create a function back on the main timeline, and call this from the button.

    Kind Regards,
    Scott Lahney
    --
    James Cook University
    Townsville, Australia

  4. #4
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    code:
    _root.gotoAndPlay("here");


  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    If I were Scott I woudn't understand that Solo!

    Scott check my post in this thread for an explanation:

    http://www.flashkit.com/board/showth...hreadid=458816

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