Re: [Flashcoders] Help with addChild

2010-07-16 Thread J.C. Berry
OK thanks!

On Fri, Jul 16, 2010 at 3:24 PM, Karl DeSaulniers wrote:

> Hi JC,
> I was speaking of my code I had a while ago and it was also in AS2,
> but I had something like..
>
> var newArray:Array = new Array();
>
> and had to switch it to..
>
> var newArray = new Array();
>
> for it to work at all.
> May have been something in my code somewhere else
> that didn't like that strong typing of the array.
> Not completely sure why that worked, was just glad it worked finally after
> staring at it for many hrs. :)
> I did not test your code though, sry. Merely a suggestion to try.
>
> Karl
>
>
> On Jul 16, 2010, at 5:15 PM, J.C. Berry wrote:
>
>  Hey thanks, Karl, but did you say you tested that and it worked?
>>
>> On Fri, Jul 16, 2010 at 2:59 PM, Karl DeSaulniers > >wrote:
>>
>>  Hi JC,
>>> I think this should be
>>>
>>> var myPopoutObj = new myPopout(e.target,this.btnNum,
>>>
>>> Per his example. Not positive if it matters, but I have had experience
>>> with strong typing voiding out an array and when I took off the :Array it
>>> worked.
>>> Not sure why. Just a thought.
>>>
>>>
>>> Karl
>>>
>>>
>>>
>>> On Jul 16, 2010, at 4:49 PM, J.C. Berry wrote:
>>>
>>>  Didn't I try that with
>>>
>>>> var myPopoutObj:myPopout = new myPopout(e.target,this.btnNum,
>>>> this.cityList);
>>>> addChild(myPopoutObj);//Does not work either
>>>>
>>>> ? Help to be appreciated!
>>>>
>>>>
>>>>
>>>> On Fri, Jul 16, 2010 at 2:13 PM, Mattheis, Erik (MIN-WSW) <
>>>> ematth...@webershandwick.com> wrote:
>>>>
>>>>  If you're creating myPopout from within the document class or any other
>>>>
>>>>> class that has been added to the stage, you would say
>>>>>
>>>>> _myPopout = new myPopout();
>>>>> addChild(_myPopout);
>>>>>
>>>>> _ _ _
>>>>> 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 3:14 PM
>>>>> To: Flash Coders List
>>>>> Subject: Re: [Flashcoders] Help with addChild
>>>>>
>>>>> 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
>>>>>
>>>>> Yes, the last line in my "other class" (addChild(popInstance);)  adds
>>>>> the
>>>>> Tba instance, but it only works if I use one of the buttons on stage.
>>>>> How
>>>>> do
>>>>> I add a class (myPopout) to the stage?
>>>>>
>>>>>
>>>>> On Fri, Jul 16, 2010 at 1:03 PM, Mattheis, Erik (MIN-WSW) <
>>>>> ematth...@webershandwick.com> wrote:
>>>>>
>>>>>  I'd guess your "other class" is not in the display list. Do you say
>>>>>
>>>>>> addChild(OtherClass) anywhere?
>>>>>>
>>>>>> _ _ _
>>>>>> Erik Mattheis
>>>>>> Senior Web Developer
>>>>>> Minneapolis
>>>>>> T  952 346 6610
>>>>>> C 612 377 2272
>>>>>>
>>>>>> Weber Shandwick
>>>>>> Advocacy starts here.
>>>>>>
>>>>>> PRWeek Global Agency Report Card

Re: [Flashcoders] Help with addChild

2010-07-16 Thread Karl DeSaulniers

Hi JC,
I was speaking of my code I had a while ago and it was also in AS2,
but I had something like..

var newArray:Array = new Array();

and had to switch it to..

var newArray = new Array();

for it to work at all.
May have been something in my code somewhere else
that didn't like that strong typing of the array.
Not completely sure why that worked, was just glad it worked finally  
after staring at it for many hrs. :)

I did not test your code though, sry. Merely a suggestion to try.

Karl

On Jul 16, 2010, at 5:15 PM, J.C. Berry wrote:


Hey thanks, Karl, but did you say you tested that and it worked?

On Fri, Jul 16, 2010 at 2:59 PM, Karl DeSaulniers  
wrote:



Hi JC,
I think this should be

var myPopoutObj = new myPopout(e.target,this.btnNum,

Per his example. Not positive if it matters, but I have had  
experience
with strong typing voiding out an array and when I took off  
the :Array it

worked.
Not sure why. Just a thought.


Karl



On Jul 16, 2010, at 4:49 PM, J.C. Berry wrote:

 Didn't I try that with

var myPopoutObj:myPopout = new myPopout(e.target,this.btnNum,
this.cityList);
addChild(myPopoutObj);//Does not work either

? Help to be appreciated!



On Fri, Jul 16, 2010 at 2:13 PM, Mattheis, Erik (MIN-WSW) <
ematth...@webershandwick.com> wrote:

 If you're creating myPopout from within the document class or  
any other

class that has been added to the stage, you would say

_myPopout = new myPopout();
addChild(_myPopout);

_ _ _
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 3:14 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Help with addChild

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

Yes, the last line in my "other class" (addChild(popInstance);)   
adds the
Tba instance, but it only works if I use one of the buttons on  
stage. How

do
I add a class (myPopout) to the stage?


On Fri, Jul 16, 2010 at 1:03 PM, Mattheis, Erik (MIN-WSW) <
ematth...@webershandwick.com> wrote:

 I'd guess your "other class" is not in the display list. Do you  
say

addChild(OtherClass) anywhere?

_ _ _
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:40 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Help with addChild

 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



Re: [Flashcoders] Help with addChild

2010-07-16 Thread J.C. Berry
Hey thanks, Karl, but did you say you tested that and it worked?

On Fri, Jul 16, 2010 at 2:59 PM, Karl DeSaulniers wrote:

> Hi JC,
> I think this should be
>
> var myPopoutObj = new myPopout(e.target,this.btnNum,
>
> Per his example. Not positive if it matters, but I have had experience
> with strong typing voiding out an array and when I took off the :Array it
> worked.
> Not sure why. Just a thought.
>
>
> Karl
>
>
>
> On Jul 16, 2010, at 4:49 PM, J.C. Berry wrote:
>
>  Didn't I try that with
>> var myPopoutObj:myPopout = new myPopout(e.target,this.btnNum,
>> this.cityList);
>> addChild(myPopoutObj);//Does not work either
>>
>> ? Help to be appreciated!
>>
>>
>>
>> On Fri, Jul 16, 2010 at 2:13 PM, Mattheis, Erik (MIN-WSW) <
>> ematth...@webershandwick.com> wrote:
>>
>>  If you're creating myPopout from within the document class or any other
>>> class that has been added to the stage, you would say
>>>
>>> _myPopout = new myPopout();
>>> addChild(_myPopout);
>>>
>>> _ _ _
>>> 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 3:14 PM
>>> To: Flash Coders List
>>> Subject: Re: [Flashcoders] Help with addChild
>>>
>>> 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
>>>
>>> Yes, the last line in my "other class" (addChild(popInstance);)  adds the
>>> Tba instance, but it only works if I use one of the buttons on stage. How
>>> do
>>> I add a class (myPopout) to the stage?
>>>
>>>
>>> On Fri, Jul 16, 2010 at 1:03 PM, Mattheis, Erik (MIN-WSW) <
>>> ematth...@webershandwick.com> wrote:
>>>
>>>  I'd guess your "other class" is not in the display list. Do you say
>>>> addChild(OtherClass) anywhere?
>>>>
>>>> _ _ _
>>>> 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:40 PM
>>>> To: Flash Coders List
>>>> Subject: Re: [Flashcoders] Help with addChild
>>>>
>>>>  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'

Re: [Flashcoders] Help with addChild

2010-07-16 Thread Karl DeSaulniers

Hi JC,
I think this should be

var myPopoutObj = new myPopout(e.target,this.btnNum,

Per his example. Not positive if it matters, but I have had experience
with strong typing voiding out an array and when I took off  
the :Array it worked.

Not sure why. Just a thought.


Karl


On Jul 16, 2010, at 4:49 PM, J.C. Berry wrote:


Didn't I try that with
var myPopoutObj:myPopout = new myPopout(e.target,this.btnNum,
this.cityList);
addChild(myPopoutObj);//Does not work either

? Help to be appreciated!



On Fri, Jul 16, 2010 at 2:13 PM, Mattheis, Erik (MIN-WSW) <
ematth...@webershandwick.com> wrote:

If you're creating myPopout from within the document class or any  
other

class that has been added to the stage, you would say

_myPopout = new myPopout();
addChild(_myPopout);

_ _ _
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 3:14 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Help with addChild

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

Yes, the last line in my "other class" (addChild(popInstance);)   
adds the
Tba instance, but it only works if I use one of the buttons on  
stage. How

do
I add a class (myPopout) to the stage?


On Fri, Jul 16, 2010 at 1:03 PM, Mattheis, Erik (MIN-WSW) <
ematth...@webershandwick.com> wrote:


I'd guess your "other class" is not in the display list. Do you say
addChild(OtherClass) anywhere?

_ _ _
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:40 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Help with addChild


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




- 
---

Re: [Flashcoders] Help with addChild

2010-07-16 Thread J.C. Berry
Didn't I try that with
var myPopoutObj:myPopout = new myPopout(e.target,this.btnNum,
this.cityList);
addChild(myPopoutObj);//Does not work either

? Help to be appreciated!



On Fri, Jul 16, 2010 at 2:13 PM, Mattheis, Erik (MIN-WSW) <
ematth...@webershandwick.com> wrote:

> If you're creating myPopout from within the document class or any other
> class that has been added to the stage, you would say
>
> _myPopout = new myPopout();
> addChild(_myPopout);
>
> _ _ _
> 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 3:14 PM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Help with addChild
>
> 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
>
> Yes, the last line in my "other class" (addChild(popInstance);)  adds the
> Tba instance, but it only works if I use one of the buttons on stage. How
> do
> I add a class (myPopout) to the stage?
>
>
> On Fri, Jul 16, 2010 at 1:03 PM, Mattheis, Erik (MIN-WSW) <
> ematth...@webershandwick.com> wrote:
>
> > I'd guess your "other class" is not in the display list. Do you say
> > addChild(OtherClass) anywhere?
> >
> > _ _ _
> > 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:40 PM
> > To: Flash Coders List
> > Subject: Re: [Flashcoders] Help with addChild
> >
> > >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 c

RE: [Flashcoders] Help with addChild

2010-07-16 Thread Mattheis, Erik (MIN-WSW)
If you're creating myPopout from within the document class or any other class 
that has been added to the stage, you would say

_myPopout = new myPopout();
addChild(_myPopout);

_ _ _
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 3:14 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Help with addChild

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

Yes, the last line in my "other class" (addChild(popInstance);)  adds the
Tba instance, but it only works if I use one of the buttons on stage. How do
I add a class (myPopout) to the stage?


On Fri, Jul 16, 2010 at 1:03 PM, Mattheis, Erik (MIN-WSW) <
ematth...@webershandwick.com> wrote:

> I'd guess your "other class" is not in the display list. Do you say
> addChild(OtherClass) anywhere?
>
> _ _ _
> 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:40 PM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Help with addChild
>
> >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  > >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
> > >
> >
> >
&

Re: [Flashcoders] Help with addChild

2010-07-16 Thread J.C. Berry
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

Yes, the last line in my "other class" (addChild(popInstance);)  adds the
Tba instance, but it only works if I use one of the buttons on stage. How do
I add a class (myPopout) to the stage?


On Fri, Jul 16, 2010 at 1:03 PM, Mattheis, Erik (MIN-WSW) <
ematth...@webershandwick.com> wrote:

> I'd guess your "other class" is not in the display list. Do you say
> addChild(OtherClass) anywhere?
>
> _ _ _
> 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:40 PM
> To: Flash Coders List
> Subject: Re: [Flashcoders] Help with addChild
>
> >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  > >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 i

RE: [Flashcoders] Help with addChild

2010-07-16 Thread Mattheis, Erik (MIN-WSW)
I'd guess your "other class" is not in the display list. Do you say 
addChild(OtherClass) anywhere?

_ _ _
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:40 PM
To: Flash Coders List
Subject: Re: [Flashcoders] Help with addChild

>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  >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 o

Re: [Flashcoders] Help with addChild

2010-07-16 Thread J.C. Berry
MYMAP DOC CLASS->
package{
import fl.controls.TextArea;
import fl.containers.ScrollPane;
import fl.controls.Button;
import flash.display.*;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.net.URLLoader;
import fl.managers.StyleManager;

public class myMap extends MovieClip{
public var cityList:XMLList;

public function myMap(){
/*for each(var num:String in args){...args
trace(num);
}*/
var myXMLLoaderReq:URLRequest = new URLRequest('cities.xml');
var myXMLLoader:URLLoader = new URLLoader(myXMLLoaderReq);
//XML.ignoreWhitespace = false;
myXMLLoader.addEventListener(Event.COMPLETE, xmlLoaded);
}
public function xmlLoaded(e:Event){
var myBtnArr:Array = [];
var myXML:XML = new XML(e.target.data);
cityList = new XMLList(myXML.city);
var numOfCities:Number = cityList.length();
for(var i=0;i
package{
import flash.display.*;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.text.TextField;
import flash.text.TextFormat;
import fl.controls.Button;

public class myButtonInstantor extends MovieClip{
public var btnNum:Number;
public var btnName:String;
public var cityList:XMLList;
public function myButtonInstantor(){
}
public function getButtonInstance(obj,btnNum,cityList):MovieClip{
this.btnNum = btnNum;
this.cityList = cityList;
obj.gotoAndStop(1);

obj.addEventListener(MouseEvent.MOUSE_OVER,myBtnRollOverHandler);
obj.addEventListener(MouseEvent.MOUSE_OUT,myBtnRollOutHandler);
return this;
}
private function myBtnRollOutHandler(e:Event):void{
e.target.gotoAndStop(1);
}
public function myBtnRollOverHandler(e:Event):void{
e.target.gotoAndStop(2);
for (var k:int = 0; k < this.numChildren; k++){
if(this.getChildAt(k).name.indexOf('Popout')>-1 ||
this.getChildAt(k).name.indexOf('myTextBox')>-1){
this.removeChildAt(k);
}
}
var myPopoutObj:myPopout = new
myPopout(e.target,this.btnNum,this.cityList);
addChild(myPopoutObj);//Does not work either


MYBUTTONINSTANTOR CALLS->
package{
import fl.controls.TextArea;
import fl.controls.Button;
import fl.containers.ScrollPane;
import flash.display.*;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.net.URLRequest;
import flash.net.URLLoader;
import fl.managers.StyleManager;

public class myPopout extends MovieClip{
public var cityList:XMLList;
public var btnNum:Number;
public var stageBtn;


//public var popInstance:Tba = new Tba();
public var popInstance2:Tba2 = new Tba2();

public function myPopout(stageBtn,btnNum,cityList){
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); //broken here
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Help with addChild

2010-07-16 Thread Eric E. Dolecki
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  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  > >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

Re: [Flashcoders] Help with addChild

2010-07-16 Thread J.C. Berry
>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  >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


RE: [Flashcoders] Help with addChild

2010-07-16 Thread Mattheis, Erik (MIN-WSW)
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 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


Re: [Flashcoders] Help with addChild

2010-07-16 Thread Eric E. Dolecki
I lost the thread to this, but he is adding it to the document class if I
remember correctly. I think we'd need to see a little code again J.C.

On Fri, Jul 16, 2010 at 3:07 PM, J.C. Berry  wrote:

> 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  >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
>



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


Re: [Flashcoders] Help with addChild

2010-07-16 Thread J.C. Berry
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 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


Re: [Flashcoders] Help with addChild

2010-07-16 Thread Henrik Andersson

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


Re: [Flashcoders] Help with addChild

2010-07-15 Thread Deepanjan Das
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.

if(stage){

}else{
 addEventListener(Event.ADDED_TO_STAGE, onAddedToStage, false, 0, true);
}

private function onAddedToStage(e:Event):void
  {
   removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
addChild(...);
 }
Hope this helps.

Warm Regards
Deepanjan Das
M: +91 9836582808
W: http://deepanjandas.wordpress.com

"Think of the environment before printing this email"


On Fri, Jul 16, 2010 at 8:26 AM, J.C. Berry  wrote:

> Dear Group,
> I wondered if I could bother you a minute with a simple question. I have a
> document class that extends MovieClip, but my problem arises when I  use
> addChild to add some popups (movieclips) to the stage. They are only
> visible
> when I attach my popups to an on-stage button:
> mystagebtn.addChild(mypopup) but I get nothing when attaching using
> addChild() or this.addChild or this.parent.addChild   What reasons can
> there
> be for my clips not being visible?  As I said, my document class does
> extend
> MovieClip and I have searched for a few days now and reading on the doc
> class has not given me an answer. I wouldn't even mind a reference to a
> tutorial that could help me. Thanks.
> -JC
>
> On Wed, Jul 7, 2010 at 6:55 AM, allandt bik-elliott (thefieldcomic.com) <
> alla...@gmail.com> wrote:
>
> > does this line work?
> >
> >
> >
> DynaBtn.addEventListener(MouseEvent.MOUSE_OVER,DynaBtnRollOverHandler(CityNum));
> >
> > i wouldn't have thought it would (by using the brackets you are calling
> > that
> > function straight away)
> >
> > it should be
> >
> >
>  DynaBtn.addEventListener(MouseEvent.MOUSE_OVER,DynaBtnRollOverHandler);
> > }
> >
> > private function DynaBtnRollOverHandler(e:Event):void
> > {
> >// handle event
> > }
> >
> > and cityNum should be a property on DynaBtn so that you can use
> > (e.target as DynaBtn).cityNum
> > to recall the correct number
> >
> > best
> > a
> >
> > On 7 July 2010 14:40, Kerry Thompson  wrote:
> >
> > > J.C. Berry wrote:
> > >
> > > > I wondered if I could bother you to review the code below and make
> > > comments
> > > > and suggestions.
> > >
> > > It's not bad at all, especially for your first class. I didn't go
> > > through all your code, but one thing jumped out at me. These lines
> > > might give you problems:
> > >
> > > for(var i=0;i > >  CityNum = i;
> > >  var DynaBtn = root['city'+CityNum+'_mc'];
> > >  DynaBtn.gotoAndStop(1);
> > >
> > >
> >
>  
> DynaBtn.addEventListener(MouseEvent.MOUSE_OVER,DynaBtnRollOverHandler(CityNum));
> > >  DynaBtn.addEventListener(MouseEvent.MOUSE_OUT,DynaBtnRollOutHandler);
> > >
> > > First, you are going to have only one DynaBtn variable--the last one
> > > declared in the for loop. Each time you create an instance, it
> > > overwrites the last one. Fortunately for you, it works, but it won't
> > > always.
> > >
> > > The second issue is adding an event listener from outside the object.
> > > DynaBtn.addEventListener() will add the listener to the button, but
> > > you won't be able to remove the listener from outside the button.
> > >
> > > Instead, you should have a DynaBtn class, and add the listener in the
> > > constructor. Then you can remove the event listeners when you clean
> > > up.
> > >
> > > This applies, of course, to all the buttons you created.
> > >
> > > Nice job overall, though.
> > >
> > > Cordially,
> > >
> > > Kerry Thompson
> > > ___
> > > 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
>



--
___
Flashcoders mailing list

[Flashcoders] Help with addChild

2010-07-15 Thread J.C. Berry
Dear Group,
I wondered if I could bother you a minute with a simple question. I have a
document class that extends MovieClip, but my problem arises when I  use
addChild to add some popups (movieclips) to the stage. They are only visible
when I attach my popups to an on-stage button:
mystagebtn.addChild(mypopup) but I get nothing when attaching using
addChild() or this.addChild or this.parent.addChild   What reasons can there
be for my clips not being visible?  As I said, my document class does extend
MovieClip and I have searched for a few days now and reading on the doc
class has not given me an answer. I wouldn't even mind a reference to a
tutorial that could help me. Thanks.
-JC

On Wed, Jul 7, 2010 at 6:55 AM, allandt bik-elliott (thefieldcomic.com) <
alla...@gmail.com> wrote:

> does this line work?
>
>
> DynaBtn.addEventListener(MouseEvent.MOUSE_OVER,DynaBtnRollOverHandler(CityNum));
>
> i wouldn't have thought it would (by using the brackets you are calling
> that
> function straight away)
>
> it should be
>
>DynaBtn.addEventListener(MouseEvent.MOUSE_OVER,DynaBtnRollOverHandler);
> }
>
> private function DynaBtnRollOverHandler(e:Event):void
> {
>// handle event
> }
>
> and cityNum should be a property on DynaBtn so that you can use
> (e.target as DynaBtn).cityNum
> to recall the correct number
>
> best
> a
>
> On 7 July 2010 14:40, Kerry Thompson  wrote:
>
> > J.C. Berry wrote:
> >
> > > I wondered if I could bother you to review the code below and make
> > comments
> > > and suggestions.
> >
> > It's not bad at all, especially for your first class. I didn't go
> > through all your code, but one thing jumped out at me. These lines
> > might give you problems:
> >
> > for(var i=0;i >  CityNum = i;
> >  var DynaBtn = root['city'+CityNum+'_mc'];
> >  DynaBtn.gotoAndStop(1);
> >
> >
>  
> DynaBtn.addEventListener(MouseEvent.MOUSE_OVER,DynaBtnRollOverHandler(CityNum));
> >  DynaBtn.addEventListener(MouseEvent.MOUSE_OUT,DynaBtnRollOutHandler);
> >
> > First, you are going to have only one DynaBtn variable--the last one
> > declared in the for loop. Each time you create an instance, it
> > overwrites the last one. Fortunately for you, it works, but it won't
> > always.
> >
> > The second issue is adding an event listener from outside the object.
> > DynaBtn.addEventListener() will add the listener to the button, but
> > you won't be able to remove the listener from outside the button.
> >
> > Instead, you should have a DynaBtn class, and add the listener in the
> > constructor. Then you can remove the event listeners when you clean
> > up.
> >
> > This applies, of course, to all the buttons you created.
> >
> > Nice job overall, though.
> >
> > Cordially,
> >
> > Kerry Thompson
> > ___
> > 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