Noobish question...beyond belief ^_^
Basically, I am really new to ActionScript ![]()
I have tried to Google this but all results are for resetting variables, fields and other code-related things. I am trying to find an answer via the animation part of Flash for this question:
How can I restart my animation? (well, the file anyway.)
I mean, pretty much like closing+opening the file again, you know.
Secondly, um, (since I am new to ActionScript this is gonna be really bad code ^_^) why isn't this code working?
var has_pressed:Boolean;
has_pressed = false;
Button1.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
function fl_MouseClickHandler(event:MouseEvent):void
{
has_pressed = true;
}
if(has_pressed == false)
{
stop();
}
The stop(); part of it works fine!
But even when I click on Button1, it still stops the animation
, or at least it isn't working.
That code is supposed to basically stop the animation until the button is pressed.
Um, I guess there might be another way to do it, but it practically is a 'play' button.
Either my code is wrong, or the entire idea is wrong.
Thanks to answerers of both my messages! (PS: I do know C# and JavaScript so I am not a complete noob at coding - just Flash is a new experience)
Many thanks indeed!