Autor | Zpráva | ||
---|---|---|---|
zbystr Profil * |
#1 · Zasláno: 3. 3. 2006, 09:22:42
Zdarvim .... mohli by jsti mi poradit, proc se nespusti funkce CreateListItem()??
pokud bych to pouzil normalne .... tedy pri nepouziti v class tak by to melo jet bez problemu ..... class imglist extends MovieClip { var XML, onPress; var imgArray:Array; var posY:Number = 20; function imglist(xml:XML, file:String) { xml.load(file); xml.ignoreWhite = true; xml.onLoad = function(success) { if (success) { for (var aNode:XMLNode = xml.firstChild.childNodes[0]; aNode != null; aNode = aNode.nextSibling) { this.CreateListItem(aNode.attributes.src); } } }; } function CreatePreview() { this.createEmptyMovieClip("preview_mc", 50); } public function CreateListItem(src:String) { var nextItem:Number = imgArray.length + 1; var itemname:String = "img_item_" + nextItem + "_mc"; imgArray[nextItem] = itemname; this.createEmptyMovieClip(itemname, nextItem); this[itemname]._y = posY * nextItem; this[itemname].createTextField("label_txt", 1, 0, 0, 50, 15); this[itemname].label_txt.text = src; this[itemname].label_txt.type = "dynamic"; this[itemname].onPress = function() { trace(this); }; } } Diky ZbySTr |
||
FlashManiac Profil |
#2 · Zasláno: 3. 3. 2006, 09:37:35
ta funkce jede uplne normálně,ale asi je tam neco špatně co se týká těch polí..
|
||
zbystr Profil * |
#3 · Zasláno: 3. 3. 2006, 09:45:04
pokud udelas toto:
function CreateListItem(src:String) { trace (src); } tak se nic nedeje .... takze chyba nebude v poli .... |
||
zbystr Profil * |
#4 · Zasláno: 3. 3. 2006, 12:27:15
vyreseno
|
||
Časová prodleva: 18 let
|
Toto téma je uzamčeno. Odpověď nelze zaslat.
0