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 you never
instantiate the subclip with code.

I think the problem was, you instantiated clip_mc before adding it to the
stage (of course), but then it's constructor you are asking for something in
its parent - but it doesn't have a parent yet.

Eventually learn classes and work it out that way, but we
shouldn't stonewall you from using timeline code for a simple animator's
task (this is one reason why Flash is so pervasive guys, because it was easy
for you to jump into with basic interactivity, right?).

-jonathan


,

On Fri, Apr 16, 2010 at 2:24 AM, Henrik Andersson <he...@henke37.cjb.net>wrote:

> 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, not the timeline. Plus you will be referencing
>> objects,
>> so communicating between the objects through the classes is how it's
>> done in AS3.
>>
>> Am I on the right track guys?
>>
>
> You are not. You have gotten tangled up in the elitism spread by people who
> doesn't actually work with Flash.
>
> There is no reason not to use the properties that you have to get the
> references. You just need to remember to cast them to the proper type.
>
> The trick is to know when to apply the fancy rules and when not to.
>
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
-jonathan howe
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to