A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: offline/online problems with BitmapData class

Threaded View

  1. #1
    Junior Member
    Join Date
    Apr 2001

    Question offline/online problems with BitmapData class

    I'm trying to understand why this code does not work when viewed online vs. offline.... and of course what can I do to fix it?

    this is a simple example of snapshotting an image that was loaded into an mc using loadClip lifted from flash8 livedocs.

    to test offline paste this into flash8

    online version here:

    please advise, thanks!

    import flash.display.BitmapData;
    scale=150 //scale percentage
    //normzalize the scale
    //create a new transformation matrix
    scaleMatrix = new Matrix()
    // create a clip with visual content
    original = this.createEmptyMovieClip("orig", this.getNextHighestDepth());
    loader = new MovieClipLoader();
    loader.loadClip("http://images.businessweek.com/ss/06/06/bills_milestones/image/windows.jpg", original);
    function onLoadInit()
    // create a BitmapData object with the same size
    var myBitmapData:BitmapData = new BitmapData(original._width, original._height);
    // attach the Bitmap to a clip so that it will be rendered on screen
    var copy:MovieClip = this.createEmptyMovieClip("cop", this.getNextHighestDepth());
    copy.attachBitmap(myBitmapData, this.getNextHighestDepth());
    copy._x = 100;
    // take a 'snapshot'
    Last edited by roninz; 08-30-2006 at 04:14 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center