Solved

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

Posted on 2006-07-16
4
294 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
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 use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

757 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

20 Experts available now in Live!

Get 1:1 Help Now