Loading and animating dynamic images in a Flash template

I’m having a problem with dynamic images loaded in flash, I need to animate them in the beginning (in) and in the end (out), along with text and BG imported from sequences of images, like a flash template (bottom third, basic and simple) . The problem is that I put any animation as a movement (classic interpolation), for example, at the beginning (In), I export in .ft and run on the CasparCG playout server. However, the changed dynamic image appears static and still until the end of the flash template.

Note, I did my flash template grinning the guide posted at this link: https://github.com/CasparCG/help/wiki/Guide:-Loading-Dynamic-Images-in-a-Flash-Template.

so I have a question that sums up my whole question: Does CasparCG not even support dynamic uploaded and animated images in the flash template?

If someone has a solution or a response that helps me solve the problem, I’ll be grateful !!

Short answer is yes.
It isn’t really CasparCG doing the flash animation but the flash player. If it works in flash - it works in CCG.

Do you have a sample to share that we can help with?

1 Like

Try wraping the UILoader in a MovieClip and animate that.

1 Like

Hi! Good afternoon!

the zip file as requested is attached in the link on the drive:


Hi! Good afternoon!
I tried to put the UILoader in a movieclip and also a symbol, but when I was exporting in .ft, it gave an error.

But thanks for the help!

I’ve tested this with your file.
If you insert the UILoader into a symbol it does animate as expected.
Make sure you nest all parts correctly.

Create a new symbol.
The symbol has a name, eg. classIcon
Insert your UILoader in to it.
The UILoader has an instance name eg. icon
Put an instance of the classIcon on your timeline.
The instance of classIcon has a name, eg. weatherIcon

Your SetData function should do:
weatherIcon.icon.source = element.data.@value.toString();



I tried it that way too, but it made a mistake in the code call, while exporting in .ft, maybe you mentioned the instance name in the .as code wrong, but I’ll follow it step by step.

Thanks a lot for the help!


As a rule: Whenever you put something into a movieclip, the name of the movieclip is added to the object’s name. Let’s say you have a textField called myText. Put it insife a movieClip named myMovieclip, in ActionScript to access for instance the text property of myText it reads myMovieclip.myText.text = “whatever”; This rule aplies for every container (movieclip) you wrap your stuf in. Ending in hugeMovieclip.bigMovieclip.smallerMovieclip.smallMovieclip.myTextfield.text=“blabla”; Do you see the pattern?

hello sir how can i do it

Can do what?

Hey, I’ve tried your option and still getting error: Line 22, Column 7 1120: Access of undefined property Logos.

And the code:

if (element.@id == “Team1Image”)
Logos.T1Logo.source = element.data.@value.toString();

Logos is symbol name, T1Logo is name of UiLoader

Because I’m using mask for logo i need to put in to the symbol or not?

You need to use the name of the instance of the symbol rather than the symbol name

1 Like

Hey, I’ll give a try for it. :wink:

For some strange reason my templategenerator does not output the .as parameters i am giving it. I have done both the dynamic image setup (TeamStatistics.as and weather.as) and both give me the right parameters at Temp. Gen.
A basic setup with a UILoader and a scriptfile.
The generator returns me following:

The CasparCG flash template was successfully created! You can find the .ft file in:

While the Weather returns the correct .as parameters

<instances><instance name="city" type="CasparTextField" /><instance name="term_MAX" type="CasparTextField" /><instance name="term_MIN" type="CasparTextField" /></instances>
<parameters><parameter id="localcityweather" type="string" info="File URL icon local weather" /></parameters>

have been searching for any clues without luck.
Does anyone here know what the issue might be?

The test project:

It helps beeing resiliant, i found the issue.


Document class did not point to the .as file. Note using the same setup as in the test project only the names that are different.

I had issues with versions of Animate, that forget the class setting after each compile. That’s why I still user Flash CC 2015 :slight_smile:

1 Like

Hehe, like the old one better myself. So i got the params through in TempGen. BUT, the XML string i am sending does not load the .png. Any ideas?

'CG 1-20 UPDATE 1 "<templateData><componentData id=\\"image1\\"> <data id=\\"text\\" value=\\"file:///M:/dennis.png\\"/> </componentData></templateData>\r\n'

[2019-06-20 15:20:59.411] [14472] [info]    Received message from CG 1-20 UPDATE 1 "<templateData><componentData id=\"image1\"> <data id=\"text\" value=\"file:///M:/dennis.png\"/> </componentData></templateData>\r\n
[2019-06-20 15:20:59.420] [4532]  [info]    flash[cg20.fth.1080p5000|5000] Invoking update-command: <invoke name="SetData" returntype="xml"><arguments><array><property id="0"><number>1</number></property></array><string><![CDATA[<templateData><componentData id="image1"> <data id="text" value="file:///M:/dennis.png"/> </componentData></templateData>]]></string></arguments></invoke>
[2019-06-20 15:20:59.437] [17188] [debug]   flash-player[cg20.fth.1080p5000|1920x1080] [command]      <invoke name="OnCommand" returntype="xml"><arguments><string>Command recieved @SetData@1@</string></arguments></invoke>
[2019-06-20 15:20:59.449] [17188] [debug]   flash-player[cg20.fth.1080p5000|1920x1080] [activity]     <invoke name="OnActivity" returntype="xml"><arguments><string>Command finished @SetData@1@</string></arguments></invoke>

Looks like a issue in the SetData i think?

And you are sure that the path to the file is correct and that the value of the field “image1” is sent to the source property of the UILoader?


Yes i think this is right, have been checking it multiple times.

I might be something inside my .fla, not sure. Seems pretty forward to me in the guides. I have the same issues with the TeamStatistics file in the guide. Cant load the pngs