The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 ViewsOk so i got my trial version of Flash professional cs4 fixed
I am working on doing my first animation and i need a little help with the play button
How do you get the play button to start the animation?
and do you have to do the script by hand or is there a way arouund scripting it?
You need to use actionscript for a play button, but it's really easy.
Make a circle, square or whatever, and put some text over it saying play or something. Then select all of it, right-click - convert to symbol - button. Name it whatever you want.
Then once you have your button, click it and go to the actions bar, at the bottom above the properties bar. Add this code:
on(release) { // this means when you release the button after a click
gotoAndPlay('scene _', _) // scene _ (insert which scene)', _(insert the frame you wish to go to)
}
Yeah... that's my sig :)
Oh and // means this part is just a comment, doesnt affect flash. Raw code is:
on(release) {
gotoAndPlay('scene _', _)
{
just replace scene _ with the scene, and the next _ with the frame you are going to.
Yeah... that's my sig :)
At 10/21/09 08:55 PM, XDuradinX wrote: Oh and // means this part is just a comment, doesnt affect flash. Raw code is:
on(release) {
gotoAndPlay('scene _', _)
{
just replace scene _ with the scene, and the next _ with the frame you are going to.
You forgot the semicolon after on(release)
and
I already had that, and when i check for errors it says no errors, but when i debug or test movie it says i do have errors.
1180: Call to a possibly undefined method on.
1120: Access of undefined property release.
It Keeps giving me those errors and idk why
Can anyone tell me how to fix that?
At 10/21/09 09:40 PM, Tryptamine420 wrote: 1180: Call to a possibly undefined method on.
1120: Access of undefined property release.
It Keeps giving me those errors and idk why
Can anyone tell me how to fix that?
Just use this code, shitloads easier for a beginner:
on(release, releaseOutside){
gotoAndPlay(nextFrame);
}
At 10/21/09 09:44 PM, uzi47 wrote:At 10/21/09 09:40 PM, Tryptamine420 wrote: 1180: Call to a possibly undefined method on.Just use this code, shitloads easier for a beginner:
1120: Access of undefined property release.
It Keeps giving me those errors and idk why
Can anyone tell me how to fix that?
on(release, releaseOutside){
gotoAndPlay(nextFrame);
}
Still doesn't work, it just keeps telling me the properties are undefined,
Just to check with everyone, are you guys giving me actionscript 2.0 codes?
becasue that may be the problem, i don't think it is based on the error message i'm getting, but it could be
The movie i am making is an actionscript 3.0 file
At 10/21/09 10:02 PM, Tryptamine420 wrote:
The movie i am making is an actionscript 3.0 file
Actionscript 3.0 files are only used for AS3. You can't place the codes in the buttons, or MC's. Only just frames, and .AS files
So switch over to an actionscript 2.0 file, and your problem will be resolved.
At 10/21/09 10:06 PM, uzi47 wrote:At 10/21/09 10:02 PM, Tryptamine420 wrote:The movie i am making is an actionscript 3.0 fileActionscript 3.0 files are only used for AS3. You can't place the codes in the buttons, or MC's. Only just frames, and .AS files
So switch over to an actionscript 2.0 file, and your problem will be resolved.
Thanks for the tip
I wish someone told me that before i spent two days working on an as3 file
At 10/21/09 10:11 PM, Tryptamine420 wrote: Thanks for the tip
I wish someone told me that before i spent two days working on an as3 file
Yeah, no problem.
When I started flash, I learned this the hard way,
Ok now i got the button set up, and i didnt have trouble with this when i was using an as3 file, but now i can't get the play text on my button to be part of the button, i don't know what exactly i did before
At 10/21/09 10:33 PM, Tryptamine420 wrote: Ok now i got the button set up, and i didnt have trouble with this when i was using an as3 file, but now i can't get the play text on my button to be part of the button, i don't know what exactly i did before
Can you expand on this?
You want your play text to be apart of the button?
Just double click the button.
And make a new layer, then insert the text.
Racecar is racecar backwards.
Who says you need to change to AS2 , if you have AS3 you might aswell use it
stop();
instancenameofbutton.addEventListener(MouseEvent.CLICK,fPlay,false,0,true);
function fPlay(e:MouseEvent):void {
play();
}
Put that in the frame with the play button in an AS3 document and change "instancenameofbutton" with whatever the instance name of your button is.
If you learn AS3 youll get more for your money , or in this case download tim ;)
nobody
Also, you don't need to scrap all work in the file just to change the actionscript settings.
Each time someone abuses hittest, God kills a kitten. Please, learn real collision testing.
At 10/22/09 08:30 AM, hdxmike wrote: Who says you need to change to AS2 , if you have AS3 you might aswell use it
AS2 is alot easier in first place.