View Full Version : [Q] Can you distinguish the SWF created in Flash IDE and in FlexBuilder???
CyanBlue
09-09-2009, 08:49 PM
I was just curious to know if there is a way to distinguish the SWF created in Flash IDE and one created in FlexBuilder??? My guess is that it'd be no, but I'll ask anyways... ;)
Thanks...
wvxvw
09-09-2009, 08:58 PM
Post an SWF and I'll tell ya :p
Well, in fact you can compile an SWF from Flex that will look pretty much the same as Flash IDE SWF, but you will have to put a lot of efforts into it, and, some in special cases that will be a lot-lot of efforts :)
The other way around is also true. Meaning, there are things only Flex can do, and there's no way to get that from Flash, unless you edit SWF by hand after you compile it.
CyanBlue
09-09-2009, 09:09 PM
Are you talking about decompiling the SWF and check out the classes in it to see if thre is any Flex related ones there???
I got curious because I am currently porting the Flash app to work in Flex one, and I got to the point where I am able to generate the SWF in FB... The only problematic area is where Flex one added up like 100kb more in size but I am going to deal with that later cuz some of those might be the ones from the duplicate assets which I forgot to take out...
senocular
09-09-2009, 09:16 PM
You should be able to. I'm pretty sure only Flash includes the DefineSceneAndFrameLabelData SWF tag
senocular
09-09-2009, 09:18 PM
Are you talking about decompiling the SWF and check out the classes in it to see if thre is any Flex related ones there???
I got curious because I am currently porting the Flash app to work in Flex one, and I got to the point where I am able to generate the SWF in FB... The only problematic area is where Flex one added up like 100kb more in size but I am going to deal with that later cuz some of those might be the ones from the duplicate assets which I forgot to take out...
That's likely just overhead of the flex framework.
wvxvw
09-09-2009, 09:23 PM
Nope, you can compile pure AS3 project from Flex, and it will look almost very much the same as Flash untill you do something of these:
- embed binary data (Flash cannot do it).
- embed any resource by using [Embed] tag.
Now, what Flex compiler can do and Flash cannot:
- all sorts of custom metadata.
- write some strange tag that must be a compilation timestamp or UID of some sort, this one is undocumented but seem to dissapear from non-incremental compilation.
What Flash compiler can do and Flex cannot:
- embed video.
- write some tags like DefineBitsJPEG4 etc. (Embeds images differently).
- write some special tags for timeline placed items like static text, and some sort of Shape-relative class that is used to represent images placed on the timeline.
- More formats for embedding sounds.
Not sure if I listed it all, but that's what I could remember for now :)
CyanBlue
09-09-2009, 09:30 PM
Awesome stuff from the simple question... Thanks, guys... ;)
senocular
09-09-2009, 09:38 PM
I just compiled two SWFs, one from Flash and one from Flex. Each are bare minimum, empty, Sprite-based document class AS projects and got the following:
Flex (3.3):
FileAttributes (69)
Metadata (77)
ScriptLimits (65)
DefineBitsJPEG4 (9)
Unknown tag (41)
FrameLabel (43)
DoABC (82)
SymbolClass (76)
ShowFrame (1)
EOF
Flash (CS4)
FileAttributes (69)
Metadata (77)
DefineBitsJPEG4 (9)
DefineSceneAndFrameLabelData (86)
ShowFrame (1)
EOF
wvxvw
09-09-2009, 10:18 PM
Hm... I must have mixed something up, because I was sure Flex doesn't write DefineBitsJPEG4 tag... Good to know.
Ah and CS4 now writes Metadata by default? Well, that's weird :)
CyanBlue
09-09-2009, 10:22 PM
Hm... How did you get that lise, senocular???
wvxvw
09-09-2009, 10:50 PM
Sorry, this wasn't addressed to me... but, hey, you could know better ;)
http://www.senocular.com/flash/actionscript.php?file=ActionScript_3.0/com/senocular/utils/SWFReader.as
And this one is mine...
http://code.google.com/p/e4xu/source/browse/trunk/src/org/wvxvws/encoding/SWFTagReader.as
I really needed it to only read metadata, but there's an option to get the names of tags too...
senocular
09-09-2009, 11:19 PM
Ah and CS4 now writes Metadata by default? Well, that's weird :)
Yeah, its the XMP stuff - they have an option to turn this off in the publish settings, but its on by default.
wvxvw
09-10-2009, 12:00 AM
It was off by default in CS3... One can also turn it off in Flex, but that takes quite some time to figure out it's there... so, most flex projects I've seen so far have a default author and additional ~6K of not very valuable info :)
senocular
09-10-2009, 12:03 AM
I always try to turn it off when I remember to. I have no need for it, though I guess it has potential in terms of ID and SEO. Meh ; )
CyanBlue
09-10-2009, 02:26 PM
Thanks, guys... ;)
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.