A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: simple GotoAndPlay question

  1. #1

    simple GotoAndPlay question

    I figure this might be a simple question, but I can't seem to find anything online about it.

    I built a button ("resume_btn") within a movie clip, and that movie clip ("resume_mvc") is being embeded in another movie clip ("main_mvc").

    With actionscripting's onrelease, I am trying to jump to a marker named "Resume" inside the movie clip "resume_mvc," what is the proper way to refer to that marker?

  2. #2
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    On the button:

    on(release){
    _root.main_mvc.resume_mvc.gotoAndPlay("Resume");
    }

    Or in a frame:

    _root.main_mvc.resume_mvc.resume_btn.onRelease = function(){
    _root.main_mvc.resume_mvc.gotoAndPlay("Resume");
    }

  3. #3
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397

    Or in a frame:

    _root.main_mvc.resume_mvc.resume_btn.onRelease = function(){
    _root.main_mvc.resume_mvc.gotoAndPlay("Resume");
    }


    ...Assuming the button is present on the frame where the button's handler was defined!

  4. #4
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    On or before. I use to like the function calls, cause they were sexy and made me feel like I knew a lot. But using code on the buttons is really the easiest, safest way.

  5. #5
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    On only! Otherwise the handler can't be assigned to something that doesn't exist!

  6. #6
    Works great, thanks! I'll post a URL to my site after I got done with it, so you guys can see what you've been helping me out on. Thanks again!

  7. #7
    FK's Geezer Mod Ask The Geezer's Avatar
    Join Date
    Jul 2002
    Location
    Out In The Pasture
    Posts
    20,490
    On or before. If the button appears on or before the code, it will work.
    Attached Files Attached Files

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