-
setTimeout not working
Any suggestions on why the timeout is not working on this? goal is for their to be 3sec pause before onMouseDown function is activated (code is on a frame inside mc1):
stop();
var wait:Number = setTimeout(_root.onMouseDown, 3000);
_root.onMouseDown = function(){
if (_root.mc32.currentframe != 17){
_root.mc1.play();
delete _root.onMouseDown;
}
}
-
Designer, Programmer, Musician
First of all, you keep forgetting the "_" underscore between "current" and "period":
_root.mc32._currentframe.
Second:
stop();
_root.onMouseDown = function()
{
var wait:Number = setTimeout(check, 3000);
}
function check()
{
if (_root.mc32._currentframe != 17){
_root.mc1.play();
trace("Sadasda");
delete _root.onMouseDown;
}
}
Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|