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
Solved

How to use ScrollPane to scroll movie clip which we duplicate

Posted on 2004-04-06
7
11,550 Views
Last Modified: 2012-06-22
The function of scrollPane is used to scroll the movie clip, but we must define the identifier name in linkage which from library right. From there i know how to scroll it.

But now the problem is, if i would like to scoll movie clip which duplicate from action script. Example, inside library got one movie clip name M1 contains a textField T1 and T1.text = "Hello". Now u dulipcate it and change the T1.text = "How are you". So inside my stage got two movie clip now. So how i can set the scrollPane content to scroll?

For my information, i know that scrollPane only scroll the movie clip which having linkage identifier name. So the movie clip i duplicate is possible to set the linkage identifier name for it?

Please help me to solve this question with clear description.
0
Comment
Question by:MaxTo
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 19

Expert Comment

by:Montoya
ID: 10765599
It should work exactly the same. I just used duplicateMovieClip
You can get an example here:

http://www.realinteresting.com/flashexperts/scrollpanetest.fla


Hope that helps.
0
 

Author Comment

by:MaxTo
ID: 10771705
To Iammontoya,

i believe that your example can help me, but after i download it, i can't open it. i was using Flash MX. is it your example i writing using Flash MX 2004.

Is it possible, write down main code for me. if this was work as what i want, i will accept it as answer. THanks

frm
Max
0
 
LVL 19

Expert Comment

by:Montoya
ID: 10771729
blue_btn.onRelease = function() {
      _root.sqr_mc.duplicateMovieClip("sqr_mc"+2);
      sqr_mc2._x = 390;
};

I did not get a chance to test it w/ Flash MX, but Im sure it will work out fine.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

Author Comment

by:MaxTo
ID: 10772369
After i saw the example of you. Sorry to said that it wasn't what i want.
Maybe my description no details. Here i descript it more details.

in the program library i got one scrollPane name SP.
one movie clip name MC contains one textField name txt1. (ps : SP not in movie clip)

when i press button 'It will duplicate MC name MC1 and MC1.txt1 = "hello", so now
what i want is the SP scroll content is scroll MC1.
i press button again will duplicate again and name MC2 and MC2.txt1 = "Thanks",
now i wanna set the SP scroll content will change to scroll MC2.

In this stage only got one scrollPane, but will got many movie clip. and each movie
clip textField or picture will be different. And library only got one movie clip.

Hope you can help me.

Max
0
 
LVL 9

Accepted Solution

by:
krishnaprathab earned 250 total points
ID: 10772941
Hi Max,

Its actually very simple. Follow the steps listed below and it WILL work ;)

1) Create your movieclip(MC) on the stage , go inside it and create your text field (txt1).

2) Now goto the main timeline and delete the mc movieclip from the stage.

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

4) Click the "Export for Actionscript" checkbox and specify mc as the identifier.

5) 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.

If you want to attach a duplicated movieclip into the scrollpane then,

mcRef = mc.duplicateMovieClip("mc"+2);
mcRef.txt1.text = "hello";
my_scroll.setScrollContent(mcRef);

Hope this helps !

Thanks,
KP
0
 
LVL 9

Expert Comment

by:krishnaprathab
ID: 10772953
You can also refer to a similar question answered by me present at :

http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_20934077.html#10706064

Thanks,
KP
 
0
 

Expert Comment

by:haidozo
ID: 11100029
Is setScrollContent() an old function replaced by contentPath() in MX2004?  Anyway, is there a way to create a movie dynamically and place that in the scrollPane with MX2004?


0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
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 use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

792 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