?
Solved

How to place a runtime created movie into a scrollpane

Posted on 2004-03-26
5
Medium Priority
?
1,337 Views
Last Modified: 2012-08-13
Hi,

I have created a new movie clip using             
     mc=createEmptyMovieClip("mc1", 10);      
     mc.loadmovie("xxxxx");

then i want this movie to be loaded in a scrollpane

    scrollPane.contentPath = "mc1" ;

but i get an error that mc1 is not found in the c: drive directory.

Any 1 can help ?

0
Comment
Question by:keoktay
5 Comments
 
LVL 23

Expert Comment

by:Zeffer
ID: 10692725
try..
scrollPane.contentPath = "_level10.mc1" ;

Z
0
 

Author Comment

by:keoktay
ID: 10693193
Hi ,

Have tried this
    scrollPane.contentPath = "_level10.mc1" ;


However, the picture is loaded not inside the scrollPane , but side by side with the scrollPane.

I read the documentation that scrollPane.contentPath="" set to a file or url or the indentifier of the movieclip . How can i dynamically set the linkage indentifier for the created movieclip ?


0
 
LVL 2

Expert Comment

by:JabbyPanda
ID: 10698010
If there is a special reason behind your decision to load external image into empty dynamically created movieclip?

you can load image directly into ScrollPane component:

scrollPane.contentPath = "myImage.jpg";

You have also events 'ScrollPane.complete'  and 'ScrollPane.progress' to control the progress of loading external media.

 
 
0
 
LVL 9

Accepted Solution

by:
krishnaprathab earned 750 total points
ID: 10706064
Hi keoktay,

I tried this procedure and it works for me. It will work for you too. Follow these simple procedures :

1) Create a movieclip named mc1 on the main timeline of the stage (say a rectagular shaped one).

2) Double click this Movieclip and go into the timeline of this movieclip, now select the rectangle shape graphic , press F8 and create a movieclip and give it an instance name of my_mc.

3) In the current timeline write the action :

my_mc.loadMovie("1stpartofcode.jpg");

- Replace the jpg file with the name of the file you want to load.

4) Now goto the main timeline and delete the mc1 movieclip from the stage.

5) Press Ctrl+L and in the library right click on the mc1 movieclip and select "Linkage..."

6) Click the "Export for Actionscript" checkbox and specify mc1 as the identifier.

7) Now come to the main timleine and place this action :

my_scroll.setScrollContent("mc1");

This will load your file into the scroll pane as you would like to do.

Hope this helps !

Thanks,
KP
0
 

Author Comment

by:keoktay
ID: 10738252
Hi krishnaprathab,

Thanks !

KT
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

850 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