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

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.

Related

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

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.

Where are the action scripts?

I'm new to Actionscript.
Someone gave me a .FLA file. I opened it up in Adobe Flash Builder, then pressed Debug>Debug from the menu bar and the project starts running in a flash player as expected.
Then I shut down the flash player and then I wanted to start editing the project.
I go to the canvas area and see nothing but a purple background. I go to the timeline and see one empty layer.
I see in the library a lot of pictures and movie clips. But none of them seem to have action scripts associated with them.
Where do I go to look for all the actionscript that powers this app? I'm pretty sure there is some actionscript involved...but have no idea where to look at this point.
I typically click on a layer/frame then right click and choose actionscript to open up the actionscript dialogue window. But it's always empty.
---- EDIT
I noticed there's a folder src/com/gsk/proj1/myawesomeproject/ . In that are the folders controllers, controls, models, views and a few more. How does the flash project know to read action script from somewhere in this folder? And which as file is fired first?
Look in the following places for code associated with an FLA:
Open the Window > Actions panel and look on the left side drawer (expand it if not showing). This will show the location of all "timeline scripts" embedded in the FLA.
Look at the Properties panel for the main timeline (click on an empty area if necessary to de-select any objects) and look at the "Class" field. This is the root "document class", and if not empty, this class will be instantiated along with the SWF when it is constructed by the player. Of course, that class could be using all sorts of other classes, but it would be the entry point for the SWF.
In the Library panel, look for symbols who have a Linkage value. This indicates the symbol is linked to a class by that name. Open the symbol properties (right click > Properties) for more details. Note that Flash can "auto generate" classes that don't have actual class files (useful for instantiating display objects strictly for visual purposes).

Assign movie symbol to class error , cannot export in .mov in Flash CC?

Please kindly help me otherwise my 8 hour hard work of animation would be lost.
So I manually create a movie symbol in my Flash Main Timeline, it has an actionscript code in it like:
stop();
if(MovieClip(root).currentFrame<MovieClip(root).totalFrames){
MovieClip(root).nextFrame();
}
Converting it into a .mov file would not play the movie symbol (with its actionscript code like above).So I manually go and assign this movie symbol a class (Right-Click -> Properties ->Advanced ->Class Name)
After clickikng OK, it displays me an error saying "A definition for this class could not be found in the classpath, so one will be automatically generated in the SWF file upon export.
I right-clickthe name->Edit Class. Opens up with an empty constructor, but whwre is the animation code (like the 20 frames in this movie symbol)?
How do I export the .mov file so it plays the movie symbols (multiple instances of the movie symbol as well)?
"A definition for this class could not be found in the classpath, so one will be automatically generated in the SWF file upon export" -- I would not worry about this. It is simply saying that an actual class file does not exist.
Also, that as3 code will not execute on movie export. It is dependent on the animation playing in real time.
I would recommend removing this code, creating a keyframe on the very last frame, and in that frame inserting a stop();
Your frames will play all the way through until the last (stop) frame.

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

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.