This second studio course in design for interactive media introduces us to the language and concepts behind Adobe Flash Action Script. Action script represents one of the many tools used in web site construction and navigation for user interactivity. Each student will integrate line art, photographs, animation, video and sound to produce a final project which makes use of the tools and concepts covered. Critical analysis of work in the field will also provide topics for discussion.
Prerequisite: Art 341
Homework assignments are given on each Wednesday. Unless otherwise noted they are due on the following Monday.

Suggested texts:
*ActionScript 3.0 for Adobe Flash CS3 (or 4) Professional-
Classroom in a Book
Flash CS3 (or 4) Professional Advanced- Visual Quickpro
Guide
H.O.T. Hands on Training Action Script 3.0 for Adobe CS3
Pro- Lynda.com

Thursday, January 21, 2010

Code to leave & re-enter frame

Hello there.
Here is the code to make your mc. move out of frame (right) and come back in on the left. I used the ship fla. These x numbers work for me- the ship leaves the frame, there is a little pause and then it enters again on the left. Your numbers may be different depending on where the registration point is on your mc. You might also play with the 'speed' it travels (below it moves 2 pixels every frame)
Ahoy!
L

addEventListener(Event.ENTER_FRAME, shipMove);

function shipMove(e:Event):void
{
if (newboat_mc.x < 700)
{
newboat_mc.x += 2;
}
else
{
newboat_mc.x = -150;
}
}

No comments:

Post a Comment