Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 08-01-2007, 12:58 PM   #1
little_prince41
Registered User
 
Join Date: Aug 2007
Posts: 15
Default combobox with timer delay

Hello;
i have three combobox, its is "c1" ,"c2"and "c3" ,Label in combobox one "0,1,2" ,Label in combobox two is "0,1,2" and Lable in combobox three is "0 ,1, 2", then select combobox one "0" and combobox two "1" and combobox three "0" and its go to distplay image"0.jpg" in 2 seconds and after then load image "1.jpg" in 3 seconds after then load image "2.jpg" how write actionscript?
i have three mediadisplay component is "d0","d1","d2",i want doing one frame only.
this code
Example
.................................................. ..................................................

LO = new Object();
LO.change = function(EO) {
c1Value = c1.getSelectedItem().label;
c2Value = c2.getSelectedItem().label;
c3Value = c3.getSelectedItem().label;
//call the checkValue function
checkValue();
};
function checkValue()
{

if(c1Value=="0"&&c2Value=="1"&&c3Value=="0")
{
//i want
_root.d0.loadMovie("0.jpg") display in 2 seconds
after then
_root.d1.loadMovie("1.jpg") display in 3 seconds

after then
_root.d2.loadMovie("2.jpg") display in 3 seconds
//
}

}
for (i=1; i<3; ++i)
{
_root["c"+i].addEventListener("change", LO);
}


.................................................. .................................................
this file fla(Example)
http://www.mytempdir.com/1377012


can help me.
little_prince41 is offline   Reply With Quote
Old 08-01-2007, 02:29 PM   #2
Continuity-B
Haute Pie
 
Continuity-B's Avatar
 
Join Date: Jul 2006
Location: Glasgow, Scotland
Posts: 304
Default

Something like this ?

ActionScript Code:
// all your stuff then... // define function to load image into a clip function loadThisHere(thisClip:MovieClip, thisImage:String) {     thisClip.loadMovie(thisImage); } if (c1Value == "0" && c2Value == "1" && c3Value == "0") { // calls function after delay and passes arguments     setTimeout(loadThisHere, 2000,_root.d0,"0.jpeg");     setTimeout(loadThisHere, 3000,_root.d1,"1.jpeg");     setTimeout(loadThisHere, 3000,_root.d2,"2.jpeg"); }

...any good ?
__________________
I'll pretend to be your friend like Louis Theroux
Continuity-B is offline   Reply With Quote
Old 08-01-2007, 04:20 PM   #3
Monster356
Registered User
 
Join Date: Jan 2007
Posts: 17
Default

is there even such thing as 'setTimeout()'?
Monster356 is offline   Reply With Quote
Old 08-01-2007, 04:28 PM   #4
Continuity-B
Haute Pie
 
Continuity-B's Avatar
 
Join Date: Jul 2006
Location: Glasgow, Scotland
Posts: 304
Default

Quote:
Originally Posted by Monster356 View Post
is there even such thing as 'setTimeout()'?
No I just made it up...

http://www.flashguru.co.uk/flash-8-settimeout
__________________
I'll pretend to be your friend like Louis Theroux
Continuity-B is offline   Reply With Quote
Old 08-01-2007, 10:05 PM   #5
Monster356
Registered User
 
Join Date: Jan 2007
Posts: 17
Default

Woah, thats pretty cool.

never heard about that before.
Monster356 is offline   Reply With Quote
Old 08-02-2007, 02:44 AM   #6
little_prince41
Registered User
 
Join Date: Aug 2007
Posts: 15
Default

Thanks you Continuity-B very much.
little_prince41 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

Similar Threads
Thread Thread Starter Forum Replies Last Post
timer to delay actionScript llyfre ActionScript 2.0 2 08-18-2006 12:45 PM
Still other delay problems mdrisser ActionScript 2.0 0 07-11-2006 10:42 PM
Set Timer to a movie clip, or delay. clip ActionScript 2.0 1 01-17-2005 01:29 PM
delay / timer cool denny ActionScript 1.0 (and below) 1 02-02-2003 08:30 PM
How do you create a delay timer in Action script? Scoopey ActionScript 1.0 (and below) 1 05-14-2002 08:33 PM


All times are GMT. The time now is 09:08 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.