flash question

Status
Not open for further replies.

mitzi

Baseband Member
Messages
53
hi guys,

I was wondering if someone could answer a quick question. I've made a movie clip using flash. Basically it consists of 5 buttons (they're defined as movie clips however, not buttons)...When I roll over them, they get bigger, on roll out they go back to normal size.

I was wondering if there is a way to add a click state to them so that each one would have an assigned URL.

Forgive me if this is a completely silly question however I am only beginning.

Here is the ActionScript 3 code I have so far...

Code:
btn1.addEventListener(MouseEvent.ROLL_OVER, btnOver);
btn1.addEventListener(MouseEvent.ROLL_OUT, btnOut);


btn2.addEventListener(MouseEvent.ROLL_OVER, btnOver);
btn2.addEventListener(MouseEvent.ROLL_OUT, btnOut);

btn3.addEventListener(MouseEvent.ROLL_OVER, btnOver);
btn3.addEventListener(MouseEvent.ROLL_OUT, btnOut);

btn4.addEventListener(MouseEvent.ROLL_OVER, btnOver);
btn4.addEventListener(MouseEvent.ROLL_OUT, btnOut);


function btnOver(event:MouseEvent) {
	event.target.gotoAndPlay("over");
}

function btnOut(event:MouseEvent) {
	event.target.gotoAndPlay("out");
}
 
Code:
btn1.onRelease = function()
{
        getURL("http://www.example.com");
};

Make sure to use the full URL path not a relative path.
 
Status
Not open for further replies.
Back
Top Bottom