Tuesday, March 12, 2013

Assignment:

Assignment:
Original Tutorial:
The original tutorial that I used for this assignment was "Create a Glowing Mouse Trailer in Flash". I chose this tutorial as it was adaptable so I could put my own spin on it. Its easy guidelines had me away in no time. The aim of the tutorial was to create a mouse trailer so whenever your mouse would hover over the stage it would disappear and a glowing trailer would follow the path that your mouse would take. When I was looking for tutorials online pretty much all the tutorials used balls of white to crate an almost sparkle effect. I adapted my chosen tutorial to create a heart trailer on a black background, with a theme of pink and black. The effect works by firstly creating your chosen variable, for me this was heart:
var heart:Heart;
This is then followed by a constructor function which hides the mouse cursor when hovering over the stage and also starts the trailer process:
public function MouseTrailer():void
{
Mouse.hide();
stage.addEventListener(MouseEvent.MOUSE_MOVE, startTrailer);
}
The following bit of code I had to change as it didn't work the first time I tried to play the effect. The tutorial had created a private function so after playing around with it I realise the function should not have been made private:
function startTrailer(e:MouseEvent):void
{
For the rest of the tutorial it focussed on duplicating the heart whenever the mouse was moved and creating it's chosen position:
heart = new Heart();
heart.x = mouseX + Math.random() * heart.width;
heart.y = mouseY - Math.random() * heart.height;
addChild(heart);
heart.addEventListener(Event.ENTER_FRAME, animate);
function animate(e:Event):void
{
e.target.alpha -= 0.05;
if (e.target.alpha <= 0)
{
e.target.removeEventListener(Event.ENTER_FRAME, animate);
removeChild(e.target as Sprite);
}
e.target.scaleX -= 0.1;
e.target.scaleY -= 0.1;
e.target.y += 3;
}
}
}
}


My Finished Tutorial:


What I found difficult/easy:
The thing I found most difficult was changing up the code to make my finished effect work. It took a lot of concentration and playing about with the as file. I also had to add other code such as right hand brackets. Creating the background stage for my effect was probably the easiest thing as well as choosing the colour scheme. I liked that I changed it up completely by creating my own heart image on photoshop beforehand as I didn't want to do the generic sparkle effect:



What I learnt:
I learnt that the code in tutorials is not always right and adapting it to fit your own criteria can happen. I learnt how to hide the cursor from the stage and to create an ongoing effect and duplication of a movie clip. I also learnt that action script is not as difficult as it looks!

Dropbox Link!

Friday, March 1, 2013

Assignment:
Original Tutorial:
The original tutorial that I used for this assignment was "Changing colours using ActionScript". The tutorial was very easy to follow as it went through step by step guidelines to show you how to create a roll over mouse effect to show different colours appearing on a cascade of movie clips. It gives a file at the end of the tutorial and the sets of code you would need to enable a roll over colour effect when the mouse pans over a set of square buttons. The coding works in a simple way:
on (rollOver) { var colorful = new Color("_root.shapes"); colorful.setRGB(0x006699); }
The first line of the code shows that the following code will happen only when a mouse is hovering over the certain button. In the next line the code is telling flash to create a new colour object based on the movie clip "shapes". The final line shows the chosen colour value, this code changes for each colour button. Each colour has a specific hexadecimal value which is unique.

My Finished Version:


What I found difficult/easy:
I thought this tutorial would have been harder than it was. On paper it looked difficult but when I got down to it was was quite easy to mimic the tutorial. I did find it challenging at the start to attempt to find the hexadecimal value of each colour but I soon moved on from this issue by realising I could use the eyedropper tool which would give me the exact value for each colour button.

What I learnt:
From this tutorial I learnt, most importantly, that creating a simple roll over flash file is actually quite simple and not as daunting as I first thought. I am now able to take this effect and put it into practice. I am also able to find hexadecimal colour values easily.

Dropbox Link!