|
-
Your code looks fine, but it seems to not work for some reason.
I got what I wanted by modifying your code into this:
Code:
import flash.display.*;
import flash.events.*;
var buttons:Array = [box1, box2, box3];
var current:MovieClip = null;
box1.addEventListener(MouseEvent.MOUSE_DOWN, buttonPress);
box2.addEventListener(MouseEvent.MOUSE_DOWN, buttonPress);
box3.addEventListener(MouseEvent.MOUSE_DOWN, buttonPress);
function buttonPress(e:MouseEvent):void{
box1.gotoAndPlay("clickthis");
box2.gotoAndPlay("clickthis");
box3.gotoAndPlay("clickthis");
box1.removeEventListener(MouseEvent.MOUSE_DOWN, buttonPress);
box2.removeEventListener(MouseEvent.MOUSE_DOWN, buttonPress);
box3.removeEventListener(MouseEvent.MOUSE_DOWN, buttonPress);
box1.addEventListener(MouseEvent.MOUSE_DOWN, buttonPress2);
box2.addEventListener(MouseEvent.MOUSE_DOWN, buttonPress2);
box3.addEventListener(MouseEvent.MOUSE_DOWN, buttonPress2);
}
function buttonPress2(e:MouseEvent):void{
if (current != null){
current.gotoAndPlay("out2");
}
current = MovieClip(e.currentTarget);
current.gotoAndPlay("over2");
}
Still no idea why your code won't work as it seems to make sense to me.
I have one problem though, not sure if you could help me with it, on my contact us page, I made a contact form, but for some reason I can't click in the input text boxes. I did embed the font already.
Any ideas?
Appreciate all your great help,
SK
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|