Monday, January 05, 2009

Unable to transcode xxx.swf

Let me start by saying I’m an experienced Flex developer, but a Flash CS4 newbie.

I want to begin using Flash CS4 to create asset libraries that will be used to skin my flex apps. After creating a test swf containing some assets, I tried embedding the swf in a Flex 3 app and kept getting this error - “Unable to transcode xxx.swf.” I spent an entire day trying to resolve the problem. I searched the web for hours, but found nothing helpful.

Earlier, I installed the "Flex Skins" template into Flash CS4. I went back to that project hoping it would provide a clue. It was then I noticed the "linkage" column in the library panel. And that's how I learned the linkage on each individual symbol must be set as “Export for ActionScript” for Flex to find the symbol definitions.

Here's what messed me up...

Instead of just reporting that it can’t find the symbol definitions, Flex also reports that it can’t transcode the SWF. That led me to believe there was something wrong with the SWF. And off I went, on a wild goose chase looking for anything that would explain why flex could not embed the SWF. But in the end it was just a symbol definition problem.

I hope this helps save others hours of frustration!

6 comments:

Unknown said...

This saved me a big headache! I couldn't for the life of me figure out what was wrong with my .swf.

Thanks a bunch!

Anonymous said...

yes, is did help ;-)
thx

Unknown said...

You turned what could have been days of work into a few seconds. You made my day, at least. Thanks!

mathletics member said...

thx a lot for the hint.

I have experienced the same problem. In the end, I found it is because the filename is case-sensitive.

Once I have changed they are all fine. :D

Deviator said...

I received the same problem
i was using CS5 and compiled the FLA created the SWF which the FLEX was throwing an error - unable to transcode then i just edited the Publish settings which was targetted at flash player 10 i changed it to flash player 9 and then it worked.

I guess the issue has to do something with textField!! which i used which was TLF - flash player 10

Gui de Guinetik said...

One thing when exporting assets to using in flex is to change the linkage type.

You can go to actionscript settings on the publish settings window (the little wrench menu) and change default linkage to "Merged into code"