Posts Tagged ‘Learning’

Exercise 1 part 2

Flash, Learning | Posted by antirealism
Jan 10 2009

After my last exercise I have been playing with the Mouse events, trying to get multiple objects to move around the stage.
Just by repeating the exercise 1 code and changing the movie clips names. also on this stage I have one of the object move in a different way.
I used a RollOver event. This makes the object move as the cursor goes over it.

Here is the code.

Square_mc.addEventListener(MouseEvent.ROLL_OVER, onRoll);
function onRoll(event:MouseEvent):void
{
event.target.x += 10
event.target.y += -25
event.target.rotation += -11;
}
Square_mc.buttonMode = true;
Tri_mc.addEventListener(MouseEvent.CLICK, onclicked);
function onclicked(event:MouseEvent):void
{
event.target.x += -5
event.target.y += 20
event.target.rotation += -10;
}
Tri_mc.buttonMode = true;
Str_mc.addEventListener(MouseEvent.CLICK, onclick2);
function onclick2(event:MouseEvent):void
{
event.target.y += -10
event.target.x += -10
event.target.rotation += -11
}
Str_mc.buttonMode = true;
Square2_mc.addEventListener(MouseEvent.CLICK, onclick3);
function onclick3(event:MouseEvent):void
{
event.target.x += 10
event.target.y += -40
event.target.rotation += -11;
}
Square2_mc.buttonMode = true;

In the next exercise I will be learning about keyboard events and how make object move by using the KEY_UP and KEY_DOWN properties.
also going to try making a return code for the Roll_Over event.
:)

Once again wish me luck…..

Share and Enjoy:
  • Twitter
  • Facebook
  • Google Bookmarks
  • Print
  • del.icio.us
  • RSS
  • email
  • Digg
  • StumbleUpon
  • Live
  • Ping.fm
  • Slashdot
  • MySpace

Excercise 1

Flash, Learning | Posted by antirealism
Jan 09 2009

In this exercise, i am learning about mouse events and functions, how to move a object with a mouse click . I have chosen to move the object (square) up 25 and sideways 10 with a rotation of 11 degrees. now i no this in my next one i am going to see if i can make muliple objects move on the stage :)
(Wish me luck)……

Square_mc.addEventListener(MouseEvent.CLICK, onclick);

function onclick(event:MouseEvent):void

{
event.target.x += 10
event.target.y += -25
event.target.rotation += -11;
}
Square_mc.buttonMode = true;

more to coming soon ..

Share and Enjoy:
  • Twitter
  • Facebook
  • Google Bookmarks
  • Print
  • del.icio.us
  • RSS
  • email
  • Digg
  • StumbleUpon
  • Live
  • Ping.fm
  • Slashdot
  • MySpace

Flash and what I am doing…

Flash | Posted by antirealism
Jan 05 2009

hello and welcome to my blog on flash

I am currently going throw a few tutorials in flash, learning about how to use action script 3.0.

Hopefully I can  post my exercises here in this section, for every one to play with and test ….



Share and Enjoy:
  • Twitter
  • Facebook
  • Google Bookmarks
  • Print
  • del.icio.us
  • RSS
  • email
  • Digg
  • StumbleUpon
  • Live
  • Ping.fm
  • Slashdot
  • MySpace