Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 305
  • Last Modified:

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

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
ashugarg00
Asked:
ashugarg00
1 Solution
 
lupuleineCommented:
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
 
ashugarg00Author Commented:
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now