Aug 11
We are currently working on a large project requiring hundreds of Flash assets. On of the requirements is to be able to detect the end of an animation; in Flash 8, you use _currentFrame == _totalFrames. This naturally has changed in AS3 to currentFrame == totalFrames. When using the AS3 notation (inside a Flex app) to examine the Flash 8/AS 2 file, both values come back null.
We discovered that some of them were published for Flash 8, and others for Flash 9. Problem....
ColdFusion to the rescue.
Rupesh Kumar, one of the Adobe engineers, happened to post about a month ago a snippet of Java code that extracted metadata from a SWF. Combining this w/CF yielded the following script, which I was able to pull directly into Excel.
<cfset dir = "D:/workspace/eclipse3.3/farcry_demo/www/courses/assets/VangentAssets/" />
<cfset filter = "*.swf" />
<cfdirectory name="qDir" action="list" directory="#dir#" filter="#filter#" recurse="true" />
<table>
<tr>
<th>File</th>
<th>Is Compressed</th>
<th>Frame Count</th>
<th>Frame rate</th>
<th>Version</th>
<th>Height</th>
<th>Width</th>
</tr>
<cfoutput query="qDir">
<cfset filePath = qDir.directory & "\" & qDir.Name />
<cfset filePath = replace(filePath, "\", "/", "all") />
<cfscript>
fis = createObject("java", "java.io.FileInputStream").init( "#qDir.directory#\#qDir.Name#" ) ; // Create the FileInputStream
decoder = createObject("java", "macromedia.swf.TagDecoder").init(fis); // create TagDecoder
header = decoder.decodeHeader(); // Decode the header.
fis.close();
rect = header.size;
</cfscript>
<tr>
<td>#qDir.directory#\#qDir.Name#</td>
<td>#header.compressed#</td>
<td>#header.framecount#</td>
<td>#header.rate#</td>
<td>#header.version#</td>
<td>#rect.getHeight()#</td>
<td>#rect.getWidth()#</td>
</tr>
</cfoutput>
</table>
<cfsetting showdebugoutput="false" />
May 15, 2009 at 4:23 AM I still think PHP has a major role to play in the future, with PHP5 object oriented and great features like SimpleXML - http://file.sh/XML+torrent.html. IMHO I see PHP scripts for frontend apps and RoR apps for all the backend stuff, and that’s what I’am actually trying to do at work.
Mar 8, 2011 at 3:45 AM I’m pleased I found this weblog, I couldnt discover any info on this subject matter earlier to. I also operate a site and if you want to ever severe in a little bit of guest writing for me if possible really feel free to let me know, i am usually look for people to check out my site.
Mar 8, 2011 at 3:45 AM I’m pleased I found this weblog, I couldnt discover any info on this subject matter earlier to. I also operate a site and if you want to ever severe in a little bit of guest writing for me if possible really feel free to let me know, i am usually look for people to check out my site.
Apr 18, 2011 at 4:09 AM I’m pleased I found this weblog, I couldnt discover any info on this subject matter earlier to. I also operate a site and if you want to ever severe in a little bit of guest writing for me if possible really feel free to let me know, i am usually look for people to check out my site.Hey, appreciate it for taking the effort to do this. I like your webpage, although it took a sluggish reader like me some time to via throughout entire page and the many comments.
Jul 30, 2011 at 9:22 AM According to my exploration, billions of persons on our planet get the <a href="http://bestfinance-blog.com">loans</a> at different creditors. So, there's good possibilities to get a short term loan in all countries.