Solved

How to use ScrollPane to scroll movie clip which we duplicate

Posted on 2004-04-06
7
11,546 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:Iammontoya
Comment Utility
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
Comment Utility
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:Iammontoya
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:MaxTo
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
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…
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…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

743 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

14 Experts available now in Live!

Get 1:1 Help Now