Hi all I am trying to modify some flash files provided as part of a training package supplied on a DVD.
The DVD contains the final training packages as well as all the source files.
I have opened one of the source FLA files in Flash CC and fixed some typos in the text, then republished the SWF.
When republishing I get two errors.
1 Symbol 'noteBtn1' 1017: The definition of base class RolloverCursor was not found.
2 , Line 1, Column 1 5000: The class 'RolloverCursor' must subclass 'flash.display.MovieClip' since it is linked to a library symbol of that type.
I have looked at the noteBtn1 Symbol and cannot see any script attached to it ?
I have assumed that by simply hacking the original fla file all the correct paths and setting should be inherited from the FLA file.
If I try and run the resulting SWF file it doesn't initailise correctly leaving all the assets visible simultaneously.
The FLA file has a single scene in it with the first layer being a script layer.
There is only one frame in the scene
It has been a long time since I touched Flash so a little help would be gratefully appreciated !!
Regards
Gus
There must some Action Script along with it in a folder which you probably didn't copy along. This happened to me as well a lot of times. Just search for the folder containing the 'as' file of RolloverCursor.as (most probably) and make sure it is in the same folder as your flash file.
The original object in the Flash project causing the error was not used. I have removed it from the compile. This caused another error about a missing library
The missing library was a 3rd party actionscript library. This was then downloaded and installed in the same directory as the FLA file.
Import statements updated to reflect the correct package structure, the object has now compiled.
I still cannot see how to set the global class path in the Adobe CC 2014 version of Flash professional
Related
I have to analyse data in a flash file. I have given with swf file , which i decompiled and produced .fla file which contains 35000 lines of code.
In that .fla file how to find user written code (i think so Action Script ). I am struggling with this.
Meanwhile i am preparing environment for flash editor with flashdevelope software.
Can somebody please suggest me how to find user written code in a flash file(.fla)
You have to look on each and every keyframe which have an action symbol. I put an image to show how it will appear in flash file.
If your swf is targeted to AS3 then probably all the codes will decompiled in external ActionScript files. You will have to search in all the directories generated from your decompiler.
Edit
as #BadFeelingAboutThis suggests, there is another way by looking at the left panel within action panel.
So I'm really confused on how to create, and use, a SWC file. I understand that a SWC file can be created to hold multiple assets. Basically, my code setup is the following:
c_Test.as - all testing of classes/fla files is done here
c_Test.fla - contains a few visual objects used/tested in c_Test.as
Class.as - class referenced multiple times in c_Test.as
Class1.fla - contains an important bitmap that is loaded into c_Test.as
So what I need to do is create a SWC file to be used in other projects; this is going to be the base of a multitude of other large projects, and I don't want to have to continuously copy and paste code into different folders. I am using Flash Builder 4.
So far, I went to publish settings in Flash CS6 in my c_Test.fla file and checked off Export SWF and Export SWC. What does this do? Has this created my SWC file?
I need to be able to access, from any random project, both Class.as, and Class1.fla.
Edit
So to clarify, cw_Test.fla is just a testing copy of the actual main fla file. I don't need this included in my swc. I just Exported my Class1.fla to SWf and SWC, and set a library path to the folder containing Class.as. Is this all I need to do to access both of these files from any project? (Besides importing them into any file I need them in).
So I'm trying to build a separate package. In that package I would like to reference TweenMax, however I'm having trouble linking to it (error Definition com.greensock:TweenMax could not be found).
Here is my dir structure:
myApp
--com
----greensock
------Tweenmax etc
----myPackage
------packageClass.as
--------elements
----------elementClass.as (this is the one trying to access tweenmax)
--src
----Main.as
main.as is the document class, just so I can test myPackage. Doesn't do anything except instantiate myPackageClass and stick it in the displayList.
In the elementClass.as I have:
import com.greensock.TweenMax;
which flashDevelop seems to see within the ide, but when I compile I get the ...could not be found error.
So how can I reference tweenmax from my elementClass file (I have src and com dirs in the classpaths.
I'm using flashDevelop with flash player 11.7 and Flex 4.6.0 SDK.
Am I going about this all wrong?
I'm going to ask the hopefully obvious question, did you import the greensock folder?
import com.greensock.TweenMax
Ok let's say you did that already. Maybe you need to tell your code where your libraries are. Go to File > ActionScript Settings, or, on the stage's property panel, click the wrench icon next to the Script drop down menu.
You should see a dialog with three tabs, the first two of which are labeled Source path and Library Path. Forget about the third.
In the Source path tab, you should at least have a dot - (.) - as one of the choices. That tells flash to look for any actionscript classes it can't find at compile time in the same directory as the source FLA. From there you can list any number of other library paths that contain supporting files.
The second tab is for SWC files. If you have a SWC library, you can tell your FLA where to find it by pathing to it here, just as you pathed to your libraries in the Source path tab.
The images below presume that there is a folder, in the same directory as the source FLA, named library. In this folder are sub folders named src and swc. Inside src are sub folders containing the greensock and facebookAPI com folders, (the latter used here for example). Inside the swc folder there is a SWC named exampleSWC.swc.
The paths shown in the pics below would allow the FLA to see the following imports:
import com.greensock.TweenMax;
import com.facebook.someFacebookAPIClass;
import com.somePackageInTheSWC.someClassFromExampleSWC;
I want to know how to load external class files(.as files) in actionscript but don't have to know the class file's name. Think of it like loading mods in minecraft with forge mod loader, it doesn't know the main class of the mod's file name, yet it successfully loads the mod. I want to know if something like this is possible in actionscript 3.0 because I feel like making a tower defense game that isn't like the others out there but have it so it can be modded and have mods loaded but of course I have to load the class file without knowing the class file's name.
Note: I don't got access to Adobe Air so I can't use anything that requires Adobe Air.
You want to load a particular .as file AFTER or BEFORE compilation? After the compilation it is hardly possible - the file would not be compiled and therefore it would be useless. Why don't you use a swf or some kind of XML/JSON with settings in that case? Before the compilation you would still need to identify it by it's package name/name.
Basically, you want a plugin management system.
In AS3, it is not possible to "load" a .as file on execution, because it is a (uncompiled) source file. But, it is possible to load another swf and to use the classes within it.
Your process should probably be something like this :
Get a list of the plugins/addons. If you were using AIR, it would have been possible by browsing the content of a folder. Since you're not, you'll probably need to use a listing file (basically, a file that say "Here's the list&path of the plugins you need to load".
Load each swf file
(possibly) call a initialization method for each plugin.
You may wish to look into the way OSMF manages plugins, for example : http://osmf.org/dev/osmf/OtherPDFs/osmf_plugin_dev_guide.pdf
i have a question and i'm hoping to find an answer here,
i created a flashbuilder project that contains some classes with functions that i use often,
i have around 6 classes, would it be possible to compile these classes to a swc file so i just have to add the swc in a new project to access them?
Or isnt it possible to create swc's with flashbuilder?
Maybe i could do it in flash but dont have any idea how to compile multiple classes into 1 swc. file.
Sorry if this is a stupid question but ive never used it before and couldnt find much about is.
Inside FlashBuilder create a new "Flex Library Project".
It will take you through a new project wizard that is similar to an Actionscript Project. Once it is created, you can add your .AS classes to the source folder. As long as Project->Build Automatically is checked, it will automatically create (and update) a SWC file in your designated output folder, usually (/bin).
If you want to pick and choose particular classes or include external libraries, SWFs, or other SWCs, select Project->Properties->Flex Library Build Path there is a tab called "Classes" where you can select which classes you want exported into the SWC.
You can just create a library project for this.
Move all of your code into this project and build the project.
The output will be a .swc file in the bin directory.
You can also do this from the command line using the compc (short for component compiler) and incorporate it into an ANT task or a Maven build.
Cheers