ok,
using AS3 and “Tweener”, I want to animate a movie clip of a loaded SWF.
However, i want to do this from the code of the main movie, no code in external SWF.
Here is my loader:
var _swfContainer:Loader = new Loader()
var _url1:URLRequest = new URLRequest("about.swf")
var _url2:URLRequest = new URLRequest("portfolio.swf")
var _externalMovie:MovieClip;
//Start loading and add the loader to the stage
stage.addChild(_swfContainer);
_swfContainer.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, finishedLoading);
// This is done after the swf is loaded
function finishedLoading (e:Event)
{
_externalMovie = MovieClip(_swfContainer.content);
}
function loadAbout(e:Event){
_swfContainer.load(_url1)
}
function loadPortfolio(e:MouseEvent){
_swfContainer.load(_url2)
}
Here is the Tweener code:
Tweener.addTween(_externalMovie.ip, {x:244, time:0.4, delay:0.3, transition:"easeOutExpo"});
the “_externalMovie.ip” would refrence any external SWF that has been loaded with the movie clip “ip”, at least that is what I want
This is the error i get:
Error #1009: Cannot access a property or method of a null object reference.
at main_fla::MainTimeline/frame1()
Yes, i have my flash prefrences set up to access the Tweener class.