Copy link to clipboard
Copied
I am using pixelfumes reflect class to create a releflection, the problem i have is
(i) It only accepts reference to a movieclip.
(ii) I cannot cast my binary data as a movieClip
var item:Bitmap has to stay as a bitmap so either I make a copy of it as a moveclip and reflect it or find a way to pass it directly into the new Reflect() constructor.
I have also tried to cast it like this
var r1:Reflect = new Reflect({mc:MovieClip(evt.currentTarget.loader.content), alpha:50, ratio:50,
distance:0, updateTime:0, reflectionDropoff:1});
but I get TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::Bitmap@1f1380b1 to flash.display.MovieClip.
Many thanks.
var item:Bitmap = Bitmap(evt.currentTarget.loader.content);
this.addChild(item);
var test_mc:MovieClip;
test_mc = MovieClip(evt.currentTarget.loader.content);
var r1:Reflect = new Reflect({mc:test_mc, alpha:50, ratio:50,
distance:0, updateTime:0, reflectionDropoff:1});
Copy link to clipboard
Copied
Try adding the bitmap to a movieclip, and send that in instead. Like: