homepage Welcome to WebmasterWorld Guest from 54.196.105.130
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

    
getURL() setTimeout(javascript:) issue
Lynque




msg:3846375
 2:07 pm on Feb 10, 2009 (gmt 0)

Hello All,
While using a getURL and then trying to call a js function I've run into a timing issue, my getURL needs to happen first and then I'd like to use a setTimeout to call the js function after 3000 milli's.

I'm not new to actionscript but could use some help on this one as I've been looking around the web for some examples and haven't found anything useful yet.

If anyone has any useful links or examples around this one it would be great if you could point me in the right direction.

Thanks

 

Lynque




msg:3846560
 6:20 pm on Feb 10, 2009 (gmt 0)

Ok see here is what I've come up with thus far:

onPress function(){
getUrl("http://mysite.com"+myPath);
}

onRelease function(){
getUrl("javascript:myJS();");
}

I'd like the onRelease to have the setTimout on it...

Any tips?

Lynque




msg:3846656
 8:50 pm on Feb 10, 2009 (gmt 0)

I answered my own question but thought I should share :)

onRelease = function(){
getURL("javascript:myJS();");
setTimeout(function(){getURL("http://wwwmysite.com"+myURL);), 1000);
}

Enjoy

[edited by: eelixduppy at 8:59 pm (utc) on Feb. 10, 2009]
[edit reason] disabled smileys [/edit]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved