Solved

How to place a runtime created movie into a scrollpane

Posted on 2004-03-26
5
1,324 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 250 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

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
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 select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

919 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

17 Experts available now in Live!

Get 1:1 Help Now