# Web Browser BitmapData Bug?

**URL:** <https://forum.kirupa.com/t/web-browser-bitmapdata-bug/241267>\
**Category:** flash\
**Created:** [October 11, 2007, 4:42pm UTC](https://forum.kirupa.com/t/web-browser-bitmapdata-bug/241267 "2007-10-11T16:42:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amatter](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@amatter](https://forum.kirupa.com/u/amatter)\
**Post date:** [October 11, 2007, 4:42pm UTC](https://forum.kirupa.com/t/web-browser-bitmapdata-bug/241267/1 "2007-10-11T16:42:21Z")

</div>

I have created an document image viewer in AS2 using CS3 that loads an external jpeg. There’s a “lens tool” that simulates a magnifying lens for easier reading of the document. Here’s an example including the bug:  
[http://treebuilder.findmypast.com/mediaviewer/mediaviewer.php?DBID=8d07aeb165b45be1cad6642d0bad62d0&MediaID=1869f45810f12eb34c4d29ae7512da28](http://treebuilder.findmypast.com/mediaviewer/mediaviewer.php?DBID=8d07aeb165b45be1cad6642d0bad62d0&MediaID=1869f45810f12eb34c4d29ae7512da28)

```auto
    import flash.display.BitmapData;
    var origScale:Number = _root.contentContainer._xscale;
    _root.contentContainer._xscale = _root.contentContainer._yscale=100;

    var imageBitmap:BitmapData = new BitmapData(_root.contentContainer._width, _root.contentContainer._height);
    imageBitmap.draw(_root.contentContainer);

    _root.contentContainer._xscale = _root.contentContainer._yscale=origScale;

    var cM_mc:MovieClip = _root.createEmptyMovieClip("contentMagnified", _root.getNextHighestDepth()); 
    cM_mc.attachBitmap(imageBitmap,cM_mc.getNextHighestDepth());

    var MagnifierMask_mc:MovieClip = cM_mc.attachMovie("MagnifierMask", "MagnifierMask_mc", cM_mc.getNextHighestDepth());
    MagnifierMask_mc._x = _root.contentContainer._x+50;
    MagnifierMask_mc._y = _root.contentContainer._y+50;

```

The user can drag the “lens” around the view to view the magnified content.

The SWF works like a charm in the Flash IDE but when I load it in a web browser, the jpeg loads in normally but the cM\_mc clip appears only as a white box with the appropriate dimensions. Any ideas? Thanks!

Examples:

[![](http://img106.imageshack.us/img106/1033/sp3220071011173729qi1.th.jpg)](http://img106.imageshack.us/my.php?image=sp3220071011173729qi1.jpg)  
(in Flash CS3 IDE)

[![](http://img221.imageshack.us/img221/7994/sp3220071011173822rj7.th.jpg)](http://img221.imageshack.us/my.php?image=sp3220071011173822rj7.jpg)  
(in FireFox w/ Player 9,0,45,0 on XP Pro)
