AS2设置掩码不';我不能在Flash 8上工作

AS2设置掩码不';我不能在Flash 8上工作,flash,actionscript,actionscript-2,Flash,Actionscript,Actionscript 2,我做错了什么?如果“square”是矢量渲染的,但如果它是从url加载的图像,则它不起作用。代码如下 stop(); this.Security.allowInsecureDomain("*"); this.Security.allowDomain("*") this.createEmptyMovieClip("square", 1); this.createEmptyMovieClip("triangle", 2); triangle.beginFill(0xFFFFFF,100); tr

我做错了什么?如果“square”是矢量渲染的,但如果它是从url加载的图像,则它不起作用。代码如下

stop();
this.Security.allowInsecureDomain("*");
this.Security.allowDomain("*") 

this.createEmptyMovieClip("square", 1);
this.createEmptyMovieClip("triangle", 2);
triangle.beginFill(0xFFFFFF,100);
triangle.moveTo(10,10);
triangle.lineTo(10,50);
triangle.lineTo(50,10);
triangle.endFill();


var MCL:MovieClipLoader = new MovieClipLoader();
var mListener:Object = new Object();
mListener.onLoadInit = function(target_mc:MovieClip) {

    target_mc.setMask(triangle);
};
MCL.addListener(mListener);
MCL.loadClip("http://farm6.static.flickr.com/5167/5257133700_64698a6cea_s.jpg",square);

return;

哇,我在发帖几分钟后(绞尽脑汁4个小时后)就想出来了


我改为onLoadComplete(而不是Init),现在一切都好了。

哇,我在发帖几分钟后(绞尽脑汁4个小时后)就明白了


我改为onLoadComplete(而不是Init),现在一切正常。

我还尝试了square.cacheAsBitmap=true;和triangle.cacheAsBitmap=true;在CreateEmptyMovieClip之后,它仍然不起作用;和triangle.cacheAsBitmap=true;在CreateEmptyMovieClip之后,它仍然无法工作。