Re: [Flashcoders] Access MainTimeline reference from within a component
yeah, still get [object LivePreviewParent]... On Wed, Aug 27, 2008 at 12:00 AM, poste9 [EMAIL PROTECTED] wrote: have u tried this.root ? 2008/8/27 Helmut Granda [EMAIL PROTECTED] Is it possible to access the MainTimeline from within a component? So far I havent been able to access it trying different methods. Most times I get the same result: trace(parent); trace(root); trace(this.parent); trace(this); trace(this.parent.parent); [object LivePreviewParent] [object LivePreviewParent] [object LivePreviewParent] [object MyComponent] [object Stage] But it seems to skip the MainTimeline... basically what I am trying to access is the File name which I can extract with Describe type for the MainTimeline, and of course this is easy with objects on the timeline. I have an init function in a component that tries to get the reference to the MainTimeline but so far no luck... any tips? -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- = Grupo Comunidade de Comunicação Rafael Lúcio 29809.099333, fazendo do seu website uma aplicação em tempo real ms xsl js(dom) css xhtml php mysql pgsql ajax json smarty drupal ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Access MainTimeline reference from within a component
Hi Helmut, try: for(var i:uint; istage.numChildren; i++){ trace(stage.getChildAt(i)); } best regards -- Leandro Amano Digital Bug Chief Creative Officer Adobe Certified Expert Adobe Certified Instructor Adobe User Group Leader On 8/27/08, Helmut Granda [EMAIL PROTECTED] wrote: yeah, still get [object LivePreviewParent]... On Wed, Aug 27, 2008 at 12:00 AM, poste9 [EMAIL PROTECTED] wrote: have u tried this.root ? 2008/8/27 Helmut Granda [EMAIL PROTECTED] Is it possible to access the MainTimeline from within a component? So far I havent been able to access it trying different methods. Most times I get the same result: trace(parent); trace(root); trace(this.parent); trace(this); trace(this.parent.parent); [object LivePreviewParent] [object LivePreviewParent] [object LivePreviewParent] [object MyComponent] [object Stage] But it seems to skip the MainTimeline... basically what I am trying to access is the File name which I can extract with Describe type for the MainTimeline, and of course this is easy with objects on the timeline. I have an init function in a component that tries to get the reference to the MainTimeline but so far no luck... any tips? -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- = Grupo Comunidade de Comunicação Rafael Lúcio 29809.099333, fazendo do seu website uma aplicação em tempo real ms xsl js(dom) css xhtml php mysql pgsql ajax json smarty drupal ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ...helmut ___ 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] Access MainTimeline reference from within a component
Thanks Leandro... this still gives me the following: [class Stage] [object MovieClip] hum On Wed, Aug 27, 2008 at 12:27 PM, Leandro Amano [EMAIL PROTECTED]wrote: Hi Helmut, try: for(var i:uint; istage.numChildren; i++){ trace(stage.getChildAt(i)); } best regards -- Leandro Amano Digital Bug Chief Creative Officer Adobe Certified Expert Adobe Certified Instructor Adobe User Group Leader On 8/27/08, Helmut Granda [EMAIL PROTECTED] wrote: yeah, still get [object LivePreviewParent]... On Wed, Aug 27, 2008 at 12:00 AM, poste9 [EMAIL PROTECTED] wrote: have u tried this.root ? 2008/8/27 Helmut Granda [EMAIL PROTECTED] Is it possible to access the MainTimeline from within a component? So far I havent been able to access it trying different methods. Most times I get the same result: trace(parent); trace(root); trace(this.parent); trace(this); trace(this.parent.parent); [object LivePreviewParent] [object LivePreviewParent] [object LivePreviewParent] [object MyComponent] [object Stage] But it seems to skip the MainTimeline... basically what I am trying to access is the File name which I can extract with Describe type for the MainTimeline, and of course this is easy with objects on the timeline. I have an init function in a component that tries to get the reference to the MainTimeline but so far no luck... any tips? -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- = Grupo Comunidade de Comunicação Rafael Lúcio 29809.099333, fazendo do seu website uma aplicação em tempo real ms xsl js(dom) css xhtml php mysql pgsql ajax json smarty drupal ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ...helmut ___ 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 -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Access MainTimeline reference from within a component
I understand that Flash prepends the filename to MainTimeline as a convenience because there's no DocumentClass. MainTimeline is not a class or type definition, it's simply a default name. -- Eduardo Omine http://blog.omine.net/ http://www.omine.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Access MainTimeline reference from within a component
Ok, so my component is being added to a blank FLA, which then it would have MainTimeline as the default name since there is no Document Class. Is there anyway to access the MainTimeline information from a blank FLA from within a component? On Wed, Aug 27, 2008 at 2:45 PM, Eduardo Omine [EMAIL PROTECTED]wrote: I understand that Flash prepends the filename to MainTimeline as a convenience because there's no DocumentClass. MainTimeline is not a class or type definition, it's simply a default name. -- Eduardo Omine http://blog.omine.net/ http://www.omine.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Access MainTimeline reference from within a component
OK, I'll be the one to ask this. So just curious, since components normally should be decoupled from objects outside themselves (i.e. the main timeline) - what is driving this - is there a better way to re-think this overall or must you really target the main timeline? Jason Merrill Bank of America Enterprise Technology Global Risk LLD Instructional Technology Media Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and technologies? Check out our internal Innovative Learning Blog subscribe. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Helmut Granda Sent: Wednesday, August 27, 2008 4:04 PM To: Flash Coders List Subject: Re: [Flashcoders] Access MainTimeline reference from within a component Ok, so my component is being added to a blank FLA, which then it would have MainTimeline as the default name since there is no Document Class. Is there anyway to access the MainTimeline information from a blank FLA from within a component? On Wed, Aug 27, 2008 at 2:45 PM, Eduardo Omine [EMAIL PROTECTED]wrote: I understand that Flash prepends the filename to MainTimeline as a convenience because there's no DocumentClass. MainTimeline is not a class or type definition, it's simply a default name. -- Eduardo Omine http://blog.omine.net/ http://www.omine.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ...helmut ___ 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] Access MainTimeline reference from within a component
Good question... If you use the methtod describeType for the main timeline you are able to extract the file name you are working with. //something like this: trace(describeType(root)); type name=Untitled_fla::MainTimeline Now this has to be done on the timeline, once you try to do describeType(root) from within a movieclip (or a component) you will get the following: trace(describeType(root)); type name=flash.display::MovieClip So I am trying to extract the file name by targeting the MainTimeline does that makes sense? On Wed, Aug 27, 2008 at 3:13 PM, Merrill, Jason [EMAIL PROTECTED] wrote: OK, I'll be the one to ask this. So just curious, since components normally should be decoupled from objects outside themselves (i.e. the main timeline) - what is driving this - is there a better way to re-think this overall or must you really target the main timeline? Jason Merrill Bank of America Enterprise Technology Global Risk LLD Instructional Technology Media Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and technologies? Check out our internal Innovative Learning Blog subscribe. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Helmut Granda Sent: Wednesday, August 27, 2008 4:04 PM To: Flash Coders List Subject: Re: [Flashcoders] Access MainTimeline reference from within a component Ok, so my component is being added to a blank FLA, which then it would have MainTimeline as the default name since there is no Document Class. Is there anyway to access the MainTimeline information from a blank FLA from within a component? On Wed, Aug 27, 2008 at 2:45 PM, Eduardo Omine [EMAIL PROTECTED]wrote: I understand that Flash prepends the filename to MainTimeline as a convenience because there's no DocumentClass. MainTimeline is not a class or type definition, it's simply a default name. -- Eduardo Omine http://blog.omine.net/ http://www.omine.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ...helmut ___ 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 -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Access MainTimeline reference from within a component
I think the question is: what do you need the FLA filename for? Relying on filename seems very hack-ish and unreliable -- it's common to have files renamed during the development process and for testing purposes. -- Eduardo Omine http://blog.omine.net/ http://www.omine.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
RE: [Flashcoders] Access MainTimeline reference from within a component
Yes, but what I was getting at, if it's a component, why does it need to have access to the main timeline? Components normally shouldn't be that tightly coupled. Could you instead pass a reference to a public property in the component of the filename instead of trying to access the filename from the component itself? Jason Merrill Bank of America Enterprise Technology Global Risk LLD Instructional Technology Media Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and technologies? Check out our internal Innovative Learning Blog subscribe. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Helmut Granda Sent: Wednesday, August 27, 2008 4:31 PM To: Flash Coders List Subject: Re: [Flashcoders] Access MainTimeline reference from within a component Good question... If you use the methtod describeType for the main timeline you are able to extract the file name you are working with. //something like this: trace(describeType(root)); type name=Untitled_fla::MainTimeline Now this has to be done on the timeline, once you try to do describeType(root) from within a movieclip (or a component) you will get the following: trace(describeType(root)); type name=flash.display::MovieClip So I am trying to extract the file name by targeting the MainTimeline does that makes sense? On Wed, Aug 27, 2008 at 3:13 PM, Merrill, Jason [EMAIL PROTECTED] wrote: OK, I'll be the one to ask this. So just curious, since components normally should be decoupled from objects outside themselves (i.e. the main timeline) - what is driving this - is there a better way to re-think this overall or must you really target the main timeline? Jason Merrill Bank of America Enterprise Technology Global Risk LLD Instructional Technology Media Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and technologies? Check out our internal Innovative Learning Blog subscribe. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Helmut Granda Sent: Wednesday, August 27, 2008 4:04 PM To: Flash Coders List Subject: Re: [Flashcoders] Access MainTimeline reference from within a component Ok, so my component is being added to a blank FLA, which then it would have MainTimeline as the default name since there is no Document Class. Is there anyway to access the MainTimeline information from a blank FLA from within a component? On Wed, Aug 27, 2008 at 2:45 PM, Eduardo Omine [EMAIL PROTECTED]wrote: I understand that Flash prepends the filename to MainTimeline as a convenience because there's no DocumentClass. MainTimeline is not a class or type definition, it's simply a default name. -- Eduardo Omine http://blog.omine.net/ http://www.omine.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ...helmut ___ 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 -- ...helmut ___ 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] Access MainTimeline reference from within a component
I dont think it is hack-is if you get the file name as a reference right before the file is being compiled. IMO... On Wed, Aug 27, 2008 at 3:50 PM, Eduardo Omine [EMAIL PROTECTED]wrote: I think the question is: what do you need the FLA filename for? Relying on filename seems very hack-ish and unreliable -- it's common to have files renamed during the development process and for testing purposes. -- Eduardo Omine http://blog.omine.net/ http://www.omine.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Access MainTimeline reference from within a component
It could be.. the only reason for trying to do this is to create a very smart component, thus being able to pick up the file name would have been of a great help for it. But again it seems almost hard to get it if you are trying from somewhere else that is not strictly the timeline. BTW the component is added to the stage and it has visuals so it is not a component that runs in its own window... Thanks for the help, I will continue trying to find other ways to go about it... On Wed, Aug 27, 2008 at 3:52 PM, Merrill, Jason [EMAIL PROTECTED] wrote: Yes, but what I was getting at, if it's a component, why does it need to have access to the main timeline? Components normally shouldn't be that tightly coupled. Could you instead pass a reference to a public property in the component of the filename instead of trying to access the filename from the component itself? Jason Merrill Bank of America Enterprise Technology Global Risk LLD Instructional Technology Media Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and technologies? Check out our internal Innovative Learning Blog subscribe. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Helmut Granda Sent: Wednesday, August 27, 2008 4:31 PM To: Flash Coders List Subject: Re: [Flashcoders] Access MainTimeline reference from within a component Good question... If you use the methtod describeType for the main timeline you are able to extract the file name you are working with. //something like this: trace(describeType(root)); type name=Untitled_fla::MainTimeline Now this has to be done on the timeline, once you try to do describeType(root) from within a movieclip (or a component) you will get the following: trace(describeType(root)); type name=flash.display::MovieClip So I am trying to extract the file name by targeting the MainTimeline does that makes sense? On Wed, Aug 27, 2008 at 3:13 PM, Merrill, Jason [EMAIL PROTECTED] wrote: OK, I'll be the one to ask this. So just curious, since components normally should be decoupled from objects outside themselves (i.e. the main timeline) - what is driving this - is there a better way to re-think this overall or must you really target the main timeline? Jason Merrill Bank of America Enterprise Technology Global Risk LLD Instructional Technology Media Join the Bank of America Flash Platform Developer Community Are you a Bank of America associate interested in innovative learning ideas and technologies? Check out our internal Innovative Learning Blog subscribe. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Helmut Granda Sent: Wednesday, August 27, 2008 4:04 PM To: Flash Coders List Subject: Re: [Flashcoders] Access MainTimeline reference from within a component Ok, so my component is being added to a blank FLA, which then it would have MainTimeline as the default name since there is no Document Class. Is there anyway to access the MainTimeline information from a blank FLA from within a component? On Wed, Aug 27, 2008 at 2:45 PM, Eduardo Omine [EMAIL PROTECTED]wrote: I understand that Flash prepends the filename to MainTimeline as a convenience because there's no DocumentClass. MainTimeline is not a class or type definition, it's simply a default name. -- Eduardo Omine http://blog.omine.net/ http://www.omine.net/ ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- ...helmut ___ 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 -- ...helmut ___ 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 -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
[Flashcoders] Access MainTimeline reference from within a component
Is it possible to access the MainTimeline from within a component? So far I havent been able to access it trying different methods. Most times I get the same result: trace(parent); trace(root); trace(this.parent); trace(this); trace(this.parent.parent); [object LivePreviewParent] [object LivePreviewParent] [object LivePreviewParent] [object MyComponent] [object Stage] But it seems to skip the MainTimeline... basically what I am trying to access is the File name which I can extract with Describe type for the MainTimeline, and of course this is easy with objects on the timeline. I have an init function in a component that tries to get the reference to the MainTimeline but so far no luck... any tips? -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Re: [Flashcoders] Access MainTimeline reference from within a component
have u tried this.root ? 2008/8/27 Helmut Granda [EMAIL PROTECTED] Is it possible to access the MainTimeline from within a component? So far I havent been able to access it trying different methods. Most times I get the same result: trace(parent); trace(root); trace(this.parent); trace(this); trace(this.parent.parent); [object LivePreviewParent] [object LivePreviewParent] [object LivePreviewParent] [object MyComponent] [object Stage] But it seems to skip the MainTimeline... basically what I am trying to access is the File name which I can extract with Describe type for the MainTimeline, and of course this is easy with objects on the timeline. I have an init function in a component that tries to get the reference to the MainTimeline but so far no luck... any tips? -- ...helmut ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders -- = Grupo Comunidade de Comunicação Rafael Lúcio 29809.099333, fazendo do seu website uma aplicação em tempo real ms xsl js(dom) css xhtml php mysql pgsql ajax json smarty drupal ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders