Copy link to clipboard
Copied
I have created a simple animation in the fist scene that goes to a navigation screen and stops. When the user clicks on the first button "Try Surfing Animation" it should go and play scene 2 which I have called TrySuf. I do not know why this code does not play on scene 2. I am using Adobe flash. I am using AS3 code. I have shared the file on my google drive. Please let me know if you cannot access it from google drive as I find an alternative way of demonstrating my file. Any help will be much appreciated.
https://drive.google.com/open?id=1lz1aaXx3RUjOQep9o8fna2-3Shpp-Yc8
Thank you in advance
Thanks!
The problem it's because you don't have a code to make your button do what you want.
In the last frame of your first scene, where there is a stop() function, replace the code there with this one:
import flash.events.MouseEvent;
function clickHandler(e:MouseEvent):void
{
gotoAndPlay(1, "TrySurfing");
}
stop();
surfButton.addEventListener(MouseEvent.CLICK, clickHandler);
In the last frame of the second scene, the one with the surfing animation, put this code:
...gotoAndPlay(11); // if you want to cr
Copy link to clipboard
Copied
Hi.
Please set your file sharing options to public so we can see what's going on.
Regards,
JC
Copy link to clipboard
Copied
Hi,
I have given anyone who has the link, full access, let me know if this is okay?
google drive does not always behave the way I want it to.
https://drive.google.com/file/d/1lz1aaXx3RUjOQep9o8fna2-3Shpp-Yc8/view?usp=sharing
Thank you
Copy link to clipboard
Copied
Thanks!
The problem it's because you don't have a code to make your button do what you want.
In the last frame of your first scene, where there is a stop() function, replace the code there with this one:
import flash.events.MouseEvent;
function clickHandler(e:MouseEvent):void
{
gotoAndPlay(1, "TrySurfing");
}
stop();
surfButton.addEventListener(MouseEvent.CLICK, clickHandler);
In the last frame of the second scene, the one with the surfing animation, put this code:
gotoAndPlay(11); // if you want to create a loop for the surfing animation
OR
This one:
stop(); // if you want to stop the animation on the last frame.
By the way, very cool animation! Well done!
I hope it helps.
Regards,
JC
Copy link to clipboard
Copied
Strange, I thought I had put code on the work but the link on google drive had no code. Anyway there was a problem in the code which is now solved.
Thank you ever so much.
Copy link to clipboard
Copied
You're welcome!
Copy link to clipboard
Copied
hi .
i have a problem in action script coding.
when i create a button in scene 2 or 3 in my projects adobe animate show this error :
while i set instance name !!
this code is ok in scene 1 but in other scenes show erro!!
Copy link to clipboard
Copied
Hi.
Are you using the 2019 version?
Please try disabling the advanced layers mode in the document settings (Ctrl/Cmd + J) and see if it will work.
Regards,
JC
Copy link to clipboard
Copied
I am using Adobe Animate CC 2019.
Copy link to clipboard
Copied
Hi.
Have you tried disabling the advanced layers mode in the document settings (Ctrl/Cmd + J)?
Please try this and see if it works.
Regards,
JC
Copy link to clipboard
Copied
Thanks
Copy link to clipboard
Copied
I have same problem. My buttons don't work or the same error comes.
But my projects work on the previous versiyon animate CC, I have updated, so ıt didn't work.
Is there any changing settings.