PDA

View Full Version : Textfield scrolling


jubjub_
03-10-2003, 08:23 AM
Hi,

I am very new to flash. i am creating a flash website for a friend.
i am having so much trouble with scrolling textboxes. i hav espent the last 2 weeks to get these working.
I have attached the .fla files to see if people can help me.

text_menu3 is where the stuff is needed to be loaded. u will find 2 buttons and a dynamic textbox. all files should be there if anyone could help, your help would be greatly appreciated.

I couldnt add the image links. if u need them i can send them to you by email.

Many thanks,

Trent Jones

Jesse
03-10-2003, 10:17 AM
You need to take a look at the Paths tutorial. The issue is a problem with Paths. I see you've taken my scroller and tried to impliment it in your design but you've nested the text field you want to scroll deep down inside your movie so the path on the code which actually makes the text scroll is now wrong. Check out the paths tutorial which will explain what you need to do to fix it.

jubjub_
03-12-2003, 04:03 AM
I am starting to get what u talking bout. i still dont understand where u put the path in set property.

do i do anything to the buttons?

is the movie setup right 4 text_menu3.

i really don't understand past the paths thing.

could you send me an example in the file i sent you. i have many more text scroll field and i really want to kno how to crack it.


Many Thanks
Trent

Jesse
03-12-2003, 04:30 AM
Your file is hard for me to wade through. The code on the buttons is fine (it just sets a variable and that's working). The problem is the code which references the variable. Again, the path to the variable is fine, but the path to the text field is wrong. Your text field (from memory - you've removed the file) is burried deep inside unnamed movieclips, etc. You need to give each movie clip an instance name (see the Instances tutorial) and then build up the path to the text field and replace the code which currently reads:
if (_root.up) {
_root.text.scroll += 1;
} else if (_root.down) {
_root.text.scroll -= 1;
}
with
if (_root.up) {
_root.pathToYourTextField.scroll += 1;
} else if (_root.down) {
_root.pathToYourTextField.scroll -= 1;
}

jubjub_
03-12-2003, 05:08 AM
:) Thank you for all your help.

Um, i attach the file again in this post.

Can you just tell me what the path to the textbox is.

_root.menu3.text_menu3.container_MC.daTextBox is what i habe tried. also taken the container_MC out.

it will not load the text.

Your help has been greatly appreciated.

Trent Jones

Jesse
03-12-2003, 05:56 AM
The fixed file is aattached. I think you need to read some more about Instance names and Paths though as from the file it seem syou didn't have it laid out properly. I've used relative paths instead of full paths because they are easier. It all works now.

[Attachment removed by request of the author]