AS3 Fla File converted from AS2 not showing code in IntelliJ-Idea - actionscript-3

I exported an Fla containing AS2 code to AS3 and generated an SWF that is supposed to contain the required object oriented codes.But after i added it to IntelliJ IDE and double clicking, i do not get any inner files.Nor im able to call any instances.What is going wrong here?
UPDATE:
My colleague tells me that if we drag and drop the exported swf into intellij we dont get any button names and stuff to work upon in the action script if its AS2.So he sets AS3 and exports the swf.It worked for other files when it comes to this file upon dragging and dropping it into intellij we don't get any button names to work upon. That is the problem
This is an example of a working swf upon clicking the swf
we get the fla folder and upon clicking on hg_11 or any of the sub files we are able to get the names of the buttons.But when clicking on the file im talking about nothing comes up.BTW I just started using IntelliJ and Flash today im a total noob in this stuff.The thing is the they want this animation with interactivity running on Android Devices.I just need to link 1 SWF to another on Click of a Button.

You are not reporting something that is possible.
When you say "I exported an Fla containing AS2 code to AS3" and then "that is supposed to contain the required object oriented codes".
It seems that you are somehow expecting a code conversion from AS2 to AS3 but that's just impossible. When you convert a former AS2 based .fla to a AS3 based .fla the conversion gets rid of all AS2 code and that's the end of it. It's not gonna write or convert anything to AS3 because that's just impossible to do automatically since those 2 languages are too different.
There's no such thing as automatic code conversion from as2 to as3. The only thing that could happen with a AS2 project is that the new AS3 based .fla file gets rid of every single line of AS2 code.
So your question can safely be removed since it is based on the idea that something magical happens inside .fla files and old AS2 code gets transformed into new and shinny AS3 code. It does not happen and it will never happen.

Related

Never Have Access to Embedded SWF Content Through Loader

I am working on embedding a SWF that is just a converted PDF created with InDesign. The SWF is 15 pages, 1 page per frame. It does include TLF text and there is no way around that unless the document is completely recreated in Flash. The problem is that when I load the SWF into my application, I never have access to the root MovieClip.
this.loader = new Loader();
this.loader.contentLoaderInfo.addEventListener( Event.INIT, this.loaderInitHandler );
this.loader.contentLoaderInfo.addEventListener( Event.COMPLETE, this.loaderInitHandler );
this.loader.load( new URLRequest( "assets/doc.swf" ) );
When I look at the loader after both the INIT and COMPLETE events as well as later on by stopping the app in debug mode, I do not see a MovieClip. Instead, the loader.content is of type doc_fla.MainTimeline__Preloader__ which contains two children, an empty Shape and another Loader. That loader, when checking INIT and COMPLETE events results in the exact same situation and it appears to be a never ending line of Loaders whose contents are "Preloaders".
Could anyone shed some light as to what is causing this or how I might fix it? I've poured a good 2 hours into solving this and I am no closer to a solution than when I started.
ActionScript Mobile project
Compiling using AIR 3.6
Testing in emulator as well as on iPad and on Nexus 7
I recompiled the SWF and embedded the TLF libraries (under ActionScript settings, just set the TLF swc which was already there to be embedded) in it and this seems to have fixed the issue. I swear I had tried that before to no success, but it worked this time.

AS3: Preloader Not Working w/ Exported for AS Graphics

I have a lot of graphics and sounds in my library that are exported for Actionscript in Frame 1. I believe that because of the exported graphics, my preloader will not work. All I get is a white frame while the movie loads.
How can you preload graphics that are exported for Actionscript?
When you export for Actionscript in Frame 1, everything that is exported must be loaded before any content is visible. I usually uncheck this button, and then everything is exported to the first frame where it's referenced. For more details on this approach, check out http://www.developria.com/2010/04/combining-the-timeline-with-oo.html . Howwever, if you're like most developers, you probably reference everything from your main document Class, so this may not do you much good. It does offer the possibility that you can avoid a preloader altogether, though, because loading is spread across different frames.
If your movie is structured like normal, check out http://www.8bitrocket.com/2008/4/22/Tutorial-Preloading-Actionscript-3-AS3-Games-in-Flash-CS3/ .
It is not applicable on every case, but maybe you can preloader in separate file, which loads your main swf.
You can see detailed how to in this tutorial: http://www.gotoandlearn.com/play.php?id=85

ActionScript not showing up in Actions - Frame window in Flash CS5

In an existing fla file, I'm not able to find strings within actionscript that is contained within certain frames (regardless of which frame it's in). So for example in frame 1 there is the following code:
stop();
But searching for 'stop' (without quotes) doesn't turn up any results.
If I create a new fla file, I'm able to find actionscript in all keyframes. Furthermore, I've noticed that the "Actions - Frame" window shows me a tree of all the ActionScript in the scene, organized by frame. This isn't happening in the first .fla file - I can open up and edit actionscript for a frame, but the tree/index never gets built.
Has anyone run into a situation like this? Is the first .fla corrupt in some way, or is there a setting to allow me to easily find actionscript within all frames? Thanks!
Have you checked the settings in the search box? Maybe the search is document based and the specific file you are having trouble with has different settings from the default one. Try to compare the working file with your "corrupt" file. Actionsctipt should be enabled.

compile .swf from .as file that defines a sprite

Someone else wrote and gave me an ActionScript source file that defines a subclass of Sprite. I am told that I need to, from this, generate a .swf file whose behavior is entirely defined by that one sprite. In other words, when the "movie" starts, one instance of that Sprite subclass should be created and set running, and it should keep running until the <object> is destroyed. The sprite doesn't define its own dimensions as far as I can tell, so I also need to know how to specify those (it's supposed to cover the entire area of the movie, and ideally that would not be hardwired into the .swf but rather taken from the <object> definition in the HTML).
I know basically nothing about Flash, and I'm much more of a command line guy than an IDE guy, so if there's a way to write the necessary wrapper in a text editor and then just use the Flash IDE to compile it (or better still, compile it using some sort of command line utility that either came with CS4 or I can install on my Linux box, without paying Adobe an additional arm and leg), detailed instructions on how to do that would be the ideal answer to this question. Failing that, please provide step by step instructions for how to create said wrapper in the IDE. I've got CS4.
The sprite tries to communicate with the containing HTML document, so if there's any glue needed inside the .swf but outside the .as code to achieve that, I need to know how to implement that too.
Since you already have CS4 you can compile your source file by using the DocumentClass.
http://www.heaveninteractive.com/weblog/2008/03/04/introduction-to-the-document-class-in-actionscript-30-tutorial/
Alternatively, for future reference , if you download the free Flex SDK , you could use the command line to compile your source file
mxmlc SourceFile.as
You can then use SWFObject to embed the resulting swf file in your HTML page
http://learnswfobject.com/

How is the Actionscript 3.0 sample Maze game's code included?

I can't find the line in the Adobe samples for a maze game where the actual .as code is included into the project. This is fundamental, since my own implementation is just using include "file name";, which isn't working. I also can't use import, since I then can't access the elements placed on the stage. Help, please? The files are available here http://download.macromedia.com/pub/developer/flash_as3_sample_game_1.zip
I tried to debug the code, but I can't even find the point where the constructor is called. The execution starts at "stop()" in frame 1 and then if you step into it, calls the enter frame event handler.
I guess Document Class is the thing you are looking for.
It is an entry point, the class which is instantiated once Flash Player loaded your SWF.