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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling text through button rollover 1

Status
Not open for further replies.

dartali

Technical User
May 27, 2001
19
MX
Can somebody tell me how to create a scrolling text through button rollover. I know I have to create a new scene for this (for the text). Question is how I can make the text scroll.

Thanks!

dartali
 
make a movie clip (MC) of the scrolling text, then insert that MC into the rollover portion of the button in question.
 
Dear Jaquan,

Thanks for the instructions. Still, could you tell me how to insert that MC into the rollover portion of the button in question?

Cheers,

dartali
 
Hi,

Go into button edit mode either by double clicking the button on the stage or in the library. You will see four frames, up - over - down - hit. Put your MC in the over part.

roda B-)
 
Hi dartali, using the above method will mean that your text will jump back to the beginning when you move the mouse off the button: i assume you would want it to stay wherever it had scrolled up to...if this is the case i would recommend doing this a different way:

Create your button and your text movieclip separately and drag them both on stage. Make sure there is a stop action on the first frame of the movieclip. Name the instance of the movieclip something like 'text'. Go the button actions and insert the following script


On (Roll Over)
Begin Tell Target ("/text")
Go to and Play ((GetProperty (textscroll, _currentframe )))
End Tell Target
End On
On (Roll Out)
Begin Tell Target ("/text")
Go to and Stop ((GetProperty (textscroll, _currentframe )))
End Tell Target
End On


Now Dave will doubtless jump on here and tell you how to simplify this code for use in flash 5, but i think it will still work so try it. Im waiting for 5 to arrive at the moment so im not too up on the new actionscripts.

Test your movie, what should happen is the text scrolls when you rollover the button, but stops where it is when you roll off. it should then carry on from where it left off when you roll back over the button.

Hope this helps :)

Nick Price
nick.price@misuk.net
 
OK i just realised i left that 'textscroll' bit in that code from copying and pasting some script from another fla. By all rights it shouldnt be there because there's nothing in the movie called 'textscroll' but for some strange reason it all still works....HOW??? When i try to 'correct' the code by changing 'textscroll' to '/text' it stops working. Am i going mad? Nick Price
nick.price@misuk.net
 
Sorry, just me being thick; didnt even need GetProperty. this code should work:

On (Roll Over)
Begin Tell Target ("/text")
Go to and Play (_currentframe)
End Tell Target
End On
On (Roll Out)
Begin Tell Target ("/text")
Go to and Stop ( _currentframe )
End Tell Target
End On

LOL
Nick Price
nick.price@misuk.net
 
Insert a new layer in the edit mode of that button(right-click), and just drag your mc on the button's keyframe state you wish, like you would to add a sound to one state.

;-)
 
Thanks to all of you replying to my question. I'll try everything till I get it right.

Cheers :)

dartali
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top