Solved

Dynamically create a movieClip and put it into a scrollPane?(urgent)

Posted on 2006-07-16
4
295 Views
Last Modified: 2010-04-03
I have dynamically created a movieClip and would want to put it into a scrollPane object?
Here is the code i have written

m_oScrollPane =_root.createClassObject(ScrollPane, m_mcParent+"oScrollPane", _root.getNextHighestDepth());
m_oScrollPane.setSize(420,100);
m_oScrollPane._x = 0;
m_oScrollPane._y = 400;

Here i have created a Movie Clip m_mcCheckList dynamically through code
Now i want to attavh it to the scrollPane object
If i use m_oScrollPane.contentPath = "m_mcCheckList"

i get the following error
Error opening URL "file:///D|/Experios/Script%20Files/Science%20Slueths/m_mcCheckList"

Please help me attach this dynamically created movie clip to hte scroll pane
It is very urgent
Thanks in advance.
0
Comment
Question by:ashugarg00
4 Comments
 
LVL 5

Accepted Solution

by:
lupuleine earned 500 total points
ID: 17120331
hi,

there are only 3 things that you can attach to a scroll pane ... is an external JPG,  an external SWF and a movie clip from the library ...
that means that the movie clip has to be in the library, you can't attach an instance of a movie ...

now, a workaround for you would be to have in the library a container-like movie clip with linkage ... you attach this container movie to your scrollpane ... and you create dynamic movies inside the container ...

Lupuleine
0
 

Author Comment

by:ashugarg00
ID: 17120639
Thanks
I have added a movie clip in library named test
Now i do m_oScrollPane.contentPath = "test"

and i get an instance of movie clip named var mcScroll:MovieClip = m_oScrollPane.content;

Now i create all the other movie clips in the mcScroll Movie Clip and it works

Thanks once again for the answer
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to how to record live broadcast.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now