swf decompile

Hi All.

i am having swf file which shows me the Title of currently playing video by one application. i wanted to change the theme and design. but i am unable to write script for it. anyone help me to do it!

Thanks in advance… i decompiled the swf and get the following script but not getting if i done with new file.

Orignal file

decompiled script -

var Header; var Title; var TitleFont; var TitleFormat = new textformat(); _root.onenterframe = function () { if (_root._currentframe == 2) { txtHeader.text = Header; txtTitle1.text = Title; TitleFormat.font = TitleFont; txtTitle1.settextformat(TitleFormat); } };

Looking at the provided code, It looks like the swf use flashvars?

The Title is served to the swf by the html document. So you have a videoplayer in the swf together with some vars to handle the text.

Read this documentation on flashvars:
https://helpx.adobe.com/flash/kb/pass-variables-swfs-flashvars.html

Thanks… exactly what i though… but i created the Swf file. and try to integrate in appliocation but the script not working…

can we get the variable name from the above swf file or script from above file?

The variables seems to be Header and Title.

In theory flashvars should be very straight forward, (but I remember working on it for a whole day just to get it to work, and this was back in the days flash was widely spread).

There is SWFOjbect you could use instead, I think was more solid than the examples in Adobe documentation. Still, last update was 3 years ago:

Thanks Linusj, but problem is the application developed in VB. and dont know how he integrated the flash variables to be accessed. now only i can work with swf script by which it get update cant we use the script from the above file?

as i am not so familiar about action-script. i tried with copy of same script but its not working.

You should be able to use the same variables in the swf. The actionscript version is as2. There must be something broken in your decompile.

I can’t look at your swf and I dont have a swf decompiler. Do you have a .fla file? I think you can post it here on the forum. I currently only have flash CS5.

Sorry,
i dont have the fla. only have multiple swf files only… even i thought same. something broken in script. if you want i can post multiple swf files.

Oh, it looks like I have sothink swf decompiler after all. You can get a trial here.
http://www.sothink.com/product/flashdecompiler/?gclid=CNf6-tW-_MsCFSkocgodCTsF3Q

If you attach an SWF I can have a look at it.

in first post have posted the swf file. you can look into it. and thanks for your efforts…

Im not familiar with 4shared, and I’m not signing in or giving 4shared access to any personal account or email adress.

Could you post it in this thread?

unable to upload the file as i am new member . will upload it in different filehost server

download

@resact

The problem with the file was that the textlayers where not nested in any movieclip, just animated in the root. So whatever was passed to them was replaced at the first keyframe with the text set at that keyframe. Thats why there was an onEnterframe function. But the onEnterFrame didn’t find the text at frame 5. The keyframes where all but there.

So I removed the onEnterFrame function and set all vars in first frame. I don’t think the titlefont does anything? You might just want to remove it?

headerMC.txtHeader.text = Header;
titleMC.txtTitle1.text = Title;

//TitleFormat.font = TitleFont;
//titleMC.txtTitle1.setTextFormat(TitleFormat);

Try with this one…
Download

hi linusj,

your file is working in your html file but in that application its not taking the title of the song. somehere he setting or reading the variable from the application… any method we get before we assign ?

Ok, I had the same problem reopening the .fla file, so a bit strange.

I embedded the font and moved the assign of textfields to frame 5.

There is no method before. According to the documentation you should be able to use the variables as if they where declared on the first frame, but thats just in theory.

Try this one:
Download 2

1 Like

this works like charm… what was the issue?
and can you tell hw to create??? and based on this want to read the text from file

like

if Title ==1
play 1st line from txt file…
if Title==2
play second line

and so on…

hope you understand the logic

If you want to change the theme and design, you probably want to do that in adobe flash. (Nowadays I think they renamed it to animate CC?) The fla file you got with the download from me is a flash CS5 file. So you just open it in that program, CS5 or above, and edit the script and timeline.

There are free options, for example http://www.flashdevelop.org/ but I havent used that so much, since there was no mac support back in the days when I used to do flash. From what I understand there is not much of graphic representation in flashdevelop. But it is really good to code actionscript2 and actionscript3. Better than adobe flash.

Reading a textfile from as2, you can use this code:
https://www.kirupa.com/forum/showthread.php?376251-Read-text-file-and-use-variables

1 Like

@linusj: Thank you so much for the support and guidance which you given me. thanks alot.

i think in kirupa we dont have PM option.

Pretty sure these Kirupa Forums do have a PM option…

1 Like

yup… i didnt saw that one… thanks.

@linusj: Brother can you please re-up that flash file which you have made.The zip file is corrupted.

Thanks in advance.