Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-28-2012, 07:26 PM   #1
Bounty_y2k
Member
 
Join Date: Jun 2012
Posts: 74
Send a message via Skype™ to Bounty_y2k
Default Restart the timer

I know you have all seen this hundred of times but I just can't make it work :S
Its Flash 5.
ActionScript Code:
x = random(8) + 1; image = "a"+x; holder.attachMovie(image, "new1",5); gotoAndPlay(2); trace(image); i = 1; function wait() {  p = i++;     trace(p);     if(p == 5) {         clearInterval(myTimer);         x = random(8) + 1;         image = "a"+x;         holder.attachMovie(image, "new1",5);         trace(image);         gotoAndPlay(2);     } } myTimer = setInterval(wait, 1000);
As you can see it generates the random number,put an "a" in front of it and loads image under that name from library,then waits 5 sec and do the same..the thing is that I don't know how to restart the timer so it starts from 0 again and return at the begin of the function...I hope you understand what I mean

Another question..I have created an application for my nokia 7230 in flash 5 but i can't fscommand it to be fullscreen,can you help me out with this one too?

Thanks :P
Bounty_y2k is offline   Reply With Quote
Old 06-28-2012, 08:09 PM   #2
Prid
Prid - Outing
 
Prid's Avatar
 
Join Date: Oct 2009
Location: Halden, Norway
Posts: 1,191
Send a message via MSN to Prid Send a message via Skype™ to Prid
Default

ActionScript Code:
create(); function create(){     x = random(8) + 1;     image = "a"+x;     holder.attachMovie(image, "new1",5);     gotoAndPlay(2);     trace(image);         i = 1;     function wait() {      p = i++;         trace(p);         if(p == 5) {             clearInterval(myTimer);             create();         }     }     myTimer = setInterval(wait, 1000); }
__________________
I have returned, and am now 18
Prid is offline   Reply With Quote
Old 06-28-2012, 09:43 PM   #3
Bounty_y2k
Member
 
Join Date: Jun 2012
Posts: 74
Send a message via Skype™ to Bounty_y2k
Default

Hehe I was thinking about that 10 min ago... thanks,it works perfectly D
Do you have any idea how to make swf fullscreen on my phone?
Bounty_y2k is offline   Reply With Quote
Old 06-29-2012, 01:10 AM   #4
Prid
Prid - Outing
 
Prid's Avatar
 
Join Date: Oct 2009
Location: Halden, Norway
Posts: 1,191
Send a message via MSN to Prid Send a message via Skype™ to Prid
Default

Nope, sorry, haven't dealt with Flash on mobile devices
__________________
I have returned, and am now 18
Prid is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:50 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.