Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE FLASH: HomeFlash ForumFlash TutorialsFlash Video TutorialsWeb Streaming ForumAdobe FlashPodcast

5 seconds wait

Cow Forums : Adobe Flash

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>
5 seconds wait
by pbalmana on May 11, 2007 at 8:08:18 am

Hi

I'm working on a project with 4 characters. Each chapter you can play with a different character, but when two of the find each other in the story you can choose which character you want to continue playing with. Waht I'd like to know whether there is a way to wait around 5 or more seconds for the player to chooso the charater, and if he/she hasn't chosen it, the game will automatically choose the last character used.

I hope you understand my question. I'm not used to write in english.

Thanks for your help

pepi

Respond to this post   •   Return to posts index

Re: 5 seconds wait
by Jeff Penano on May 17, 2007 at 2:11:06 pm

I would use a setInterval to time the delay calling of a function.


var myInterval:Number;

myInterval = setInterval(autoSelect, 5000); //5000 ms = 5 secs.

function autoSelect(){
//(Select character based on predefined variable)
clearInterval(myInterval);
}

Respond to this post   •   Return to posts index

Re: 5 seconds wait
by pbalmana on May 17, 2007 at 2:19:30 pm

thanks for your help. I'll try it right away

Respond to this post   •   Return to posts index

<< PREVIOUS THREAD   •   VIEW ALL THREADS   •   PRINT   •   NEXT THREAD >>


FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]