setTimeout in flash

#1
Hi
I have the following problem:
Im trying to make a banner with 3 textblocks (movieclips) that will loop forever.
I Flash I did actionframes where I used the following code
stop();
setTimeout(play,10000);
As a swf movie it runns just as it is supposed to but when I generate it to a template i get the following error
Scene 1, Layer 'labels', Frame 25, Line 2, Column 1 1180: Call to a possibly undefined method setTimeout.
Scene 1, Layer 'labels', Frame 76, Line 2, Column 1 1180: Call to a possibly undefined method setTimeout.
Scene 1, Layer 'labels', Frame 125, Line 2, Column 1 1180: Call to a possibly undefined method setTimeout.
I dont understand why this is happening and does anyone have a better solution how to get my banner to loop without making it a to a video. I need to run it for 10 hours so I would prefer to have it as a template even if it dont have any dynamic elements.

br markus

Re: setTimeout in flash

#5
markusnygard wrote:Hi
I have the following problem:
Im trying to make a banner with 3 textblocks (movieclips) that will loop forever.
I Flash I did actionframes where I used the following code
stop();
setTimeout(play,10000);
As a swf movie it runns just as it is supposed to but when I generate it to a template i get the following error
Scene 1, Layer 'labels', Frame 25, Line 2, Column 1 1180: Call to a possibly undefined method setTimeout.
Scene 1, Layer 'labels', Frame 76, Line 2, Column 1 1180: Call to a possibly undefined method setTimeout.
Scene 1, Layer 'labels', Frame 125, Line 2, Column 1 1180: Call to a possibly undefined method setTimeout.
I dont understand why this is happening and does anyone have a better solution how to get my banner to loop without making it a to a video. I need to run it for 10 hours so I would prefer to have it as a template even if it dont have any dynamic elements.

br markus
Try to add "import flash.utils.setTimeout;" (without quotes) before stop(); comnand

Who is online

Users browsing this forum: No registered users and 2 guests

cron