gokalpfirat Posted April 6, 2012 Share Posted April 6, 2012 I want to make sliding text but how? Are there any function that makes text sliding? Link to comment
drk Posted April 6, 2012 Share Posted April 6, 2012 Use arc_ animation library or create your own animations with 'onClientRender' or 'getTickCount' events and position / alpha and other functions. Link to comment
Guest Guest4401 Posted April 6, 2012 Share Posted April 6, 2012 The simplest way is to use math with onClientRender. I've done an example to show you how It can work. In this example, the text just moves from top left of your screen till 100 pixels and then stops. local speed = 1 local startAt = 0 local stopAt = 100 addEventHandler("onClientRender", getRootElement(), function() if startAt < stopAt then -- what you'd like to do till it reaches the point dxDrawText("TEXT",0+startAt,0) startAt = startAt + speed else -- what you'd like to do after it reaces the point dxDrawText("TEXT",stopAt, 0) end end ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now