Advanced Flash Components
Search!
Search!
Home >  Blog >  View Post

Bitmap reflections are one of the latest trends in Flash design. Inspired by this, we’ve created our own bitmap reflection class. We needed a scalable reflection class that would fit into our component framework, meaning that it had to be really fast, clean code. We took Ben Pritchard’s framework and wrote an entirely new reflection library. The result of our work is compatible with any ActionScript 3.0 project and can be seen and downloaded below.

Give it a try and let us know what you think. Feel free to use it on any project, personal or professional. Any help you can provide with feedback or “spreading the word” would be greatly appreciated.

p.s. full documentation is coming soon

Download the AFC Reflection Source Files: AFC_Reflection.zip
Right click the link and choose “Save Link As … “

Code Sample

import flash.display.*;
import com.afcomponents.common.display.*;

// Create sample bitmap
var bitmapData:BitmapData = new BitmapData(200, 200);
bitmapData.noise(1);
var bitmap:Bitmap = new Bitmap(bitmapData);
this.addChild(bitmap);
bitmap.x = 50;
bitmap.y = 50;

// Create reflection
var afcReflection:BitmapReflection = new BitmapReflection(bitmap);
this.addChild(afcReflection);

15 Responses to “ActionScript 3.0 Reflection Class”

  1. slee Says:

    that is really nice! it is such a simple thing but looks so good

  2. Ron Says:

    Nice stuff !

  3. wigz Says:

    Thanks guys - if you have a chance to use it, send us a link. Thanks!

  4. Rob Says:

    Very nice.

  5. richard summerhayes Says:

    Thanks for the great work…

    Will be using it in my next project…will send a link

    Looking forward to the documentation.

  6. Özgür ALTAY Says:

    This is very powerful with videos. I cannot imagine how fast it works with AS2, but this works very smooth with AS3…

    Thanks for sharing the code and samples. We are waiting for the documentation :)

  7. wMan Says:

    Nice idea, but I think the class takes a lot of performance.
    Tried to use it for some animations and if I use that class my performance goes down a lot.
    I think its depending on the Timer, but there no positive effect be setting the refreshRate to e.g. 5000.
    Its still slow.

    It would be nice if you can create just a refleciton one time and if you need a redraw you can call it by a function.
    just investigating the classes now and try to find out wether this is possible …

    Maybe you can help me out.

    Thanks&Regards from Hamburg/Germany

  8. wMan Says:

    Ok I found a solution.
    I set the userReflector to false and call the refresh() method of the BitmapReflection class.

  9. Radek Says:

    Please help me :-(

    Error #2044: Unhandled skinError:. text=[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2035: URL Not Found. URL: file:///swf/blog/SkinOverPlay.swf"]
    Error opening URL ‘http://www.afcomponents.com/flv/vid/sample.flv’
    VideoError: 1000: Unable to make connection to server or to find FLV on server
    at fl.video::VideoPlayer/seek()
    at fl.video::FLVPlayback/http://www.adobe.com/2007/flash/flvplayback/internal::showFirstStream()
    at fl.video::FLVPlayback/http://www.adobe.com/2007/flash/flvplayback/internal::handleVideoEvent()
    at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::setState()
    at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::httpNetStatus()

  10. Andrei Says:

    The player can not find the skin file which is located on our server. This can be fixed by changing the skin path in the FLVPlayback component properties. Select the FLVPlayback component on stage and open the Component Inspector (Window>Component Inspector). I hope that helps.

  11. nkm Says:

    some news about the full documentation ? ;)
    it will help à lot ..

    thanks a lot guys for all your great work !

  12. Diego Says:

    Hi!: I was wondering if there´s a way to have two reflections with this script. One at the bottom and the other above. (like at http://www.nike.com) Could it be possible?? Thanks in advance! Diego

  13. Diego Says:

    I forgot to say: Great script!!, by the way…

  14. Extending Flash : Reflection Class from AF Components | Celldrifter Studio Says:

    [...] Advanced Flash Components Blog » Blog Archive » ActionScript 3.0 Reflection Class Posted in Blog, Design, Flash | Leave a Comment [...]

  15. ????.com » Blog Archive » Flash as3 ????? Reflection class Says:

    [...] Advanced Flash Components Blog » Blog Archive » ActionScript 3.0 Reflection Class [...]

Leave a Reply