Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rollover scroll

Status
Not open for further replies.

JonnyPT

Programmer
Joined
Oct 27, 2004
Messages
21
Location
US
i'm trying to find out how to do those standard onRollOver scroll arrows
say for a textbox named mytext
 
download this source: editmyinformation.fla

I think this is similar to what you mean. When you roll over the button where the instance is named "edit," the movie clip "boxer" with its instance named "hi" moves from where it originally was (off the pasteboard) to the left to highlight the button.

-j

 
sorry i was unclear (i always forget to specify)
i have a text box that is populated by information via a PHP script. the information is often longer than the box allows for, so i need it to scroll, and i couldn't figur out how to use rollover arrows. the only source i could find showed how to do it by creating a movie, but you can't do that with dynamically inserted data.
 
i decided to go with a normal scroll bar, but it never activates
 
oh. The method you want to use is yourScrollPane.setScrollPosition(x,y); where x and y are the horizontal and vertical position you wish to jump to. You'd need to increment y when the users' mouse is over your arrow buttons.

 
i have a normal scroll bar now, but i can't get it to activate when text larger than the textbox is gathered.
here i posted my fla (flash mx 2004)
if someone can identify the problem with "DBody" i would be very appreciative
 
As far as I can see your movie is working just fine. The text scrolls when it is larger than the textbox.

Am I missing the problem?

Wow JT that almost looked like you knew what you were doing!
 
thanks, i'm working on it, but i know i'm an ammature.

heres the thing i noticed later on.
it only occurs if the FIRST text you load fits within the window. any subsequent texts will not have access to the scrollbar. i solved this by just always loading in long texts. i have fixed some bugs, and my movie works almost perfect, only 2 problems.
[ol][li] i clicked the HTML process thing in the properties but the text is not parsed when it is entered.[/li]
[li] when i click the NEXT or BACK buttons, i want the scrollbar to start back at the top (otherwise it is just a little annoying that you have to scroll up first, then scroll down.) i tried Body.setScrollPosition(0); to a dissapointing loss[/li][/ol]
 
fixed 2...changed to thesb.setScrollPosition(0);

i still don't know about 1
and i am still curious about why it can't start with a text smaller than the text box without totally disabling the scrollbar for the remainder of the movie
 
You have to use...

myText.htmlText = var;

And not only...

myText.text = var;
 
thanks, just what i needed, of course the htmlText disapperas when the next keyframe comes, so i changed
myText.text = var;
to
myText.text = var;
myText.htmlText = var;

then on the next keyframe i added
myText.htmlText = myText.text

not sure why, but necessary.
 
What I was pointing out, is that you have to use htmlText rather than just text... Nothing to do with a particular var name and/or value...
 
i know, what i was pointing out is that the htmlText got erased when the next keyframe appeared in the movie and how i solved the problem

 
i just realized that when i enlarge the window it throws off the line spacing.
how can i fix this?
 
i mean when you open the .swf file (like people viewing will) and change the size to make it larger (like a lot of people will) to make it easier to see, it messes up the line spacing.
 
how? i mean i know how if it is embeded in html, but some people will have access to the swf file itself
 
Well you can add the following on the first frame...

fscommand("allowscale", "false");

And you can also disable the context menu (right-click), with...

Stage.showMenu = false;

...Also on the first frame.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top