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 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 same error if clip with animation is on stage or it is
> added with code on main timeline.
> trace(parent.countN) from the clip and result is
>
> 1119: Access of possibly undefined property countN through a reference
> with static type flash.display:DisplayObjectContainer.
>
> What can be more simple than this task? And that does not work.
>
>
> 2010/4/16 jonathan howe <jonathangh...@gmail.com>:
> > 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
> >
> _______________________________________________
> 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

Reply via email to