How do I add ENTER_FRAME to a button?  
Author Message
joe





PostPosted: 2008-6-10 23:11:22 Top

Flash, How do I add ENTER_FRAME to a button? I have a function called openPortfolio() that I want to rotate an
object called portfolioRing_mc to 65 degrees, in 5 degree increments.
I want to call the function on a mouse click. I can get it to jump to
65, but I don't know how to get it to do it in 5 degree increments.
What I want is an ENTER_FRAME event that is activated by a CLICK
event. I can't seem to figure out how to do it. Any help would be
appreciated.

Here is what I have so far:

function openPortfolio (event:MouseEvent):void {
while (portfolioRing_mc.rotation != 65) {
portfolioRing_mc.rotation += 5;
}
}
portfollio_btn.addEventListener (MouseEvent.CLICK, openPortfolio);

BTW I'm new to Actionscript 3.