free Learning design - Photoshop - 3D Max - Swish Max - Maya - Cinema 4D - Blender - anime Por Stidio

Sunday, November 25, 2012

Swishmax 4 Analog Clock


Graphics made in swishmax 4 using the vector tools, exported to png for use below. right click, save as.
Plate:
Hands:

First Of All:
Open swishmax 4 and set the movie properties to 390 x 375 frame rate 25.

Step.1
import the clock.png into your movie (File | Import To Stage | Image) or by clicking the  import image icon 
next split the hands.png into two seperate images using photoshop , fireworks, Ms Paint etc. save the fork asfork.png and the knife as knife.png
import both images to the stage. rotate the fork and knife images so they are facing 12 ‘o’ clock

Step.2
click on the clock.png and set the transformation point to center. see image below.

using the rulers drag out the vertical and horizontal rulers to cross through the center of the plate transformation point.
ignore all the blue lines in my image, remember mine is the vector version of the plate your wont have all the lines making it easier to see the transformation point. concentrate on the rulers in the image crossing the tranformation point of the plate image.
Step.3
click on the fork image and rename it fork rather than fork.png and make it a target.

make the transformation point of the fork to bottom center and place the image so the image transformation point is center on the rulers.
now do the same for the knife, rename to knife instead of knife.png make the transformation point to bottom center and make it a target, place the image transformation point central to the rulers.
Using the Rectangle Tool (R) create a seconds hand like in the example at the top of the page. name the shapeseconds_hand mark as a target and transformation point to bottom center. place the transformation point central to the rulers.
Step.4
Using the Text tool (T) create a dynamic text box mark it as a target and name it date_text, place the text box near the bottom of the plate.

now add the following code to Scene_1 of the movie.
1
2
3
4
5
6
7
8
9
10
11
12
onSelfEvent (enterFrame) {
      var currentTime:Date = new Date();
      var month:Array = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
      var dayOfWeek:Array = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
      date_text.text = dayOfWeek[currentTime.getDay()] + " " + currentTime.getDate() + " " + month[currentTime.getMonth()] +  " " + currentTime.getFullYear();
      var minutes = currentTime.getMinutes();
      var seconds = currentTime.getSeconds();
      var hours = currentTime.getHours() * 30 + currentTime.getMinutes() / 2;
          seconds_hand._rotation = seconds * 6;
          knife._rotation = minutes * 6;
          fork._rotation = hours;
}
http://www.swish-designs.co.uk/blog/wp-content/plugins/downloads-manager/img/icons/default.gifdownload: Swishmax 4 AS3 Analog Clock (59.61KB)
added: 02/01/2011
clicks: 96
description: swishmax 4 actionscript 3 analog clock source file *.swi Build Date 2010.11.02 

thats all, press Ctrl+T to test your movie, hopefully you will have something similar to my example at the start of the tutorial.

0 التعليقات:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Powered by zakaria m. mnefi زكريا مصطفى منيفي