Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Actionscript / December 2005



Tip: Looking for answers? Try searching our database.

How I Copy loaded bitmap ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Kagada - 31 Dec 2005 01:56 GMT
I'm using this following script

cena = new BitmapData(550,400 , false, 0x00CCCCCC);
var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());

clipe = this.createEmptyMovieClip("clipe",this.getNextHighestDepth());
clipe.loadMovie("E:\\Rafel Geral\\Bread\\Gifs\\barracima.gif",GET);

How i copy the pixels from the MovieClip "clipe" to the BitmapData ?
kglad - 31 Dec 2005 02:15 GMT
use the draw method of bitmaps :

cena.draw(clipe);
Kagada - 31 Dec 2005 02:47 GMT
Doesn't Work !

Here are the complete code

--------------------------------------------------------------------------------
------

import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.Matrix;
import flash.geom.ColorTransform;

//Create e retangle with gray color...
cena = new BitmapData(550,400 , false, 0x00CCCCCC);

this.createEmptyMovieClip("image_mc", this.getNextHighestDepth());
var mclListener:Object = new Object();

mclListener.onLoadComplete = function(target_mc:MovieClip, httpStatus:Number){
    trace("Loaded!");
    target_mc._parent.desenha();
   
}

mclListener.onLoadError = function(target_mc:MovieClip, errorCode:String) {
    trace(errorCode);
}

var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip("E:\\Rafel Geral\\Bread\\Gifs\\barracima.gif", image_mc);

this.createEmptyMovieClip("teste", this.getNextHighestDepth());
desenha = function(){
    this.cena.draw(image_mc,new Matrix(),new ColorTransform());
    this.teste.attachBitmap(cena,1);
}


--------------------------------------------------------------------------------
-------------------------------------
NSurveyor - 31 Dec 2005 04:52 GMT
Change onLoadComplete to onLoadInit
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.