BitmapData works in Flash 8.0 IDE, but not in flash player 9.x
I have 2 BitmapData objects used as reflection of 2 movieclips. One of the objects works in both the IDE and the player. The other only works in the IDE.
here is the code for both objects:
working object- code is in a class in an external as file.
PHP Code:
private function initReflection ():Void
{
var par:Orbit = this;
reflectionClip.cacheAsBitmap = true;
reflectionClip._alpha = reflectAlpha;
//trace(orbitClip);
reflectionClip.onEnterFrame = function ()
{
par.bmd = new BitmapData (par.radius * 4, par.radius, true, 0);
this._x = par.orbit._x + 15;
//this._yscale = -100;
this.attachBitmap (par.bmd, 1);
par.bmd.draw (par.orbitClip);
};
}
reflectionClip = orbit.createEmptyMovieClip ("reflection", 1);
reflectionClip.cacheAsBitmap = true;
not working object- code is on the _root timeline
PHP Code:
//image viewer coordinates
var iv_x:Number = 101;
var iv_y:Number = 87;
//
//image viewer reflection
var ivr_y:Number = 234;
//
//attach the imageViewer
var viewer:MovieClip = _root.attachMovie ("imageViewer", "imageViewer", 3);
viewer._x = iv_x;
viewer._y = iv_y;
//make the image viewer's reflection
var reflectionClip:MovieClip = _root.createEmptyMovieClip ("refClip", 1);
reflectionClip.cacheAsBitmap = true;
reflectionClip.onEnterFrame = function ()
{
reflectionClip._x = _root.iv_x;
reflectionClip._y = _root.iv_y;
reflectionClip._yscale = -100;
reflectionClip._y += 152 * 2;
reflectionClip._alpha = 32;
var viewerReflection:flash.display.BitmapData = new flash.display.BitmapData (338, 152, true, 0x0);
reflectionClip.attachBitmap (viewerReflection, 1);
viewerReflection.draw (viewer);
};
Is there a serious difference between the two players in regards to the BitmapData object?