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.
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); } };
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.
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?
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.
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.