Copy link to clipboard
Copied
I'm trying to change the alpha value when you click on the green circle, when I put this code into the timeline it works perfectly. But when I put it into an as file it wont work, can anyone tell me what I'm doing wrong?
Thanks
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class Circle extends MovieClip {
public function Circle() {
// constructor code
myGreenCircle.addEventListener(MouseEvent.CLICK, doClick);
}
function doClick(e:MouseEvent):void
{
myGreenCircle.alpha = .5;
}
}
}
Copy link to clipboard
Copied
is the Circle class being callled? (use the trace function to confirm.)
if it is, are you seeing any errors?
Copy link to clipboard
Copied
The files can be downloaded here.
Copy link to clipboard
Copied
you'll need to wait for someone else to download and correct your files if you can't use forum help.