I've been working on a project for some time now in flash develop and it's come time to clean it up. While I was working on it I re sorted code into different classes without removing the imports in the existing classes. Now I know I probably have a ton of unused imports in classes I was wondering if their was an easy way to find these and remove them. At the moment the only way I can think is comment them out one by one until the app chucks a spaz?
Flash CS4 is really good for design and development point of view. But I noticed two things:If library have more item then there is no option on right click "Select Unused Items". How can I get this option "Select Unused Items" on right Click while library have a more items with scrollbar?Some times the actions window's height increased. At this time there is no option to decrease the height of actions window except the Reset option.
I have a really big project that has gone through many iterations, and has gotten very large. I am certain there are a lot of library items that are not being used, but I am not sure how to identify them. The FLA file is really large, 500 MB. And I am running into memory problems. Is there a way to remove all unused library items in an FLA? Or at least identify them?
My current project imports the following on the root time line
[Code]...
I then have a series of movieclips in my library that get loaded in as required at run time using addChild. In each of these movieclips I am having to use the same import commands or I get an error. Is there a way of me changing my code in some way so I only need to use the imports once in the main time line?
Eclipse has a built in functionality to find unused variables (and methods too I guess). Flash Builder 4 is built on top of Eclipse but it doens't have that functionality. Do you know any plugin to achieve that functionality? Also, if you know any other kind of plugin besides SourceMate to improve Flash Builder let me know.
I often use the shortcut for Organize imports (CMD - SHIFT - O) in Flash Builder. Some times Flash Builder just removes all my imports (not the SDK) and I have to add them manually. Anyone else who have had this problem?
I am working on a website right now, which involves using framescripts to invoke instance methods from the document class. These methods are supposed to trigger the new content of each page, e.g. a galleryCreate() method that creates an instance of a custom Gallery class. The other job that this method must perform is run a check to see if there are any other children that need to be removed prior to trying to bring up the new content (for example, to prevent multiple Gallery instances from being created, or a Gallery instance being created when a Newsfeed instance is still on the display list).
This was the solution I tried: script on frame labeled "gallery":
ActionScript Code: galleryCreate(); Script in document Class after the main constructor. Spaceball is an empty MovieClip declared at the beginning of the class as an easy point of reference to the root.
ActionScript Code: public function galleryCreate () { if ((spaceball.parent.getChildByName("gallery")) != null) { trace("An instance of the Gallery object was found and deleted"); removeChild(spaceball.parent.getChildByName("gallery")); } gallery = new Gallery(); addChild(gallery); }
When I ran the program, I clicked on the button to the gallery page, and the gallery came up alright. However, when I clicked on it a second time, I could see from the alpha of some of the elements that additional classes were being placed on top of the original ones. The trace in the if statement was never registered. So to troubleshoot this problem, I inserted the first two traces into the beginning of the galleryCreate() method, and the last trace at the end.
ActionScript Code: trace(spaceball.parent) //returns [Object Body], Body being the document class trace(spaceball.parent.getChildByName("gallery")); //returns null //after Gallery has been instantiated in the new gallery object trace(gallery.parent); //this returned [Object Body]
Running the program again, the trace(spaceball.parent.getChildByName("gallery") would consistently return null, followed right after by a trace that recognizes the parent of the newly instantiated Gallery object to be the Document class. Doesn't that mean that it should be recognized as a child during the second iteration of galleryCreate()?
I have two ArrayUtil classes I need to access from the same class - they each come from external libraries and have different code, so I can't just combine them.
How do I disambiguate them in the code?
I tried doing com.adobe.utils.ArrayUtil inline, and leaving the existing import, but that resulted in an undefined property com error.
On my first FLASH CS4 site I have changed several files from PS and re-imported Imported them into stage several times. Now the library contains lots of folders, i.e. Web Site.psd Assets 1 / Web Site.psd Assets 2 / Web Site.psd Assets 3 etc etc.. They obviously contain the same asset names, each with a corrected content.How can I determine which files are the ones used and delete all the others from the library?
I am building a swc [MY.swc] component with compc. It is suppose to contain base functionality for MY.swfI need to include another (third party) swc [OTHER.swc] into my own swc. This other swc has a reference to mx.core.mx_internal and I suspect that it is this reference that in the end, when I compile MY.swf, results in that all mx classes (mx.*) and all spark classes (spark.*) is included in MY.swf (seen when decompiling)The difference in size between MY.swf with/without OTHER.swc is ~180kB.The only difference (when decompiling) MY.swc with/without OTHER.swc is that the first has a reference to mx.core.mx_internal
Here is the compc part from my ANT task: <compc output="MY.swc"> <include-sources dir="${project.root}/${SRC_ROOT}" includes="*" />
I am adding content dynamically and I was wondering if I can assign unique ids to the content (for example every loader object).
What I am trying to do is generate an instance name that is not yet used by any object. For example, when you add a child on to the stage and then do something like trace(mc.name); it would be something like "instance3". Is there anyway I can get that generated name and apply it as my id name?
I know this is a hard concept to grasp, but what I am looking for is something to generate a name that is not yet used by flash.
Say you have a document class, and a customMenu class. If they import some of the same classes, would it be less overhead if everything was in the document class? Thus imports only happen one time?
The amxmlc compiler source-path variable points to:
libs/
I need it because I have to subclass Class1 in Class3. That pushes me to put all the classes into packages that look as weird as this:
package ClassX.src { /* ... */ }
So in practice it looks like that:
package Class3.src { import Class1.src.Class1; // I prefer direct imports public class Class3 extends Class1 { /* ... */ } }
Is there a way to keep the files/folders structure and get rid of src in the package name. Changing the files structure or direct pointing compiler into base-class directory in not an option.
I am trying to make the project build light by removing all the unused (mxml,xml and image ) files. Currently I am manually searching for each image and then removing the unused file. But is there a way such that we can get list of unused files automatically . I was trying to use the swfDump.jar from 4.0 sdk . But that dint work as it is working with projects that are build using flex sdk 4.0. I am currently using 3.2 .
Normally when I have lets say two sorts of Events, the MouseEvent and the TouchEvent, what I then do is import flash.events.*; Would it save space/performance/whatever to specificly import the needed events?
I have a large swf that is embedded in Director as a sprite I now want to put it onto a web page, so file size is critical Is there a way to remove unused library items when publishing so that file size is reduced? Is there another way to compress the swf so it is much smaller?The current size is about 25 Mb.What about streaming the swf?I'm not talking about streaming video or audio, just any Flash content.In Director, there is a way to right-click on a cast member and choose "find in score".If something isn't found it means that it either is not used in the movie or is implemented through code
I would like to keep my project library tidy, which means deleting symbols I end up not using. However, I want to be able to find these symbols later in case I do end up wanting to use them for a related project. Can I create a library outside of a project, so I can drop these items into it for later use?
I currently have 6 different flex applications (widgets) that run on a main page.They all depend on one common library project.I am currently cleaning up the codebase quite dramatically and it is hard to keep overview this way especially since I inherited the codebase.Does anyone know a tool that can automatically inform me of any dead code?
I have a large swf that is embedded in Director as a sprite. I now want to put it onto a web page, so file size is critical. Is there a way to remove unused library items when publishing so that file size is reduced? Is there another way to compress the swf so it is much smaller? The current size is about 25 Mb. What about streaming the swf? I'm not talking about streaming video or audio, just any Flash content. Any tricks for speeding the process up so that the user doesn't have a long wait before the swf starts?In Director, there is a way to right-click on a cast member and choose "find in score". If something isn't found it means that it either is not used in the movie or is implemented through codeIs there a similar way in Flash of detecting unused items or automatically eliminating them when publishing?
I'm working on CS4 / Windows 7. I recently moved from XP where everything worked fine. My problem is that compiling any movie now takes about 40 seconds longer than before. I have been able to narrow down the issue to this. There is folder in my classpath which is on a local network. It is this folder that is causing the issue. Plus, even if this folder is not required at all to compile the movie it slows it down anyway. As soon as that folder is removed from my classpath everything works as it should -- of course, for movies which don't require that folder to compile :-) --. Having said that removing the folder or changing its location is not the solution I'm looking for.
I'm working with a large Actionscript project, and every file needs to have it's imports organized. I noticed that you can achieve this easily in the Java version of eclipse, but that doesn't seem to work in Flash Builder. Is there a simple way to organise imports for the entire project?
I have a lot of stuff in the library. There are also additional items. Whether it has effect on the swf file. I can't use "select unused items" and delete. After that the swf does not work correctly.
I'm trying out the Flex Builder 3 Plugin for Eclipse, and it doesn't seem to have quick fix or automatic imports. I use those two features a lot with Java and FDT. I've been googling, but all I've found is some plugin that someone wrote for Flex Builder 2, and no other mentions. Is Flex Builder supposed to have these features?
I am looking to create a flash gallery which imports images from a mysql datbase and links associated to the image which will also be in the databae . The idea is to show the user in a carousel style the last picture added to the database at the front and if that or any other picture within the carousel is clicked another swf will load.Using php will do I just don't know where to start.
Currently optimizing an application at work. There are many files in some of the module projects that are not used by the exported (release build) Module.swf's. Are these unused files included in the swf's?
Let's say Class A has the flash.events.Event imported. Now let's say Class B extends Class A. Why in the hell do i need to import flash.events.Event in Class B? It makes no sens at all to me.