PDA

View Full Version : help with reusing navigational buttons


spudd
07-08-2005, 04:57 PM
hi, i have created a scrolling text out of a dynamic text box and i have used two triangles (one pointing up, and one pointing down) as buttons with this script attached to them respectivly on(release){
facil_text.scroll -=1;
} and on(release){
facil_text.scroll +=1;
}. now this works fine the first time i use it. in a separte frame on the timeline i need scrollable text again (different text) so I created the new dynamic text box, gave it an new instance name, draged the same buttons (triangles) from the library to the stage, gave it a different instance name and tried to script them so they would scroll the second dynamic text, but nothing happened. i was able to overlap the first and second text boxes on the same frame and even though the second set of buttons were set to scroll the second dynamic text they were scrolling the text in the first dynamic text box. so i guess my question is, how can i reuse the same buttons to do different functions in different parts of the timeline. i was thinking that by seperating them with a keyframe and then writing the script for a button, would limit that script only to that keyframed section. Any suggestions are greatly appriciated. i'm relativley new to action scripting. I am using Flash MX Pro 2004
thank you for any help in advance.

PreCoder
07-12-2005, 01:02 AM
G'day,
Let me see if I have this right...You are trying to have 2 separate dynamic text fields on screen using the same scrollbar you created, problem is that when you use this scroll bar for the 2nd textfield is still alter's the first textfield, Correct?
If this is correct, sounds to me like you have mis-referenced one of your instance names, if you have renamed both scroll bars with new instance names, check that you have also updated your actionscript to point to your new instance name. If this isn't the problem and I have totally mis-understood what you wanted, post the .FLA with the text file, and I'll have a look.

Hope this helps :rolleyes:

spudd
07-12-2005, 03:00 PM
I resolved the issue by using the UIScrollbar component instead of using custom made buttons, and since the UIScollbar doesn't need a referance itself it all wotked out + it looks more clean. You understood the problem but even when i had the instance names and refereances right i still was affecting the first text.i even erased everything and started over but nothing changed. With the UIScrollbar it works. thank you for your help.