Copy link to clipboard
Copied
Hi,
First of all, I got to say that I'm new to Flash and AS3 and that my english is far from perfection, so just tell me if I'm saying anything you can't understand.
I received the source code of a website which is fully in flash. The code is sperated in two parts, one is containing the application specific code and the other one is containing the AS3 library.
I'm kind of lost when I'm trying to run it in Flash. What is the right way to import a full action script project in Flash? Where should I put the library?
If you got any good tutorial to explain this I would be great. If you got a good explanation it's great too
Thank you.
1 Correct answer
AppInit.as is not really the main class (we just set it to see) - can you find a class that extends Sprite?
With those errors you cannot compile into SWF. Can you just contact the author http://lab75.jp/de/contact ...?
Copy link to clipboard
Copied
First you have to identify the main class (default application class). It can be called Main.as or [name of the application].as but can be anything. It usually extends Sprite, but can be MovieClip. It may have metadata such as [SWF] and [Embed]. It can be in the root of "src" directory.
Then set it as Document Class in Flash (Publish Settings > Advanced ActionScript 3.0 Settings, or Class field under Document Properties panel).
You have to include the package name as well. If you can tell us the structure of your files it's easier to show you exactly what you need to do.
If it's a code only project it's far better to use Flash Builder (or any other 3rd party tools) instead of Flash, by the way
Copy link to clipboard
Copied
Thanks for your help!!
I indeed reoriented myself on Flash Builder since it appears as you said a more appropriated tool.
Here is the structure of the project
I also got an AS3 library, and I'm not really sure about where should I put it.
I dont know wich file is my main since AppInit is extending "Lib", DataGetter is extending EventDispatcher (So this is my model if I'm right ), and TemplateFactory is exentending Object.
I got no .fla file, so I don't really know if I should create one with Flash and link it with some magic trick with Flash Builder.
I'm guessing you need more information to help me, so just ask and I'll tell you. I hope I'm not that far from compilating this website because it seems pretty hard and I already spent a lot of time on it.
Thank you.
Copy link to clipboard
Copied
Do not use Flash, use Flash Builder, full stop
The structure does not look right to me though. Create a new directory with your app name, and place "src" directory (that contains app directory) in it. In Builder create new ActionScript Project and set Project contents to the directory you created. Then set Main source folder to "src" (should be set to that already) and Main application file as app/AppInit.as and see how it goes. I bet you'll get a lot of errors but we can see what's going on from the errors
Copy link to clipboard
Copied
So let's forget Flash and let's focus on Flash Builder
So i created a ActionScript project as you said, I designed the src folder as the source folder, and AppInit.as is now my main, here is the error.
(Maybe it's too small, 1017: The definition of base class Lib was not found.)
And I guess that I still need to include my AS class library somewhere. Seems kind of obvious that I should put it in the Library path but my library contains only .as files and the Library path seems to receive only SWC. But maybe I'm 100 miles from what is right.
Once again, thank you for your very precious help.
Copy link to clipboard
Copied
In AppInit.as is there an import statement for the class Lib? That will give you the idea where you need to place it (and other clases come with it).
Copy link to clipboard
Copied
I got "import jp.lab75.daf.utils.Lib;" in my import. And I also got a Lib.as in my library folder which is located as you can guess in the jp/lab75/daf/utils. I still didn't include this library in my project since I'm not really sure about how is the right way to do this.
Copy link to clipboard
Copied
Then you need to place the "jp" directory (and all the subdirectories) in "src".
Copy link to clipboard
Copied
So I put all my library in the src folder.
I got 4 errors but since they are coming from my library I think I can just bypass them, but I'm not sure.
I also got a lot of warning on function, all like this one:
Parameter 'heightLimit' has no type declaration.
Anyway, I look much closer to a compilation than ever.
What should I launch after the compilation? Right know it's trying to launch /Users/alexandredebetak/Desktop/Website/bin-debug/AppInit.html but since I got no file AppInit.html file, it can't work.
Copy link to clipboard
Copied
AppInit.as is not really the main class (we just set it to see) - can you find a class that extends Sprite?
With those errors you cannot compile into SWF. Can you just contact the author http://lab75.jp/de/contact ...?
Copy link to clipboard
Copied
I got no class extending Sprite apart from classes coming from the library.
Unfortunately I'm asking here cause the guy coming from this lab75 who provided me this website is really hard to talk with, that's why I came here.
Anyway, I guess I will have to deal with him one way or another. If you have anymore tips I will be very gratefull.
Really thank you for your time and your help.

