Solved

How to place a runtime created movie into a scrollpane

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

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 been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
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.

707 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

18 Experts available now in Live!

Get 1:1 Help Now