It is currently 28 Jun 2017, 20:19



setTimeout in flash

Videos, graphics, Flash templates – how to create and play them using CasparCG

Moderators: Macey, Jonas Hummelstrand, didikunz

setTimeout in flash

Postby markusnygard » 31 Oct 2016, 20:08

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
markusnygard
 
Posts: 64
Joined: 07 Mar 2013, 18:32
Location: Helsinki / Finland

Re: setTimeout in flash

Postby markusnygard » 31 Oct 2016, 20:13

And to explaine what im doing it is a graphical banner with 3 textbock that fades in, waits 10s, fade out. Its telephonenumbers for parcipating in a charity so that why I need that start/stop and loop forever
markusnygard
 
Posts: 64
Joined: 07 Mar 2013, 18:32
Location: Helsinki / Finland

Re: setTimeout in flash

Postby markusnygard » 31 Oct 2016, 20:53

and Im using Flash Professional CC 2014 and Template generator CC 2014 2.1CC
markusnygard
 
Posts: 64
Joined: 07 Mar 2013, 18:32
Location: Helsinki / Finland

Re: setTimeout in flash

Postby didikunz » 31 Oct 2016, 20:58

I would do that from ActionScript, see the section about advanced templates in the wiki. I would use a timer for this.
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests
User avatar
didikunz
 
Posts: 3480
Joined: 10 May 2010, 09:08
Location: Aarau, Switzerland

Re: setTimeout in flash

Postby Ultravibe » 24 Dec 2016, 08:58

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
User avatar
Ultravibe
 
Posts: 286
Joined: 11 Jan 2015, 09:05


Return to Content

Who is online

Users browsing this forum: No registered users and 2 guests

cron