Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-17 Thread Olivier Besson
As mentionned before, the orthodox way is to follow OOP philosophy, but it's actually not immediate to get training about it, and also follow the logical consequences of this choice, such as adopting proper tools for actionscript editing (eg:FlashDevelop) and versioning (eg:SVN), etc.. Even

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread natalia Vikhtinskaya
Thank you your help. But I still can not get it works. Can anybody give simple example how clip from a library with timeline animation can get and set variables in root in any frame of this animation? Thank you 2010/4/16 Henrik Andersson he...@henke37.cjb.net: natalia Vikhtinskaya wrote: In

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread Karl DeSaulniers
Can you set an include on the first frame of the added movie clip that adds the appropriate class to record the variables and then talk to the main timeline? You could maybe set the include statement in an onEnterFrame or its AS3 equiv.? Then the include statement would only get added when

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread Henrik Andersson
Karl DeSaulniers wrote: Can you set an include on the first frame of the added movie clip that adds the appropriate class to record the variables and then talk to the main timeline? You don't include classes, you import them. It was the same deal in as 2.

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread Karl DeSaulniers
Oops, I meant import. :P Been working in PHP a lot lately. :) Karl On Apr 16, 2010, at 3:23 AM, Henrik Andersson wrote: Karl DeSaulniers wrote: Can you set an include on the first frame of the added movie clip that adds the appropriate class to record the variables and then talk to the

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread Karl DeSaulniers
Hey Natalia, I found this which may solve your immediate problem. I have never used this before, but it looks promising. http://www.jumpeyecomponents.com/Flash-Components/Various/ ActionScript-Bridge-91/ Might be worth a look-see. HTH, Karl On Apr 16, 2010, at 2:08 AM, natalia Vikhtinskaya

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread natalia Vikhtinskaya
I have two good books Loey Lott and Colin Moock but could not find answer for this simple situation. Maybe this is not simple for AS3? 2010/4/16 Karl DeSaulniers k...@designdrumm.com: Oops, I meant import. :P Been working in PHP a lot lately. :) Karl On Apr 16, 2010, at 3:23 AM, Henrik

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread Karl DeSaulniers
I think its not simple because you are scripting timeline wise. Got to pick. AS2 or AS3. I believe what they were trying to say was if you have all the code in classes, you can communicate between the root and the added movie clip because the classes reference each other, not the timeline.

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread Henrik Andersson
natalia Vikhtinskaya wrote: I have two good books Loey Lott and Colin Moock but could not find answer for this simple situation. Maybe this is not simple for AS3? Step by step: 1. Assign a class to the timeline. 2. Get a reference to the timeline using the parent or root properties. 3. Cast

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread Henrik Andersson
Karl DeSaulniers wrote: I think its not simple because you are scripting timeline wise. Got to pick. AS2 or AS3. I believe what they were trying to say was if you have all the code in classes, you can communicate between the root and the added movie clip because the classes reference each other,

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread jonathan howe
So, my untested proposal is this: Root timeline, don't instantiate your subclip with code. Just put it on the stage with an instance name, and refer to it then. In the subclip, you can then refer to parent.counter or whatever your variable is, because you're guaranteed that you have a parent if

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread natalia Vikhtinskaya
Yes I expected that Flash and AS3 could be used for simple task without creating classes. But as I see now it is not true. If you I have clip with some animation and I want communicate with main timeline at the end of animation I cannot do that. And I cannot find any solution for that. I have the

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread tom rhodes
File Publish Settings Flash Actionscript 3.0 Settings Strict Mode (uncheck it) that's your easiest solution if you are having trouble. once you get more into the AS3 side of things you won't need it any more... On 16 April 2010 17:33, natalia Vikhtinskaya natavi.m...@gmail.com wrote: Yes

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread natalia Vikhtinskaya
THANK YOU 2010/4/16 tom rhodes tom.rho...@gmail.com: File Publish Settings Flash Actionscript 3.0 Settings Strict Mode (uncheck it) that's your easiest solution if you are having trouble. once you get more into the AS3 side of things you won't need it any more... On 16 April 2010

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread Henrik Andersson
natalia Vikhtinskaya wrote: THANK YOU Just remember that you just turned off all type safety and even the slightest typo will result in a runtime error instead of a compile time error. ___ Flashcoders mailing list

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread Karl DeSaulniers
Darn, I thought I was close. :( That last statement you said is what I have the hardest time figuring out about AS3. When to use classes and how to use them and the fancy rules that goes with EVERYTHING about AS3. I think I may just wait till AS4. lol. Karl On Apr 16, 2010, at 4:24 AM,

RE: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread David Hunter
11:08:28 +0400 Subject: Re: [Flashcoders] Interaction between clips and main timeline in AS3. From: natavi.m...@gmail.com To: flashcoders@chattyfig.figleaf.com Thank you your help. But I still can not get it works. Can anybody give simple example how clip from a library with timeline

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-16 Thread Henrik Andersson
David Hunter wrote: Hi, Seems you may have solved this by turning off strict mode. An alternative way (depending on how flexible you can be with your program) would be to reverse your approach and listen to what frame the clip is on (myClip.currentFrame) and perform functions accordingly. As

[Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-15 Thread natalia Vikhtinskaya
Hi to all On main timeline I have var countN:int=0; // this numberl be changed later var clip_mc = new clip_mc(); // this clip is placed in library addChild(clip_mc); How can I read countN inside clip_mc? parent.countN, this.parent.countN gives a mistake. That was possible in AS2 but I can

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-15 Thread Kerry Thompson
natalia Vikhtinskaya wrote: On main timeline I have var countN:int=0; // this numberl be changed later var clip_mc = new clip_mc();  // this clip is placed in library addChild(clip_mc); How  can I read countN inside clip_mc? I would pass in a reference to the timeline to the clip_mc. You

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-15 Thread natalia Vikhtinskaya
In clip_mc I have timeline animation. When it finished I should change countN++ on main timeline. I tested as you suggested. I created ClipClass.as (just addedimport flash.display.MovieClip;) on main timeline I have code var clip_mc:MovieClip=new ClipClass(); // linkage with name

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-15 Thread Kerry Thompson
natalia Vikhtinskaya wrote: In clip_mc I have timeline animation. When it finished I should change countN++ on main timeline. I tested as you suggested. I created ClipClass.as (just added    import flash.display.MovieClip;        ) on main timeline I have code var clip_mc:MovieClip=new

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-15 Thread natalia Vikhtinskaya
Is that possible to do that without creating class? I need very simple task: movie in the library with timeline animation, I add this movie on the stage, play animation, change variable on the main timeline. Is that possible without creating two new classes? 2010/4/15 Kerry Thompson

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-15 Thread Henrik Andersson
natalia Vikhtinskaya wrote: Hi to all On main timeline I have var countN:int=0; // this numberl be changed later var clip_mc = new clip_mc(); // this clip is placed in library addChild(clip_mc); How can I read countN inside clip_mc? Wait for the clip to be ADDED. The use the parent or root

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-15 Thread natalia Vikhtinskaya
Maybe I do something wrong? On main timeline in the first frame var countN:int=0; var clip_mc = new clip_mc(); addChild(clip_mc); in the firtst frame of clip_mc addEventListener(Event.ADDED,added); function added(e:Event) { var countN:int=MainTimeline(root).countN; //trace(countN) } that

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-15 Thread Henrik Andersson
natalia Vikhtinskaya wrote: Maybe I do something wrong? On main timeline in the first frame var countN:int=0; var clip_mc = new clip_mc(); addChild(clip_mc); in the firtst frame of clip_mc addEventListener(Event.ADDED,added); function added(e:Event) { var

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-15 Thread natalia Vikhtinskaya
In linkage properties class is clip_mc 2010/4/16 Henrik Andersson he...@henke37.cjb.net: natalia Vikhtinskaya wrote: Maybe I do something wrong? On main timeline in the first frame var countN:int=0; var clip_mc = new clip_mc(); addChild(clip_mc); in the firtst frame of clip_mc

Re: [Flashcoders] Interaction between clips and main timeline in AS3.

2010-04-15 Thread Henrik Andersson
natalia Vikhtinskaya wrote: In linkage properties class is clip_mc That is a typical instance name, not a class name. Also, I am talking about the class name for the document class. ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com