AUTHOR

i'm so fucking pissed off right now

Smiley
YOU
Do you know actionscript 3.0?
raika quote:
Do you know actionscript 3.0?
yes. Sup?
FriendZone quote:
yes. Sup?
I'm fairly new at actionscript but I'm making a flash page with a basket movie clip that follows my mouse. The basket has a stop action on frame one so it stays there unless directed otherwise. Then I have a movie clip of a green berry that I made into a button (titled gb1). I need to make it so that when that is clicked it makes the basket go to the next frame (numbers change to show how many berries were collected). Here is my (unsuccessful) code as of now.


//1.
stage.addEventListener(Event.ENTER_FRAME,followBas ket);

//2.
function followBasket(event:Event):void {
var dx:int = basket.x - mouseX;
var dy:int = basket.y - mouseY;
basket.x -= dx / 5;
basket.y -= dy /5;
}

gb1.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownn);
function mouseDownn(event:MouseEvent):void
{
basket.gotoAndStop(basket.currentFrame + 1);;
}
ooh fun! brb
Smiley

Quick reply

Sign in to post a message.
Smileys

Times shown in Eastern Time (ET).