Skip to main content
Known Participant
April 24, 2015
Answered

Im new to Actionscript 3.. when i clicked the green circle it turns into red and i want it to stay that way?

  • April 24, 2015
  • 1 reply
  • 928 views

Im new to Actionscript 3.. when i clicked the green circle it turns into red and i want it to stay that way but it wont saved.I dont know but the color wont saved help anyone?... but its flushing.

the instance name for the movie clip is green


heres the source code

var myS:SharedObject = SharedObject.getLocal("sdsds");

var my_color:ColorTransform = new ColorTransform();

my_color.color = 0xFF0000;

green.object = myS.data.me;

green.addEventListener(MouseEvent.CLICK... myClick);

function myClick (e:MouseEvent):void{

trace("I was clicked!");

green.transform.colorTransform = my_color;

trace(myS.flush());

}

trace(myS.data.me);

This topic has been closed for replies.
Correct answer kglad

use:

var myS:SharedObject = SharedObject.getLocal("sdsds",'/');

var my_color:ColorTransform = new ColorTransform();

my_color.color = 0xFF0000;

if(myS.data.my_color){
green.transform.colorTransform=my_color;
}

green.addEventListener(MouseEvent.CLICK,myClick);

function myClick (e:MouseEvent):void{

green.transform.colorTransform = my_color;

myS.data.my_color=true;

}

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
April 24, 2015

use:

var myS:SharedObject = SharedObject.getLocal("sdsds",'/');

var my_color:ColorTransform = new ColorTransform();

my_color.color = 0xFF0000;

if(myS.data.my_color){
green.transform.colorTransform=my_color;
}

green.addEventListener(MouseEvent.CLICK,myClick);

function myClick (e:MouseEvent):void{

green.transform.colorTransform = my_color;

myS.data.my_color=true;

}

Known Participant
April 24, 2015

can you tell me how to make it a save file in flash  so it can trace it?

Known Participant
April 30, 2015

it's an on-stage textfield to give the user feedback.


kglad thnx for always replying. Right now my groupmate is reviewig on how to code the database he was the one who ask on the last reply.

we still dot know where to code weve been searching for a tutorial on youtube.

Can you tells us where?

heres what i do.

1) Open adobe flash professional cs6

2) Create new adobe air

3) where do we code now? thnx