Today we did a demo on how to create a motion tween to folow a tween path, you first create the path of what ever shape that you like, you then create a new layer and make a simple shape on it, the you double click on that shape and turn it into a movie clip giving it a tital of w/e you want, you then go onto its propertys and give it an instance name, then right click on the shapes layer and click add classic motion guid then move that layer into the motion guid layer, then you can get rid of the layer that the shame was originaly on , the doing it on 3 or more stanges you click down your time line and press F6 then move the shape to were ever down the line shape you want, you do this in stages till you get back to where you originaly started then this shape will follow that line round in a loop,
You then have to code the shape to come up with text saying HIT whenever you click on it you do this by clicking on the shape and going into cide snippets selecting actions, then click to hide object, you then type in this code ...
trace("HIT")
The next demo we did was to made a dot come in small then get bigger disapeare and then aprear and do the same again in a rondom place, to make the dot get bigger you first creat a small dot then make it a movieclip, then you jump into it go about 25 frame down the timeline press F6 then on the 25th frame make the dot bigger then create a classic motion tween, to make that dot apprear randomly create a long keyframe over about 50 frames then on the last 1 create a blank keyframe right click on that and go into action then type in this code ...
MovieClip(root).dot2.x=Math.random()*600
MovieClip(root).dot2.y=Math.random()*250
I enjoyed doing these demos was alot of fun, and i feel iv learn alot about flash and it is beginning to win me over, i will definatly be using this again, and i think i will find this peice of work very much usefull for in the future.
No comments:
Post a Comment