Copy link to clipboard
Copied
I have a compiled SWF that I can't convert to a newer ActionScript 3.0 format. Anything that I try breaks the file. It is basically just an animation with a tad bit of code on the Movie Clips. I can't seem to identify the culprit that causes the newer files to generate with errors so I have decided to use the load method to load the ActionScript 1/2 format into an AS 3.0 container. This still does not work for generating APK's directly.
However when I generate a desktop AIR file it plays just fine.
Is there a way to take the AIR file and convert it to an APK using the command line? I have heard of using adt on the command line but most posts speak of converting SWF's directly. I would like to try it with the already-compiled AIR file. If I use the SWF I might as well compile that into a non-functioning APK directly from Flash. That's not what I'm looking to do.
Any help is greatly appreciated.
you shouldn't "import" a swf. you should load it.
you may still have problems loading it but, you're sure to have problems if you import it. (ie, no actionscript will execute in the imported swf.)
Copy link to clipboard
Copied
if there's not much to the as2 swf, you're better off working with it directly to convert it to an as3 swf because there are a number of problems that can be caused by loading an as2 file.
do you have the fla that created the as2 swf?
Copy link to clipboard
Copied
Hi kglad,
Yes I have the original FLA.
I think you're right, working with it to convert it to AS3 would be optimal. Unfortunately it is not such an easy task because I tried that route already and I thought I had a good file but in the Android APK it still played back strangely. With the desktop AIR I didn't have any problems after using the original FLA to reauthor the SWF movie.
I also find it strange that when I try to import the SWF into a version of Flash below CC it does not import properly. I guess at runtime it takes some of the ActionScript commands into account but at import-time to get it into the Library or on Stage it throws the AS out the window.
Best,
markerline
Copy link to clipboard
Copied
you shouldn't "import" a swf. you should load it.
you may still have problems loading it but, you're sure to have problems if you import it. (ie, no actionscript will execute in the imported swf.)
Copy link to clipboard
Copied
you are correct kglad. loading is the preferred method. i have done just that in my adobe air for desktop version of the compiled file. however the apk file still animates strangely when i package this using air for android. same exact file, different results. there must be a bug in the compiler. i have noticed when i tried this a long time ago that my iOS version also behaved strangely.
One thing of note is that initially I didn't notice anything wrong with the android and ios versions of the animation installers but it seemed that all of a sudden one day they broke and they never restored to their original glory. the ios certificate has long since expired so i cannot troubleshoot that any longer.
Copy link to clipboard
Copied
what "strange" behavior do you see.
Copy link to clipboard
Copied
it's difficult to describe kglad and i do not feel comfortable posting both versions in this forum. however i can say that the animations do not match. in the apk version there are many mistakes and inconsistencies that i did not code/design in the Flash GUI. But again this is probably due to it having been an older AS version than AS 3.0 . There wasn't that much code but there was a whole lot of keyframing and the like going on in the file to make it difficult to edit to a new version. i will still try if I have time though.
Copy link to clipboard
Copied
can you post videos?
Copy link to clipboard
Copied
thanks but i actually dont feel comfortable sharing the content in general terms. that is not always the case but for this particular file i prefer to keep it private.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now