Last ActionScript question....

Discussion in 'Mac Programming' started by OneTraveler, May 28, 2007.

  1. OneTraveler macrumors member

    Joined:
    Oct 16, 2002
    Location:
    End of the Earth
    #1
    You all helped a ton last time. I hope you can do it again. I know this is easy, but I'm missing something.

    I have a symbol that exists one level down from my root level. The symbol is actually a button that when clicked should refer back to the root level and jump to a labeled frame.

    I've tried every variation of:
    on(release){
    with(_root){
    gotoAndStop("framelabel");
    }
    }

    that I can think of. I'm sure it's easy, but it's eluding me. Help?

    PS, should mention that I'm using Flash MX 2004....so I will.
     
  2. iSee macrumors 68040

    iSee

    Joined:
    Oct 25, 2004
    #2
    Well, the code looks fine.

    Just to be clear, is your button a button symbol or a button component? I don't think you use on(release) with components. You said symbol, but I just want to make sure.

    Obviously you've double checked the label of the frame in the main timeline, right? If you have any dyslexia in you at all, copy and paste the name from one place to the other to ensure its the same.

    Try putting a
    Code:
    trace("here I am");
    in your handler or otherwise verify whether or not it is being called.

    You've attached the handler to the button instance, right? That is, from the main timeline, you click on the button to select it and your code appears in the Actions window, without clicking on anything else.

    That's all I can think of...
     
  3. OneTraveler thread starter macrumors member

    Joined:
    Oct 16, 2002
    Location:
    End of the Earth
    #3
    gee, maybe it was just a case of tired eye syndrome. After reading your reply this morning, I went and double checked everything (yes, it is a button, and yes, the instance name is correct). I added the trace command (which I had never used before...going to do more testing with that one....), and viola! It worked. Must have just been uber out of it last night and was testing an unfinished copy.

    Thanks!:D
     

Share This Page