View Full Version : Simple Button Question
QuietStorm
11-05-2002, 09:23 AM
Made a button, but don't know where to put the link to take it to the next scene [quick sample of what i'm talkin about is attatched]. Know it's prolly something obvious, but it's late and i need sleep...
Thanks in advance,
QS
simontheak
11-05-2002, 09:55 AM
When you've put the button on to the main stage, right click it and choose actions.
You need to put a mouse event on the button ... something like
on (release){
}
In the middle of the curly brackets if you want to link to a URL you need getURL("http://www.yoursite.com") or
if it's just to another place in your movie then you need gotoAndPlay("scene name").
If you're coding this in normal mode though, then Flash will walk you through the various steps ... all you need to
do is fill in the various boxes
QuietStorm
11-05-2002, 10:15 PM
Hey, it doesn't work.. The button I made is actually a movie clip, with a button inside of it.. check out the attatchment again.. Since it was a movie clip, I cannot add an "on release mouse event" on it..
QS
Xansi
11-05-2002, 10:18 PM
put the action in the button, inside the MC, it should work :D
if your using flash5, then put the code simontheak gave you on the button inside the mc.
if your using mx, you can get rid of your button inside the mc and just turn the mc into a button itself. with:
mcInstancename.onRelease=function(){ trace("clicked me");};
lookit there, another fast typer i gotta watch out for...
QuietStorm
11-05-2002, 10:41 PM
Can one of you place the code in this example enclosed and post it.. I still can't seem to figure it out...
karlzoe
11-06-2002, 02:56 PM
hope this helps
QuietStorm
11-06-2002, 04:53 PM
Damn, I can't open the file. I'm using Flash 5. Can anyone else help me out?
Thanks, anyways,
QS
karlzoe
11-06-2002, 06:26 PM
the problem with your movie is that it does not work when it is previewed but it works when you actually accessed the buton within the movie clip.
i have found out that once the button is created as a movie clip first and then a button it does not work.
n. e way i have entered the action on the button to call the next scene.
as i said u have to get into the movie clip to access the button.
but to test it u can ONLY see it when enable simple buttons is engaged.
my advice to you is to create an empty movie clip
then creat a button (DO NOT CREATE IT AS A MC CLIP FIRST)
I noticed you created the button from a blank movie clip....this is the root of your problem. believe me i have been there 2
then by selecting the button you select the mouse events you wish
e.g
on (press) {
gotoAndPlay("Scene 2", 1);
}
sounds like i am bantering. i sure hope this helps
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.