• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

reflect class and binary data

Explorer ,
Apr 28, 2009 Apr 28, 2009

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});

TOPICS
ActionScript

Views

381

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 28, 2009 Apr 28, 2009

Copy link to clipboard

Copied

LATEST

Try adding the bitmap to a movieclip, and send that in instead. Like:

var item:Bitmap = Bitmap(evt.currentTarget.loader.content);
var test_mc:MovieClip = new MovieClip();
test_mc.addChild(item);
var r1:Reflect = new Reflect({mc:test_mc, alpha:50, ratio:50,
distance:0, updateTime:0, reflectionDropoff:1});test_

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines