I don't think this is enough code... myPopout extends Sprite or MovieClip or
something?
What if in your other class you did this:

var myPopout:myPopout = new myPopout(e.target,this.btnNum,this.cityList);
addChild(myPopout);

?

I don't think we know enough about what you are doing...


On Fri, Jul 16, 2010 at 3:40 PM, J.C. Berry <jcharlesbe...@gmail.com> wrote:

> >From separate class:
> var myPopout:myPopout = new myPopout(e.target,this.btnNum,this.cityList);
> //Calls below
>
> >From other class:
>
> public function myPopout(stageBtn,btnNum,cityList){//constructor
>            this.btnNum = btnNum;
>            this.cityList = cityList;
>            this.stageBtn = stageBtn;
>            initPopout(stageBtn,btnNum,cityList);
>        }
>
> public function initPopout(stageBtn,btnNum,cityList){
>            if(btnNum < 25){
>                trace(this);
>                var popInstance:Tba = new Tba();
>                popInstance.x = 10;
>                popInstance.y = 10;
>                popInstance.name = 'cityPopout'+btnNum+'_mc';
>                popInstance.alpha = 1;
>                addChild(popInstance);//no error or result
>
> So here it only works if I use stageBtn.addChild(popInstance)
>
>
>
>
>
> On Fri, Jul 16, 2010 at 12:33 PM, Mattheis, Erik (MIN-WSW) <
> ematth...@webershandwick.com> wrote:
>
> > Yes, more code please.
> >
> > _ _ _
> > Erik Mattheis
> > Senior Web Developer
> > Minneapolis
> > T  952 346 6610
> > C 612 377 2272
> >
> > Weber Shandwick
> > Advocacy starts here.
> >
> > PRWeek Global Agency Report Card 2009 - Gold Medal Winner
> > The Holmes Report Global Agency of the Year
> > PR News Agency of the Year
> >
> >
> > -----Original Message-----
> > From: flashcoders-boun...@chattyfig.figleaf.com [mailto:
> > flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of J.C. Berry
> > Sent: Friday, July 16, 2010 2:08 PM
> > To: Flash Coders List
> > Subject: Re: [Flashcoders] Help with addChild
> >
> > You are right. But do you know what it could be, Henrik? Do you need to
> see
> > some more code?
> >
> > On Fri, Jul 16, 2010 at 1:34 AM, Henrik Andersson <he...@henke37.cjb.net
> > >wrote:
> >
> > > Deepanjan Das wrote:
> > >
> > >> Hi,
> > >> I think the stage has not yet been initiated, hence the addChild is
> not
> > >> working.
> > >> Try to get hold of the stage first and then so an addChild.
> > >>
> > >
> > > While that is indeed a common problem, it is not the current problem.
> He
> > is
> > > adding to the main timeline, not the stage.
> > >
> > > _______________________________________________
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> >
> >
> >
> > --
> > J.C. Berry, M.A.
> > UI Developer
> > 619.306.1712(m)
> > jcharlesbe...@gmail.com
> > portfolio: http://Client:maz...@www.mindarc.com
> >
> >
> ------------------------------------------------------------------------------------------------------------------------------------------------
> >
> > This E-mail is covered by the Electronic Communications Privacy Act, 18
> > U.S.C. ?? 2510-2521 and is legally privileged. This information is
> > confidential information and is intended only for the use of the
> individual
> > or entity named above. If the reader of this message is not the intended
> > recipient, you are hereby notified that any dissemination, distribution
> or
> > copying of this communication is strictly prohibited.
> >
> >
> ------------------------------------------------------------------------------------------------------------------------------------------------
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > _______________________________________________
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
>
> --
> J.C. Berry, M.A.
> UI Developer
> 619.306.1712(m)
> jcharlesbe...@gmail.com
> portfolio: http://Client:maz...@www.mindarc.com
>
> ------------------------------------------------------------------------------------------------------------------------------------------------
>
> This E-mail is covered by the Electronic Communications Privacy Act, 18
> U.S.C. ?? 2510-2521 and is legally privileged. This information is
> confidential information and is intended only for the use of the individual
> or entity named above. If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination, distribution or
> copying of this communication is strictly prohibited.
>
> ------------------------------------------------------------------------------------------------------------------------------------------------
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
http://ericd.net
Interactive design and development
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to