Re: [Flashcoders] instantiate symbol linked to parent movie's library

2009-09-22 Thread Hans Wichman
Hi, I don't remember the exact details, but if I remember correctly there are 2 ways: 1. let the child attach the clip at the root, copy its bitmap data and use that to create a clip in its own root, but this will result in static bitmaps only 2. -declare an empty clip with linkage id in the

Re: [Flashcoders] instantiate symbol linked to parent movie's library

2009-09-22 Thread Andrew Sinning
Or, maybe I could call a function in the root that would instantiate the symbol, passing the target clip? I'll post my resutls. Hans Wichman wrote: Hi, I don't remember the exact details, but if I remember correctly there are 2 ways: 1. let the child attach the clip at the root, copy its

Re: [Flashcoders] instantiate symbol linked to parent movie's library

2009-09-22 Thread jonathan howe
Totally forget in AS2, but maybe research getDefinitionByName() - it can retrieve a class based on a classname string - and maybe there are some comments about AS2 vs. AS3 -jonathan On Tue, Sep 22, 2009 at 2:54 AM, Hans Wichman j.c.wich...@objectpainters.com wrote: Hi, I don't remember

Re: [Flashcoders] instantiate symbol linked to parent movie's library

2009-09-22 Thread Hans Wichman
Hi, calling a function in the root that would instantiate the symbol is not going to work, neither is using reflection to get classes by name. The issue you are dealing with is that by default flash will only let you attach clips to a clip from the library from whence it came. I'll try to whip up

Re: [Flashcoders] instantiate symbol linked to parent movie's library

2009-09-22 Thread Hans Wichman
Hi Andrew, i've put a sample together at: http://www.objectpainters.com/downloads/runtimesharinghack.zip user/pass is blog/blog There are 2 demos, the first of how you probably do it at the moment, you load a sub into main and try to attach a clip from main to sub. The sample shows that doesnt

Re: [Flashcoders] instantiate symbol linked to parent movie's library

2009-09-22 Thread Andrew Sinning
Thanks Hans. Yes, I tried this myself this morning. I'm working in AS2. I'm pretty much ruling this out. I think it will be more trouble than it's worth. A little background will clarify why: Our goal was to allow an instructor to create content and then export that content in a single

Re: [Flashcoders] instantiate symbol linked to parent movie's library

2009-09-22 Thread Andrew Sinning
That's super cool. So the sub only has to have a _single_ library item from the shared library in order to have access to the whole library. That's not very intuitive, but I'm really glad it works! Hans Wichman wrote: Hi Andrew, i've put a sample together at:

Re: [Flashcoders] instantiate symbol linked to parent movie's library

2009-09-22 Thread Hans Wichman
Hi Andrew, yes only a single library item. Still before basing a large scale email application on something like this would not make me sleep well at night, unless there wasn't another way. Seeing the large numbers of elearning apps already written in flash, there probably is another way;). From

[Flashcoders] instantiate symbol linked to parent movie's library

2009-09-21 Thread Andrew Sinning
How would one instantiate a symbol instance linked to the parent movie's library? E.g., there's an asset in top most movie's library called Asset. The presentation engine is a separate swf that gets loaded into the top most movie. From within this movie, using AS2, I need to create an