oop - added Children but objects not displaying in Flash -


i'm adding series of objects dynamically flash movie xml won't appear when run movie. have identical code adding objects in different swf works fine. have tested 8 ways sunday including ensuring added container child of main movieclip (tested display list), added stage (had listener added_to_stage) , position correct (displayed x,y values , compared them mousex & mousey values). in correct place in display list. still there no objects. class linked correctly, have movie clips in library.

any ideas causing problem? feel i've checked everything.

'public class minimap extends movieclip {

    private var exploader:loadxml = new loadxml("experiences.xml",true);     public var explist:xmllist;     private var popcont:sprite = new sprite();     private var pop:popup;     private var expcont:sprite = new sprite();     private var pnt:point;     private var exp:experiences;       public function minimap()     {         // requires mouseup mousedown (pan) , close functions         //must load experiences have own class         popcont.name = "popcont";         expcont.name = "expcont";         expcont.x = 0;         expcont.y = 0;         expcont.visible = true;         expcont.width = 4000;         expcont.height = 3000;         mm.addeventlistener(mouseevent.mouse_down, panmap, false, 0, true);         exploader.addeventlistener("xmlloaded", onloadexp);         mm.addchild(popcont);         mm.addchildat(expcont, 2);     }     private function onloadexp(e:event):void     {            explist = new xmllist(exploader.xml.*);         trace(explist.longitude[1]);          (var i:int = 0; < 3; i++)         {             exp = new experiences(explist.description[i],explist.experience_name[i]);             exp.x = * 0.5 + 1156;             exp.y = i*0.75 + 1651;             exp.name = explist.experience_id[i];              /*exp.x = 1284.3216 * explist.longitude[i] + 101472.0151;             exp.y = -1744.6503 * explist.latitude[i] + 80213.7461;*/              exp.titl = explist.experience_name[i];             exp.desc = explist.description[i];              exp.phourl = explist.photo[i];             exp.type = explist.county[i];              switch (exp.type)             {                 case "city of kawartha lakes" :                     exp.gotoandplay("yellow");                     break;                 case "peterborough county" :                     exp.gotoandplay("green");                     break;                 case "northumberland county" :                     exp.gotoandplay("blue");                     break;                 case "northumberland" :                     exp.gotoandplay("red");                     break;             }             exp.addeventlistener(mouseevent.click, onexpclick, false,0, true);             exp.addeventlistener(event.added_to_stage, onadded, false,0, true);              expcont.addchild(exp);          }          trace(expcont.root);      }        private function onexpclick(m:mouseevent):void     {          //check other popups          if (popcont.numchildren > 0)         {             closepop();         }          pop = new popup(m.target.titl,m.target.desc);         pop.closer.addeventlistener(mouseevent.click, closepop);         mm.popcont.addchild(pop);       }      private function onadded(e:event):void     {          trace(e.target.name + " added stage @ "+e.target.x + ", " + e.target.y);       }      private function closepop():void {         mm.popcont.removechildat(0);     }      private function panmap(m:mouseevent):void     {         //click , drag pan minimap         mm.startdrag();         trace(mousex+", "+mousey);         mm.addeventlistener(mouseevent.mouse_up, relsmap, false, 0, true);     }      private function relsmap(m:mouseevent):void     {         //drops minimap         mm.stopdrag();      }' 

have used addchild() command once object have been loaded flash? need add objects display list them show on stage (assuming coding in as3)

http://forums.creativecow.net/thread/190/864240


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -