I tried to gather my bearings a little with AS3…and tried out a trial class…ALL that the class does is create an object of the external class, and then call a function which displays the alpha value of a movieclip passed to it. The movieclip is on the stage of the swf file.
Code in swf:
var iMain:introMain = new introMain();
var isVanished:Boolean = false;
var eventsmc:MovieClip;
function callVanish(e:MouseEvent):void {
trace(“inside callVanish”);
iMain.vanish(eventsmc);
isVanished = true;
}
eventsmc.nxt.addEventListener(MouseEvent.MOUSE_DOWN, callVanish);
code within introMain class:
package {
import flash.display.; //all this for later
import fl.transitions.easing.;
import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import flash.events.MouseEvent;
public class introMain extends MovieClip{
public function introMain(){
trace("inside intromain constructor");
}
private function vanish(mcName:MovieClip):void{
trace("inside vanish " + mcName.alpha);
}
}
}
The error I am getting
: Error #2136: The SWF file path/introduction.swf contains invalid data.
at introMain/frame1()
why is this happening???