Help - Search - Members - Calendar
Full Version: Tutorial | Creating A Flash Lite Clock
SE-NSE Forums > SE Firmware > Firmware Tutorials & Guides
Pages: 1, 2, 3, 4, 5
photographer
Creating a Flash Lite 1.1 clock!

Hello everyone!
On many requests I made this tutorial for creating a flash lite screensaver/wallpaper with a clock!
Things you will need:

-Adobe Flash
-Inspiration tongue.gif

BASIC CLOCK
1) Create a new flash document in resolution 176*220 (w810i w550i w600i) or 240*320 (w580i s500i w880i w850i w830i).

2) In the properties panel set the publish settings to Flash Lite 1.1

3) Set the background colour to any colour you want, most of you will set a nice picture in the background anyway.

4) Add a new layer and call it Time.

5) Make a textfield on the Time layer and type 99:99:99 and set the var to TIME
(the numbers dont matter, you can type anything you want)


6) Drag the box as far as needed till all text shows up.

7) Make a new layer and call it Action Layer.

8) Open up the actionscript panel and paste this code on frame 1 of the Action Layer:


CODE
fscommand2("GetLocaleTime", "TIME");

TIME_SEC = fscommand2("GetTimeSeconds");
// add leading 0 to hours
if (h<10) {h="0"+h;};

// add leading 0 to seconds
if (s<10) {s="0"+s;};

// add leading 0 to minutes
if (min<10) {min="0"+min;}


9) Go to the 2nd frame of the Time layer and press F5.

10) Go to the 2nd frame of the Time layer and press F5.

Press ctrl+ENTER and see laugh.gif ur done!

Final timeline layout:






ADDING A WALLPAPER!
1) Open the just created document
2) Go to the background layer and press CTRL+R
3) Import the picture you wish
(option! When the wallpaper aint the right size, use the Tranform tool to resize it to the wished format smile.gif )



ADDING A DATE!
1) Open ur just created document.
2) Make a new layer and call it Date, type any date you wish (like 99-aug-29)
3) Set the var of the Date layer to date
4) On frame 1 of the Action Layer paste this code above the previous code:

CODE
fscommand2 ("GetLocaleLongDate", "DATE");

5) Go to the 2nd frame of the Date layer and press F5

Done! laugh.gif

EMBEDDING A FONT!
1) Open the last created document
2) Select a textbox you created (the one with time or date)
3) Click "embed" in the properties panel

4) select the line 0-9 and type : in the box under it

5) Press ok!

ADDING NOW PLAYING SECTION!
(Thanks AKSHAY for this)
1.Create a new layer Music or XYZ.
2. Create three dynamic text boxes.
3. Set each text box VAR as TIME, ARTIST, ALBUM respectively.
4. Then add this code to the ActionScript layer or Same Music layer.

CODE
loadVariables("MP:",_root);
fscommand2 ("MP:", "TITLE");
fscommand2 ("MP:", "ARTIST");
fscommand2 ("MP:", "ALBUM");


Adding battery level, signal strength and volum level!
(Thanks DEATHNITE for this section smile.gif )
1) Battery level
CODE
batt = fscommand2("GetBatteryLevel");
batt_txt = batt add " %";
setProperty("batt_fill", _xscale, batt);


2) Signal level
CODE
sig = fscommand2("GetSignalLevel");
sig_txt = sig add " %";
setProperty("batt_fill", _xscale, batt);
/:sigframe = int(sig / 100 * 5 + 0.5);
tellTarget("sig_level")
{
    gotoAndStop(eval("/:sigframe") + 1);
} // End of TellTarget


3) Volume level
CODE
  vol = fscommand2("GetVolumeLevel");
vol_txt = vol add " %";


Done!
I hope you had fun!
Snowiffic
Hey Mate!!

Very good!

thumbsup.gif

I was looking for this, great tutorial.
I guess there will be 1000 clocks in a week lol.gif
photographer
thx smile.gif smile.gif

Have fun wink.gif

*still adding stuff*
paky
Great tutorial.. thanx thumbsup.gif

this is my first flash wallpaper blink.gif
photographer
oooh nice wink.gif You should set the quality of the wallpaper to 0 compression....

1) Double click the picture icon (to the left of the name of the background in the library)
2) Mess with the settings
paky
I have change the compression of movie, now it's to 100
Fus10n
verry nice! just need to try this out laugh.gif

thanks for this photographer!
photographer
My pleasure smile.gif
Good job on those wallpapers, paky!
guss
hey..i put one of ur clock on my nokia 6234 but the clock dont work
...why?
Snowiffic
QUOTE (guss @ 2007-08-25 12:18) *
hey..i put one of ur clock on my nokia 6234 but the clock dont work
...why?

Because this is a SonyEricsson forum tongue.gif
deathnite
haha, here comes my first flash wallpaper, looks better with the theme i got resized.

ikjadoon
Quick question. Do these work 'straight from the download'? Do I need to upload any .swf files and such?

~Ibrahim~
photographer
you need to upload the downloaded .swf into the images folder of ur phone
ikjadoon
QUOTE (Photographer @ 2007-08-28 14:55) *
you need to upload the downloaded .swf into the images folder of ur phone


That's what I thought. Thanks, they look pretty awesome!

~Ibrahim~
Carlosmarioagamez
I can use Flash wallpapers on my w600 =(
Btw, good work Photographer
Dr.Uberveguad
Congrats, great nub tutorials
missawackie
here is my first try Vistal.swf 176x220 tongue.gif
Dr.Uberveguad
Nince job missawackie
photographer
Thats pretty lovely missawacky!!! smile.gif
missawackie
thks to Photographer for the tutorial
Carlosmarioagamez
Somebody know how to set a flash like a wallpaper, in my stupid w600, when i choose the "use as wallpaper" the phone say currently unavaliable ¬¬, i tried to set like a wallpaper the sample file that come with the phone (Sinus.svg), and this is possible use like wallpaper, any ideas ?
missawackie
here is another simple clock V1s7A_CL0CK.swf 176x220

V1s7A_CL0CK.swf

@Carlosmarioagamez try to read swf file directly in browser or convert svg to swf
Carlosmarioagamez
I need convert swf to svg files, because i can set svg files like wallpaper, but no swf =(, searching now how to do this confused.gif
missawackie
okay try the old method
Carlosmarioagamez
Thanks, is the best way right now wink.gif
Greetings
Snowiffic
Hey, photographer, can you maybe add how to add battery charge and volume ? smile.gif


but mainly BATT smile.gif
photographer
Actually I'm still working on that sad.gif its quite hard... and school started again ^.^ Im trying
Snowiffic
QUOTE (Photographer @ 2007-09-22 11:15) *
Actually I'm still working on that sad.gif its quite hard... and school started again ^.^ Im trying

Oh okay, smile.gif

Thanks in advance laugh.gif
missawackie
for volume i think that it :

============= ADD VOLUME ==============

ActionScript:

vol = fscommand2("GetVolumeLevel");
/:vol_txt = "Vol: " add vol add "%";
if (vol == 0){/:vol_txt="";}

Variable:
/:vol_txt
deathnite
QUOTE (Mr. Thunderbird @ 2007-09-22 01:16) *
Hey, photographer, can you maybe add how to add battery charge and volume ? smile.gif
but mainly BATT smile.gif


1) Battery level
CODE
batt = fscommand2("GetBatteryLevel");
batt_txt = batt add " %";
setProperty("batt_fill", _xscale, batt);


2) Signal level
CODE
sig = fscommand2("GetSignalLevel");
sig_txt = sig add " %";
setProperty("batt_fill", _xscale, batt);
/:sigframe = int(sig / 100 * 5 + 0.5);
tellTarget("sig_level")
{
    gotoAndStop(eval("/:sigframe") + 1);
} // End of TellTarget


3) Volume level
CODE
vol = fscommand2("GetVolumeLevel");
vol_txt = vol add " %";
a_k_s_h_a_y
thumbsup.gif
Dr.Uberveguad
@Nkls, Photographer, Missawackie, or anyone else

Guys, I was wondering if some clocks doesnt work with you guys, as they dont for me.
Before the "vkp thing" all clocks were working fine here, after that a couple of my creating simply had stopped. The hours freezes, I dont know why.

Have you seen this with yours too ???
ikjadoon
How to make an analog flash lite clock:

link

~Ibrahim~
Tupactim
Would someone please make this picture into a swf clock with date please (as i dont have swf creating software )if you would please thanks guys!
missawackie
@Dr
maybe you use too much images in your gfx folder i don't have this problem but did you try to read it via file browser or as wallpaper ? you tried with analog clock ?

@ikjadoon
thanks i saw this tutorial but it seems complicated to me as my english sucks a bit tongue.gif

@Tupactim
i was looking for this image ! i made a simple one with too speakers and time here i'll try with this one thks thumbsup.gif

@nkls, Dr.U, Photographer or anyone
can someone explain me how to create analog clock plz ? i've tried to made one but it doesn't work sad.gif
Tupactim
QUOTE (missawackie @ 2007-09-29 16:35) *
@Tupactim
i was looking for this image ! i made a simple one with too speakers and time here i'll try with this one thks thumbsup.gif


Ive made a pack using the image i put above with flash menu theme and walkman skin with that image arcoss everything but id realy love to have that picture above as a flash one with time date and statusbar cos i thinkid look great!
ikjadoon
QUOTE (missawackie @ 2007-09-29 11:35) *
@Dr
maybe you use too much images in your gfx folder i don't have this problem but did you try to read it via file browser or as wallpaper ? you tried with analog clock ?

@ikjadoon
thanks i saw this tutorial but it seems complicated to me as my english sucks a bit tongue.gif

@Tupactim
i was looking for this image ! i made a simple one with too speakers and time here i'll try with this one thks thumbsup.gif

@nkls, Dr.U, Photographer or anyone
can someone explain me how to create analog clock plz ? i've tried to made one but it doesn't work sad.gif


Ah, sorry. Is getting the *.pdf file the hard part or understanding it?

~Ibrahim~
missawackie
@Ibrahim
understanding the tutorial of course lol although captcha code is case sensitive !

@Tupactim
with status bar ?? blink.gif
photographer
Ill try to make one soon when I have time wink.gif
Tupactim
@Tupactim
with status bar ??
Battery indicator and signal indicator probably should of said that sorry!!
a_k_s_h_a_y
where to download Adobe flash lite ??

can some one given the direct download link
am getting confused in that adobe wesbite..

and do i need to have flash professional 8 to download and install flash lite 2 ??

am a newb to this Flash and animation..
ikjadoon
OK, here is what I *think* they are asking you to do:

1. Open up clock_start.fla in the included zip package. This is the main base image. By clicking on the clock, you'll see a movie clip called mc_clock. If you open that, you will see that it consists of three layers. One for the background, one for the clock, and one for the ActionScript.

2. Now for putting in the real coding. On the action layer, click in frame 1. Add this code:



(Only the code, ignore that sentence, lol.)

Then add this code:



3. Now, we have a static image that tells the time. We need it moving or there is no fun to it. Now we need to loop it. So, add another frame to it. Ta-da!

4. That is basically it for getting the clock to move with the phone's time. If you want to add dynamic effects, like it changing colors during the day or night, there is more info on that, but I'm not sure if you want it as well.

But it looks freaking awesome! The new dynamic effect actually has the SUN MOVING WITH TIME. HOLY COW!

But yeah, this is it for the regular analog clock. Tell me if it made any "se-nse" whatsoever. wink.gif

~Ibrahim~

P.S. Stupid low-quality photobucket. If you can't read the equal signs, they look like dashes. So it is "hours = fscommand2...." Same thing for the next code section, it isn't "if (minutes -- 0)...", it is "if (minutes == 0)".
Dr.Uberveguad
@missa

Have you notice any problem with my SE-NSE wallpapers ??? I dont know why the digital clock is freezin on current time, for me at least. Im not sure for everyonelse.
missawackie
@Tupacim
oh okay it almost done
@all
but can someone help me : I want to add leading 0 to minutes and hours, i tried this
QUOTE
hour = fscommand2("GetTimeHours");
hour_txt = hour add ":";
if (hour<10) {hour_txt= "0"+hour;};


but it doesn't work. What's wrong ?

@Dr.U
no the only thing is when SE-NSE is setted as wallpaper it's a bit too fast, the phone can't handle the nice blinking of the logo well. that's all smile.gif

@aks_win
i'll try to send you my login to adobe site

@ikjadoon
thank you very much happy.gif
ikjadoon
Welcome! Hmm, I don't really know the answer to the leading zero question, I've never really coded before, lol...

Good luck with it, though!

~Ibrahim~
Tupactim
nevermind,,,,,,,,mods delete please sorry guys
Dr.Uberveguad
@missawackie
Here every wallpaper Ive made if they have analog clocks combined with digital and date and time when I test them into phone, only the digital clock freezes in the digital clock time.
missawackie
here is updated iClone flash wallpaper

i just removed seconds on time, i tried to make animation on the "slide to unlock" but i can't


iClone v1.1


i will soon post another one with the bounce gif Tupactim posted
missawackie

Boombass
Tupactim
QUOTE (missawackie @ 2007-10-01 17:20) *

Boombass


Thank you this looks brilliant!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.