Question about flash.


#1

Hey guys, i know this is a photoshop forum but Im trying to keep business in cgtalk. I have been all over the net but I cannot find my answer. I’m trying to link a button from one scene to another.

I know this has to be crazy easy but all I seem to be able to do is link a button from within a MC inside of a scene to another scene.

I want to have my button that is on stage and not in a MC to link directly to another scene. I’m using AS2 and here is the code for the button that doesn’t work. Please let me know what to do this is driving me crazy.

I have tried using labels, but again, nothing seems to work on stage, only in MC’s. Thanks guys!

  
on (release) {
 gotoAndPlay("contact", 1); //this is for a webpage and contact is the name of the scene.
}


#2

www.actionscript.org


#3

I agree, I would try actionscript.org, but for cleaner code and something that is easier to manage in the future, put your code on a separate actions layer, not on the button itself.

Give your button an instance name like “myButton”. Then on the frame the button is sitting try this:

myButton.onRelease = function(){
    gotoAndPlay("contact", 1);
  }

#4

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.