Loading and animating dynamic images in a Flash template

playout
server
client
flash
template

#1

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 !!


#2

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?


#3

Try wraping the UILoader in a MovieClip and animate that.


#4

Hi! Good afternoon!

the zip file as requested is attached in the link on the drive:
https://drive.google.com/open?id=1iq3Zu2owjlf9fRimWjs4bsz3SZn75m9_

Greetings,


#5

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!


#6

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();


#7

Hi!

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!

Greetings,


#8

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?


#9

hello sir how can i do it


#10

Can do what?


#11

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?


#12

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


#13

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


#14

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:

<components></components>
<keyframes></keyframes>
<instances></instances>
<parameters></parameters>
 </template>
-----------------------------------------------------
***Info***
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:
https://drive.google.com/open?id=13Ay3bXiJwExAQUqANJ4KDcAgggWDIbhu


#15

It helps beeing resiliant, i found the issue.

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.


#16

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:


#17

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 127.0.0.1: 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?


#18

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?


#19

img2

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


#20

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

https://drive.google.com/open?id=1Id_L6tfr1KesE0CSzajDodk1Q5qLgUO9