Get Latest Nokia Press Release Click Here

Search in Site

Create Digital Clock In Flash Lite 2.0

Learn How To Create Simple Digital Clock In Adobe Flash Lite 2.0 AS2




It Has The Following Simple Step To Follow Carefully.

First Of You Need To Download Adobe Flash Cs3,Cs4, or Later Version Depends on You.
After Download & Install Open It. The Following Screen Will Appear If You Are Using Adobe Flash Cs3.
Fig 1

Select The Option Flash File(ActionScript 2.0) As Shown in Fig 1
After Click On It Your Screen Will Be Shown As.
Fig 2

There Are Two Buttons Shown In Property Tab "Size" And "Setting"
Click On Setting Button And Change The Version Flash Lite 2.0
Goto Size Button And Choose The Screen Resolution According To Your Mobile Screen Size.
After It Change The Name Of Layer From "Layer 1" To "DigClock". It Is Not Necessary To Change The Name Of Layer But It Becomes easy For Us To Identify The Area So I Recommand You To Change The Name
Now In That Layer Insert Four text Boxes for hours, Minutes, Seconds And Am/Pm.
In First text Box Goto Its property And Select "Dynamic Text" Type.
In Instant Name Write "hr_txt". See The Fig 3.


Fig 3

Now Follow The Same Procedure For other 3 text Boxes And Give The Following Names In Instant Name
mn_txt For minute Text Box
sc_txt For seconds Text Box And
ampm_txt For am/pm Text Box

Now Right Click On Layer And Insert A New Layer Named As "Action".
At This Layer Press F9 To Open The Action Tab.
In Action Tab Type The Following Text 
 time=new Date(); // time object
var seconds = time.getSeconds()
var minutes = time.getMinutes()
var hours = time.getHours()
if (hours<12) {
ampm = "AM";
else{
ampm = "PM";
}
while(hours >12){
hours = hours - 12;
}
if(hours<10)
{
hours = "0" + hours;
}
if(minutes<10)
{
minutes = "0" + minutes;
}
if(seconds<10)
   {
seconds = "0" + seconds;
}
hr_txt.text = hours;
mn_txt.text = minutes;
sc_txt.text = seconds;
ampm_txt.text = ampm;
Now At Both Layer Insert A frame Likewise Shown In Fig 4





























After It Just Publish Your Flash File From File Menu -->Publish And Save It Where You Want .
open The Save Swf File And See it.
To Use In Your Mobile Simply Copy It In Your Memory Card And On That File Choose Option --> Set as Wallpaper In S40 Mobiles
In S60 Mobile You Have To Use Animator For To Apply It As Wallpaper Or ScreenSaver

0 comments:

Post a Comment