i am a newbie to AS3. i have some vid tutorials and a book. i am doing ok with AS3 on the timeline, but using classes is killing me. i have read through many other threads and have tried adapting the tips to my special circumstance but it isn’t working. it has been over a week of now and again tweaking my approach and i can’t get it to work. here is the setup.
files:
Geometry-RectangleArea.fla (in root)
Lesson.as (in root/lesson)
MoveMC.as (in root/lesson)(i just used this to try to duplicate a solution in another thread)
the document class for the .fla is lesson.Lesson
i put in a simple trace into the main class (Lesson.as) which does output. i am currently trying to move a MC object on frame 196, just so that i can know that non-main classes can work properly. here is the code:
on frame 196 of main timeline:
stop();
var mmc:MoveMC = new MoveMC(area4ftsq);
inside the Lesson.as file:
package lesson
{
import flash.net.*;
import flash.media.*;
import flash.display.MovieClip;
import flash.events.*;
import flash.display.SimpleButton;
public class Lesson extends MovieClip
{
public function Lesson():void
{
trace("hello dude");
}
}
}
inside MoveMC.as file:
package lesson
{
import flash.display.MovieClip;
internal class MoveMC extends MovieClip
{
public function MoveMC(area4ftsq:MovieClip)
{
area4ftsq.x -= 150;
}
}
}
the error i get:
1046: Type was not found or was not a compile-time constant: MoveMC.
would appreciate your help and patience.