FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Flash Timer





Dark-Tech
im trying to make a pretty dimple flash game- aka most of the elements are being designed to make future projects easier...

im trying to make a background that moves around its about 2X as high and 2X as wide as the visible flash area.

i want to get it to do a simple; hopefully simple movement to the right then up then left again and repeat


so i figured im gona need a timer cause a straight out while loop causes an infinite loop aka macromedia crashes

so what would the code look like for this project
eepman
make it its own movie clip. Then make a path for it to follow and do a tween on the path so it follows it. Then when you need another just make a level 2 mc and do the same thing with another bg and/or path. Then just set it to play and actionscript the last frame to repeat. Very Happy Very Happy
Dark-Tech
it could work but i was looking for a timer cause its more versatile like i was eventually planning on having two of them ovverlapping like they both move up at an angle and when the firstone goes off the screen it goes back down to where the secound one began so its a smooth trasition and prevents any skips or jumps in the background
Sappho
Isnt it shame that i am the only one good with Actionsript here? Or it just seems so, and others dont even try to help. Rolling Eyes

Anyway timer code for Actionscript looks like this:
Code:

var timerID : Number;

function timerCallback():Void {
  // Put ur code here
}

timerID = setInterval(this, "timerCallback", 20);


Where 20 is interval in miliseconds setting how often our Callback is going to be called.

Anyway its possible to do with movieclips without timer as eepman said, if u do it right there will be no skips or jumps.

Sappho the Flash Goddess Wink
Related topics
100 $Frih - Make a flash video for my site
Cool Flash Web-Site
Flash MX
Flash Alternative
Flash Logos, Banners and Intros, Free &also available fo
Simple or Bulky/Heavy ?
best flash template website..?????!?
Flash resources
Create flash text or flash logo with tools
Request For Flash Intros.
php and mysql connection in flash based website
Fatster flash loading.
Flash MX 2004 Tutorials
flash
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.