Hi guys,
I’m new here and very happy to be!
I’m a beginner in Flash, nevertheless my company gave me this widget to create.
It is basically done and I’m kind of happy with it but
- please go to
http://www.giuseppecraparottacv.co.uk/HTML/FLASH/mood-lighting.html
to understand what follows -
Click once on the button - click a second time - everything works fine until now.
Now click a third time. The lighting doesn’t go back to its original status, as wanted.
Fortunately if you click a forth time, you get what you wanted to get with the third click.
I give you an insight on the ActionScript. I coded:
[FONT=Courier New]
[FONT=Verdana][COLOR=Red]1)[/COLOR][/FONT]
on(release) {
gotoAndPlay(“10”);
}[FONT=Verdana]
for the button (not the frame) frame 1. 10 is the frame when the turn-light-down animation starts.
[/FONT][/FONT][FONT=Courier New][FONT=Verdana][COLOR=Red]2)[/COLOR][/FONT]
on(release) {
gotoAndPlay(“30”);
}[FONT=Verdana]
for the button (not the frame) in frame 30. 30 is the frame when the turn-light-up animation starts.
[/FONT][/FONT][FONT=Courier New][FONT=Verdana][COLOR=Red]3)[/COLOR][/FONT]
on(release) {
gotoAndPlay(“10”);
}[FONT=Verdana]
for the button (not the frame) in frame 50. 50 is the frame when the turn-light-up animation ends.
This third piece is intended to let the button trace the point - back in time - in which the light goes down. I wanted to create a button-activated loop with no interruptions.
So why does it take a forth click to have the light down again?
Thank you for your help,
Ray
[/FONT][/FONT]