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.
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.
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.
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
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.