Gina Gina - 1 year ago 272
ActionScript Question

Adobe flash professional color switch on frames

I need to make a simple app using adobe flash professional.

I have on frame 1 a red square and on frame 2 the same square blue.

When I press on that square I need to make the square blue, I mean I have to go to frame 2. This is like a color switch.
Do you have any ideea?
Thank you in advance.

Answer Source

On each of your frames ensure the code


has been added.

Then, in your first frame add:

function gotoFrame2(e:MouseEvent){

Inside your second frame under 'stop()' add:

function gotoFrame1(e:MouseEvent){

A safer option is to called you frames names in the properties panel, then in the gotoAndStop function you can call the string - this saves the potential glitches if you modify frame locations.



Good luck!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download