trying to use movie clip as button
Hi I have created a movie clip with a zoom effect, I am trying to make the movie clip act as a button I have tried to use the on release event but its not working I have tried
on (press) {gotoAndPlay (5);
}
on (press) {gotoAndPlay "scene 1" (5);
}
in my movie clip I am using
stop();
this.onEnterFrame = function(){
if(zoom == true){
prevFrame();
}
}
this.onRollOver = function(){
zoom = false;
play();
}
this.onRollOut = function(){
zoom = true;
}
I am sure this is something simple but it has me stumped.
give you movieclip a name
then in the actions panel (on the timeline not the movieclip)
use something like
myButtonMc.onRelease=function(){gotoAndPlay(5);}
is onRelease a movieclip event and not a button event? I'm quite certain you need onMouseDown.
thebutton_mc.onMouseDown = function(){
if(thebutton_mc.hitTest(_xmouse, _ymouse, true)){
trace('cake');
}
}
Your problem is in gotoAndPlay(); action which needs to be this.gotoAndPlay(5);
code:
mc.onRelease = function() {
this.gotoAndPlay(5);
};
arkitx
Last edited by arkitx; 10-08-2012 at 06:52 PM .
ad.fla
thanks for the replies I have tried some of your suggestions but I cannot get it to work I have attached my fla for you to see maybe you could point out where I am going wrong
Attached Files
The ad.fla file is CS6. Please export it as an earlier version for those who are using CS3 to CS5.
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Click Here to Expand Forum to Full Width