Регистрация: Mar 2009
Сообщений: 29
|
К сожалению, не выйдет 
Архив 895 кБ.
Учитывая мой опыт программирования во Флеше, невероятную спешку и много мусора в коде, уверен, что где-то что-то упустил..
В мувике 3 кадра:
1й кадр :
 Код:
splitD = function (str, delimiter) {
trace("splitLOAD");
str = str.split (delimiter[0]);
if (delimiter.length > 1) {
for (var i = 0; i < str.length; i++) {
if (str[i].indexOf (delimiter[1]) != -1) {
str[i] = splitD (str[i], delimiter.slice (1));
}
}
}
return str;
};
_global.animated = false;
_global.containerList = new (Array);
var inputstr:String = "bitmap,http://eaw.dxloo.com/png/10.png,126,38,127,127,0,0,0,100,1,0,100,0x000000,4,0,0,5,0,200,0xFF0000,6,0,0,100,0xFFFFFF,0x000000,4,0,0#text,0,389,71,500,1,0,0,0,100,2,0,100,0x000000,4,0,0,5,0,200,0xFF0000,6,0,0,100,0xFFFFFF,0x000000,4,0,Input Text Here,Arial,72,0,0,0,0x00FFFF,0xFFFFFF,100,0";//_level0.inputarray;
var InputList:Array = splitD(inputstr, ["#", ","]);
//var InputList:Array = [["text","", [95, 72], [1000, 128], 0, [0, 0], 40,1, [[0, 100, 0x0033cc, 4, 0], [0, 5], [0, 200, 0xff33cc, 6, 0], [0, 100, 0xFF0000, 0xff33cc, 4, 0]], "The Text",["Arial", 72, [1,0,0], "0x002F00", "0x00FFFF" ,32, 0]],["bitmap","http://eaw.dxloo.com/html/lib/logos/10.png", [5, 31], [55,128], 0, [0, 0], 60,1, [[0, 100, 0xff33cc, 4, 1], [0, 5], [0, 200, 0xff33cc, 10, 0], [0, 100, 0xFF0000, 0xff33cc, 4, 0]], 0,0],["bitmap","http://eaw.dxloo.com/html/lib/logos/104.png", [142, 31], [65,45], 0, [0, 0], 60,2, [[0, 100, 0xff33cc, 4, 1], [0, 5], [0, 200, 0xff33cc, 10, 0], [0, 100, 0xFF0000, 0xff33cc, 4, 0]], 0,0]];
var counter:Number = 0;
trace("inputstr= " +inputstr);
trace("inputList= " +InputList);
for (i=0;i<InputList.length;i++){
if (InputList[i][0] == "bitmap"){
// var pWidth:Number = InputList[i][3][1];
// var pHeight:Number = InputList[i][3][2];
var mcLdr:MovieClipLoader = new MovieClipLoader();
var cont:MovieClip = this.createEmptyMovieClip("container_mc"+i, this.getNextHighestDepth());
mcLdr.loadClip(InputList[i][1], cont);
trace("Loading clip from: "+InputList[i][1]);
counter = counter +1;
mcLdr.addListener(this);
_global.containerList[i] = cont;
}else{
_global.containerList[i] = 0;
}
}
//function onLoadProgress(mc:MovieClip, l:Number, t:Number):Void
//{
// trace("подождите идёт загрузка....."+Math.round(l/t*100)+"%");
//}
function onLoadInit(cont:MovieClip, counter) {
if (counter < InputList.length) {
//stop();
// this.mcLdr.removeListener(this);
// delete this.mcLdr;
// //cont._width = this.pWidth;
// //cont._height = this.pHeight;
}else{
gotoAndPlay(2);
}
}
|