[Flashcoders] What heck is up with parent in actionscript 3?

2008-12-10 Thread Carl Welch

Hi again,

I am trying to call a function to a parent of a movieclip. I've tried  
these two items that I found but to no avail:


(this.parent.parent as MovieClip).callMedia(String(audio));

AND:

MovieClip(parent.parent).callMedia(String(audio));


Am I missing something? I'm finding that everything I took for granted  
in AS2 is now convoluted in AS3... I'm so frustrated.



--
Carl Welch
http://www.carlwelch.com
http://www.jointjam.com
[EMAIL PROTECTED]
805.403.4819




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] What heck is up with parent in actionscript 3?

2008-12-10 Thread strk
On Wed, Dec 10, 2008 at 01:49:02PM -0800, Carl Welch wrote:

 Am I missing something? I'm finding that everything I took for granted  
 in AS2 is now convoluted in AS3... I'm so frustrated.

Don't use it !
Running after latest and greatest thing isn't necessarely
a good thing. Beside, no free flash player supports AS3
at the moment, so your choice will affect freedom of people
to use the content you make available.

--strk;
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] What heck is up with parent in actionscript 3?

2008-12-10 Thread Matt S.
A decent explanation of Parent and how to use it (if you must) in AS3:
http://joshblog.net/2007/07/12/disabling-actionscript-3-strict-mode-in-flash-cs3/

I'm not sure what Strk means about no free flash player supports
AS3, since the last time I checked the ADOBE Flash Player was free...

.m

On Wed, Dec 10, 2008 at 5:00 PM, strk [EMAIL PROTECTED] wrote:
 On Wed, Dec 10, 2008 at 01:49:02PM -0800, Carl Welch wrote:

 Am I missing something? I'm finding that everything I took for granted
 in AS2 is now convoluted in AS3... I'm so frustrated.

 Don't use it !
 Running after latest and greatest thing isn't necessarely
 a good thing. Beside, no free flash player supports AS3
 at the moment, so your choice will affect freedom of people
 to use the content you make available.

 --strk;
 ___
 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] What heck is up with parent in actionscript 3?

2008-12-10 Thread Dave Watts
 I'm not sure what Strk means about no free flash player supports
 AS3, since the last time I checked the ADOBE Flash Player was free...

I would assume he means free software in the software libre sense:
http://en.wikipedia.org/wiki/Free_software

That said, I wouldn't take that as serious advice, because the vast
majority of people have Adobe Flash Player.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] What heck is up with parent in actionscript 3?

2008-12-10 Thread Glen Pike
Strk: Are you trolling or something, because you are seriously ill 
advised if you think that no-one is using a Flash Player that supports AS3.


Carl:

   I don't think that you can easily walk up and down the display list 
in AS3 like you could in AS2 - as I don't think MovieClip has a 
callMedia func, you can't cast something to a MovieClip then call the 
function.  You could try casting it as your class with the callMedia 
function:


   (this.parent.parent as MediaCaller).callMedia(...)

   I would have a look at this article, but you may be better off 
looking at dispatching events from your this and listening for them in 
parent.parent


   
http://joshblog.net/2007/07/12/disabling-actionscript-3-strict-mode-in-flash-cs3/


   HTH

   Glen


Don't use it !
Running after latest and greatest thing isn't necessarely
a good thing. Beside, no free flash player supports AS3
at the moment, so your choice will affect freedom of people
to use the content you make available.

--strk;
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  


--

Glen Pike
01326 218440
www.glenpike.co.uk http://www.glenpike.co.uk

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] What heck is up with parent in actionscript 3?

2008-12-10 Thread Carl Welch

No free flash player supports AS3? Really? I'm not so sure about that.

plus this project calls for some flash 9 specific imtems such as  
computeSpectrum and mp4 playback...


There has to be a way to make a call to a MC's parent... isn't there?

On Dec 10, 2008, at 2:00 PM, strk wrote:


On Wed, Dec 10, 2008 at 01:49:02PM -0800, Carl Welch wrote:

Am I missing something? I'm finding that everything I took for  
granted

in AS2 is now convoluted in AS3... I'm so frustrated.


Don't use it !
Running after latest and greatest thing isn't necessarely
a good thing. Beside, no free flash player supports AS3
at the moment, so your choice will affect freedom of people
to use the content you make available.

--strk;
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


--
Carl Welch
http://www.carlwelch.com
http://www.jointjam.com
[EMAIL PROTECTED]
805.403.4819




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] What heck is up with parent in actionscript 3?

2008-12-10 Thread Barry Hannah
...no free flash player... I don't recall ever having to pay for the
Flash player.
I can't believe I'm asking this, but what _are_ you on about?

*opens can of worms, stands back*



 Don't use it !
 Running after latest and greatest thing isn't necessarely
 a good thing. Beside, no free flash player supports AS3
 at the moment, so your choice will affect freedom of people
 to use the content you make available.


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] What heck is up with parent in actionscript 3?

2008-12-10 Thread Muzak

Latest and greatest? AS3 has been around since 2006.

Whatever planet you've been on, welcome back to earth.. :-)

- Original Message - 
From: strk [EMAIL PROTECTED]

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, December 10, 2008 11:00 PM
Subject: Re: [Flashcoders] What heck is up with parent in actionscript 3?



On Wed, Dec 10, 2008 at 01:49:02PM -0800, Carl Welch wrote:

Am I missing something? I'm finding that everything I took for granted  
in AS2 is now convoluted in AS3... I'm so frustrated.


Don't use it !
Running after latest and greatest thing isn't necessarely
a good thing. Beside, no free flash player supports AS3
at the moment, so your choice will affect freedom of people
to use the content you make available.

--strk;


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] What heck is up with parent in actionscript 3?

2008-12-10 Thread Muzak

First you should probably ask yourself why you're using parent, let alone 
parent.parent.

Try tracing both parent and parent.parent, see if what comes up is what you're 
after.

regards,
Muzak

- Original Message - 
From: Carl Welch [EMAIL PROTECTED]

To: Flash Coders List flashcoders@chattyfig.figleaf.com
Sent: Wednesday, December 10, 2008 10:49 PM
Subject: [Flashcoders] What heck is up with parent in actionscript 3?



Hi again,

I am trying to call a function to a parent of a movieclip. I've tried  
these two items that I found but to no avail:


(this.parent.parent as MovieClip).callMedia(String(audio));

AND:

MovieClip(parent.parent).callMedia(String(audio));


Am I missing something? I'm finding that everything I took for granted  
in AS2 is now convoluted in AS3... I'm so frustrated.



--


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] What heck is up with parent in actionscript 3?

2008-12-10 Thread Carl Welch
thanks... I just tried this before seeing your reply... and it  
worked... YES!


MovieClip(parent).callMedia(String(audio));


On Dec 10, 2008, at 2:14 PM, Matt S. wrote:


A decent explanation of Parent and how to use it (if you must) in AS3:
http://joshblog.net/2007/07/12/disabling-actionscript-3-strict-mode-in-flash-cs3/

I'm not sure what Strk means about no free flash player supports
AS3, since the last time I checked the ADOBE Flash Player was free...

.m

On Wed, Dec 10, 2008 at 5:00 PM, strk [EMAIL PROTECTED] wrote:

On Wed, Dec 10, 2008 at 01:49:02PM -0800, Carl Welch wrote:

Am I missing something? I'm finding that everything I took for  
granted

in AS2 is now convoluted in AS3... I'm so frustrated.


Don't use it !
Running after latest and greatest thing isn't necessarely
a good thing. Beside, no free flash player supports AS3
at the moment, so your choice will affect freedom of people
to use the content you make available.

--strk;
___
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


--
Carl Welch
http://www.carlwelch.com
http://www.jointjam.com
[EMAIL PROTECTED]
805.403.4819




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] What heck is up with parent in actionscript 3?

2008-12-10 Thread Barry Hannah
Seriously, consider dispatching an event from the child, listened to by
the parent.


 There has to be a way to make a call to a MC's parent... isn't there?


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] What heck is up with parent in actionscript 3?

2008-12-10 Thread Ashim D'Silva
I'd say, if the freedom is troubling you in general, disable strict mode.Not
a good solution if you want to do some real heavy stuff, but doesn't seem
the case.

2008/12/11 Dave Watts [EMAIL PROTECTED]

  I'm not sure what Strk means about no free flash player supports
  AS3, since the last time I checked the ADOBE Flash Player was free...

 I would assume he means free software in the software libre sense:
 http://en.wikipedia.org/wiki/Free_software

 That said, I wouldn't take that as serious advice, because the vast
 majority of people have Adobe Flash Player.

 Dave Watts, CTO, Fig Leaf Software
 http://www.figleaf.com/

 Fig Leaf Software provides the highest caliber vendor-authorized
 instruction at our training centers in Washington DC, Atlanta,
 Chicago, Baltimore, Northern Virginia, or on-site at your location.
 Visit http://training.figleaf.com/ for more information!
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
The Random Lines
My online portfolio
www.therandomlines.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] What heck is up with parent in actionscript 3?

2008-12-10 Thread Ian Thomas
Carl,
  .callMedia isn't a method of MovieClip.

  You need to cast it (using the 'as' operator) to whatever class you
are defining callMedia in. Possibly your document class? (Don't know
your setup.)

  (I'd also suggest you take a look at dispatching events rather than
directly referencing the parent as you're doing here - AS3 is very
event-based, and once you get into using events, the whole framework
will make a lot more sense...)

Ian

On Wed, Dec 10, 2008 at 9:49 PM, Carl Welch [EMAIL PROTECTED] wrote:
 Hi again,

 I am trying to call a function to a parent of a movieclip. I've tried these
 two items that I found but to no avail:

 (this.parent.parent as MovieClip).callMedia(String(audio));

 AND:

 MovieClip(parent.parent).callMedia(String(audio));


 Am I missing something? I'm finding that everything I took for granted in
 AS2 is now convoluted in AS3... I'm so frustrated.


 --
 Carl Welch
 http://www.carlwelch.com
 http://www.jointjam.com
 [EMAIL PROTECTED]
 805.403.4819




 ___
 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] What heck is up with parent in actionscript 3?

2008-12-10 Thread Latcho
If your class extends MovieClip, it has to be added to that parent by 
means of addChild and (child.)stage should be true

otherwise there isn't a parent-child relation.
Latcho

Carl Welch wrote:

Hi again,

I am trying to call a function to a parent of a movieclip. I've tried 
these two items that I found but to no avail:


(this.parent.parent as MovieClip).callMedia(String(audio));

AND:

MovieClip(parent.parent).callMedia(String(audio));


Am I missing something? I'm finding that everything I took for granted 
in AS2 is now convoluted in AS3... I'm so frustrated.





___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders