?
Solved

How to place a runtime created movie into a scrollpane

Posted on 2004-03-26
5
Medium Priority
?
1,330 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 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

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 …
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
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.
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.
Suggested Courses

765 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