Need help integration a AS3 drawing game into a .fla
Hi,
I created a drawing game by following a tutorial on this website : http://code.tutsplus.com/tutorials/create-a-basic-drawing-application-in-flash--active-1627
It was pretty straight forward. (you can download the source file to have the same code as me and save time).
Now to the fun part!
I previously created an iPad app in Flash. Works great by the way and is published on the App Store. (Search for : Henri Godon -> free app)
My client wants this drawing game to be incorporated in his app with a possibility of 3 different images to color opon. Which is pretty easy to do.
I thought that just doing a simple copy/paste and including the scripts would do the trick.... WRONG! I keep getting errors once I try to export it or test it out.
My App works great without the game. And the game works great alone. It's only one I try to embed it that I'm stuck.
Here are my errors, hope someone has an easy DIY way that I'm not aware of since I have never done this before.
ERROR 1:
1037 : Packages cannot be nested.
here is what it is referring to in the Main.as script :
package
{
import PNGEncoder;
import flash.display.MovieClip;
import flash.display.Shape;
import flash.display.DisplayObject;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFieldType;
import flash.text.TextFieldAutoSize;
import flash.display.BitmapData;
import flash.geom.ColorTransform;
import flash.events.MouseEvent;
import flash.events.Event;
import flash.utils.ByteArray;
import flash.net.FileReference;
public class Main extends MovieClip
{
ERROR 2:
Even if I try to remove that part, then I get an other error saying
1114: The public attribute can only be used inside a package. (which is kinda obvious)
1084: Syntax error: expecting leftbrace before var.
So nothing works after that...
I added the Main.as in the ActionScript setting in the Document class. So I know it is loaded in a way, but after that I'm stuck!
Please help out! I'll do anything.
