Posted: Sat Jul 28, 2018 4:42 am Post subject: Sliding Text In Form
Hey Guys How to make texts slide in a panel for ex.
ht tp: // prntscr . com/kc2p5y (Just remove the spaces cause i can't post a link)
I want the text to go to the other side. Like Animated Text Moving. So IS there a way i can do that? By Using Timer?. Also Can Give me like example scripts for making the text animated?. any ideas thx _________________
f = createForm() --- your form
p = createPanel(f) --- panel
l = createLabel(p) --- create a label on your form
l.top = 10 --- label position on top of form
l.left = 10 --- label position on top of form
l.font.size = 14
l.font.style = 'fsBold'
l.font.color = '0x228B22' --- green
l.visible = false --- hiding that label for first time
text = "Blablablabla"
t_index = 1
t=createTimer(nil)
t.Interval=800
t.OnTimer=function(t)
if t_index <= #text then
l.Visible = true
l.Caption = text:sub(1,t_index)
t_index = t_index + 1
else
l.Visible = false
t_index = 1
end
end
t.Enabled=true
another version example :
Code:
f = createForm() --- your form
p = createPanel(f) --- panel
p.width = f.width
p.hight = 30
l = createLabel(p) --- create a label on your form
l.top = 10 --- label position on top of form
l.left = 10 --- label position on top of form
l.font.size = 14
l.font.style = 'fsBold'
l.font.color = '0x228B22' --- green
index = 0
spaces = 40
step = 1
values = {}
for i=0,spaces do
local text = "Blablablabla"
for j=0,i do
text = " " .. text
end
values[i] = text
end
timer=createTimer(nil, false)
timer.Interval=1000
timer.OnTimer=function(timer)
if index >= spaces then
step = -1
elseif index <= 0 then
step = 1
end
index = index + step
l.Caption = values[index]
-- local color = 0
-- for i=0,3 do
-- color = color * 10 + math.random(255)
-- end
-- l.Font.Color = color
end
timer.Enabled=true
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL
Yes That's What I want. Instead I want the text to go to the other side and coming out to the other side. So my main question is how do i do it in my trainer? How to Make The Script That You Made? Also. I want like 2 texts so how can i put them together moving? _________________
Yes That's What I want. Instead I want the text to go to the other side and coming out to the other side. So my main question is how do i do it in my trainer? How to Make The Script That You Made? Also. I want like 2 texts so how can i put them together moving?
Code:
UDF1.CETimer1.Interval = 1
function CETimer1Timer(sender)
if UDF1.CELabel1.Left ~= UDF1.Width + UDF1.CELabel1.Width then
UDF1.CELabel1.Left = UDF1.CELabel1.Left + 1
else
UDF1.CELabel1.Left = 0 - UDF1.CELabel1.Width
end
end
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum