Solved

How to place a runtime created movie into a scrollpane

Posted on 2004-03-26
5
1,327 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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. …
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

690 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