Arrays/attachmovie/bitmapdata/xml :(

Hi, i have a wierd problem with my little app…
I’am loading image via xml to empty movieclip, and later i draw it with BitmapData.draw();

everything works fine when iam drawing first item of my images array -> myBitmap.drwa(myImages[0]); but when iam trying to draw second item its not working :frowning:

enyone had problem like this ? could someone p[oint me to a solution ?

sorry for my poor english and thanks for help.

bump, please help

bump…

anyone ?

I don’t know the answer to your problem but next time you will be more likely to get help if you don’t post useless replies. Often people check to see if a forum is replied to already before reading and put it at the end of the list for ones to check. I know I do :frowning:

sorry guys, i’am a bit desperate… here’s my code:


import flash.display.BitmapData;
import flash.geom.Matrix;
import flash.geom.Rectangle;
import de.flash_fmp.FMP; 
FMP.initialize();  
#include "lmc_tween.as"
var myImages:Array = new Array();
var images:Array = new Array();
var lineArray:Array = new Array();
var Bmp:Array = new Array();
var clip:Array = new Array();
var referenceTo:String = new String();
var fillColor = 0xFFFF0000;
var myMatrix:Matrix = new Matrix();
myMatrix.translate(326, 93);
/////////////////////////////////////////////
var xmlPoloKolorowanka:XML = new XML();
xmlPoloKolorowanka.ignoreWhite = true;
xmlPoloKolorowanka.onLoad = loadXML;
function loadXML(bSuccess) {
	if (bSuccess) {
		xmlNode = this.firstChild;
		picture = [];
		thumb = [];
		base = [];
		lineart = [];
		show_content();
		//----------------------------------------------------------------------------------\\
	} else {
		content_mc.content_txt.text = "error";
	}
}
function show_content() {
	//Starting x & y values
	var columns = 3;
	var panels_spacing = 105;
	total = xmlNode.childNodes.length;
	//For loop to attach our container movieclip and pass the xml information
	for (i=0; i<total; i++) {
		//define xml ****
		picture* = xmlNode.childNodes*;
		thumb* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
		base* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
		lineart* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
		//trace(thumb*);
		//trace(base*);
		//trace(lineart*);
		//attach the container clip
		var currThumb:MovieClip = thumbsh.attachMovie("thumb", "thumb"+i, i, {_x:50, _y:40});
		var currPicture:MovieClip = this.attachMovie("picture", "pic"+i, i, {_x:0, _y:0});
		var currLineArt:MovieClip = mc2.attachMovie("lineart", "line"+i, i, {_x:0, _y:0});
		////////////////////////////////////////////
		images.push(base*);
		myImages.push(currPicture);
		lineArray.push(currLineArt);
		////////////////////////////////////////////
		currThumb._x = (i%columns)*panels_spacing;
		currThumb._y = Math.floor(i/columns)*95;
		currLineArt.loadMovie(lineart*);
		var pm:Number = -1;
		if(i%2){
		pm = 1;
		} else {
	    pm = -1;
		}
		currThumb._rotation = random(25)*pm;
		currThumb.actualholder.loadMovie(thumb*);
		currThumb.onRelease = function(){

		}
		/////////////////////////////////////////////
	}
	startload(0);
/*
here is my problem, when i do startload(0); everything works fine, but when i do startload(1); bitmapdata wont draw my movieclip... image is loading nice, problem lies somewhere before Bmp[c].draw(myImages[c], myMatrix);
in go_draw function... ■■■■, i think i tried everything now, and still cant find answer.
*/
}
xmlPoloKolorowanka.load("xml/pictures.xml");
////////////////////////////////////////////////////////////////////////////////////////////////
function startload(j) {
	trace("Startload ignitiated"+d);
	myImages[j].loadMovie(images[j]);
	checkload(j);
}
function checkload(k) {
	trace("checkload ignitiated | Image = " + myImages[k]);
	this.onEnterFrame = function() {
		if (myImages[k]._width) {
			trace('success');
			delete this.onEnterFrame;
			preloader._visible = false;
			//go_draw(k);
		}
	};
}
function go_draw(c){
	for(g=0; g<lineArray.length; g++){
		lineArray[g]._visible = false;
	}
	//it's like here is something missing, but why it works for 1st mc in array, but wont for nextone ?
	clip[c] = this.createEmptyMovieClip("p"+c, 1);
    Bmp[c] = new BitmapData(860, 525, false, 0x00FF3300);
    clip[c].attachBitmap(Bmp[c], clip[c].getNextHighestDepth(), auto, true);
	Bmp[c].draw(myImages[c], myMatrix);
	lineArray[c]._visible = true;
	clip[c].Blur_blurX = 3;
	clip[c].Blur_blurY = 3;
	clip[c].useHandCursor = false;
	clip[c].onPress = function() {
		var pixel:String = Bmp[c].getPixel32(_xmouse, _ymouse).toString(16); 
		trace(pixel);
		if(pixel != "0"){
		Bmp[c].floodFill(_xmouse, _ymouse, fillColor);
		}
	
	};
	clip[c].swapDepths(5000);
	mc2.swapDepths(6000);
	paint.swapDepths(7000);	
	thumbsh.swapDepths(8000);
}


////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////