| Author |
Scrolling Static Text
|
|
| mhyusi 2005-08-17, 7:33 pm |
| I need to take a list of clients and put it into a flash movie that the viewers
can scroll using buttons. I don't need it to scroll by itself, I need the
viewer to be able to control the scrolling. For the life of me, I can't figure
out how to make this work in Flash MX Pro 2004. Is there anyone out there that
has a simple tutorial? A template? Anything. I'm desperate and hitting a
deadline.
Any help appreciated.
| |
| Hudey 2005-08-17, 11:20 pm |
| Here's a simple template I threw together in just a few minutes. It uses a mask
to hide the client list and it is a simple button interface where one click on
the button scrolls the list up or down 10 pixels. You can change this number to
control the speed of the scroll. The script also stops the list at the top or
bottom. These numbers can be manipulated as well if you need to expand or
contract the list.
http://mike.hudak.com/Flash/scroll_client_list.fla
Hudey
| |
| mhyusi 2005-08-17, 11:20 pm |
| Hudey,
Thanks for the help, but it's not working on my end? I can see the window, the buttons but no text and when I click on the buttons nothing is happening. Any advice?
Mike
| |
| Hudey 2005-08-17, 11:20 pm |
| Probably because I used a font that you don't have on your system. Unlock and
select the "Client List" layer. Double click anywhere on the movie to enter the
Client List symbol. Lock the background layer and CTRL-A to select all. Change
the font and see if the text comes in.
| |
| mhyusi 2005-08-17, 11:20 pm |
| Hudey,
Thanks, that worked. Since I'm picking your brain, is there any way to put a
sliding bar so that the viewer can just grab the bar and scroll that way as
well? Or is it buttons or nothing?
Thanks again, huge help.
Mike
| |
|
| Yes, but it's a much more complicated procedure, that's why I didn't throw it
together that way to begin with. I haven't figured out exactly how to do it,
but off the top of my head I think you would create the graphic for the scroll
bar area and make the part of the bar that you "grab" a movie clip. In the
actions on that movie clip you have to put an action to start dragging the clip
on the mouse press. You have to constrict the movement of the drag to the Y
axis and not let it continue past the outer scroll bar area. Then you have to
use an onClipEvent(enterFrame) handler to say that the client list should
scroll UP while you're dragging the scroll button DOWN.
This would take a couple hours for me to figure out how to do from scratch,
but that's what's so great about Google! :)
http://www.mediasparkles.com/resume/scrollbar.html
This might help you out!
| |
| mhyusi 2005-08-19, 7:29 pm |
| One last question. Is there something I can add to your actionscript that will
allow the viewer to hold down the scroll button and make the window scroll?
That would work rather than putting in a scroll bar.
Thanks,
Mike
| |
| Demon paW 2005-08-20, 11:22 pm |
| why dont you use the scroll component?
| |
| mhyusi 2005-08-21, 7:22 pm |
| Demon,
I'm pretty new to all of this. Is that something I add to the existing script
for the buttons I'm using already? Thanks to Hudey, this is the code I'm using
for the buttons.
on(press, keyPress "<Up>"){
trace(_root.list._y);
_root.list._y += 20;
if(_root.list._y >= 255){
_root.list._y = 255;
}
}
Do I ad the scroll component here someplace?
Thanks for any guidance.
Mike
on(press, keyPress "<Up>"){
trace(_root.list._y);
_root.list._y += 20;
if(_root.list._y >= 255){
_root.list._y = 255;
}
}
| |
| feed_me 2005-08-22, 7:15 am |
| Hey Mike... Components can be found if you open Windows > Development Panels >
Components. To figure out how to use them, look up (for example) Help > Using
Components > Components Dictionary > UIScrollBar component.
You would use it in place of the script you're using now, as it contains a
graphic scrolbar and script to make it work already.
| |
| mhyusi 2005-08-22, 7:22 pm |
| Thanks for the suggestion. I tried it but couldn't get any info into the
scroll box. Should I be sticking to crayons at this point or is there a good
book someone can suggest that will clear some of this up? I'm sure I'm missing
something obvious.
Thanks feed_me
Mike
| |
|
| Sorry for the delay, was out of town for the last three days...
I have never used components before, so I took feed_me's advice and gave it a
try. It was really easy!
http://mike.hudak.com/flash/scroll_client_list2.fla
This FLA contains the scroll pane component. To get your list of information
into it, create a Flash file called list.fla. In this file create your client
list and make the list a movie clip. Then export the list.fla as list.swf into
the same folder that you have your scroll_client_list2.swf file. This swf will
pull the list.swf file into itself from the server and you'll have your
scrollable window with your client list in it. It was really easy to do!
You can click on the scrollpane movie clip (component) and use the transform
tool to resize it however you want. As long as the client list is longer than
the scrollpane component the scroll bars will automatically appear and enable
the user to scroll. Pretty cool!
| |
| Demon paW 2005-08-22, 7:22 pm |
| happy you did it hud sorry if i answered hardly i didnt mean to
| |
| mhyusi 2005-08-23, 8:09 pm |
| Okay, I've got the list.swf created from the first file, I've created a
scrollbox component and loaded them both to the root of my site but still
nothing. In the scrollbox parameters do I need to specify the "content" or
just leave that empty? I'm still just getting a blank box. I'm telling you, I
should stick to crayons and a ruler.....
Thanks guys.
Mike
| |
|
| Yes... contentPath should be:
list.swf
As long as that is there and the list.swf file is in the same folder as the
scrollpane component document, you should see whatever is in list.swf within
the scroll pane.
| |
| mhyusi 2005-08-27, 4:15 am |
| AAAAAAAAAAAA
It works, my life is complete.
Thanks to both of you for the assist. Not sure where the brain fart was, but all is right with the world again.
Thank you both.
Mike
| |
| kyuukisan 2005-09-05, 7:37 pm |
| My crayon broke :( I need help and hopefully you guys will help me.
I buliding my first site using flash and the scrollpane and/or bar components
are going to be used. How should I go about using it? How big should it be? Can
you please PLEASE help me?
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |