• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 11560
  • Last Modified:

How to use ScrollPane to scroll movie clip which we duplicate

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
MaxTo
Asked:
MaxTo
  • 2
  • 2
  • 2
  • +1
1 Solution
 
MontoyaProcess Improvement MgrCommented:
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
 
MaxToAuthor Commented:
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
 
MontoyaProcess Improvement MgrCommented:
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
Easily Design & Build Your Next Website

Squarespace’s all-in-one platform gives you everything you need to express yourself creatively online, whether it is with a domain, website, or online store. Get started with your free trial today, and when ready, take 10% off your first purchase with offer code 'EXPERTS'.

 
MaxToAuthor Commented:
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
 
krishnaprathabCommented:
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
 
krishnaprathabCommented:
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
 
haidozoCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now