Custom Slide bar
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 37
- Joined: Tue Apr 05, 2011 9:58 pm
Custom Slide bar
Hey Guys,
First off, thanks for all the help.
Basically what i am trying to do is create a custom slider, like the unlock slider on the iphone. I attached my file for reference. I would like to have "HANDLE.gif" start at the bottom of the grey box ("1" on the start value) and slide vertically. if you let go at any point it will bounce back to the bottom, if you make it to the top ("100" on the end value) it will produce "---.png". Any help would be greatly appreciated.
Thanks Again.
First off, thanks for all the help.
Basically what i am trying to do is create a custom slider, like the unlock slider on the iphone. I attached my file for reference. I would like to have "HANDLE.gif" start at the bottom of the grey box ("1" on the start value) and slide vertically. if you let go at any point it will bounce back to the bottom, if you make it to the top ("100" on the end value) it will produce "---.png". Any help would be greatly appreciated.
Thanks Again.
- Attachments
-
- Slider.zip
- (14.33 KiB) Downloaded 357 times
Re: Custom Slide bar
Hello Wayne,
This should be very easiy to accomplish. Once you have the "slider.png" and a "bg.png" then it should only take a matter of minutes.
1) Have a look at this link: http://intkeystrokes.posterous.com/cust ... th-animati. It will show you how to create a basic slider with AE4. This will lead you in the right direction, then from there you can customize all of the settings to suit your needs.
2) You can use the slider distance to determine if it has reached the end, for example:
All of this code will make sense once you watch that video. Later tonight I will post a tutorial and stack on how to do the whole thing.
This should be very easiy to accomplish. Once you have the "slider.png" and a "bg.png" then it should only take a matter of minutes.
1) Have a look at this link: http://intkeystrokes.posterous.com/cust ... th-animati. It will show you how to create a basic slider with AE4. This will lead you in the right direction, then from there you can customize all of the settings to suit your needs.
2) You can use the slider distance to determine if it has reached the end, for example:
Code: Select all
get distance(the location of graphic "SliderStart", the location of graphic "sliderb")
put it into SliderDistance
divide SliderDistance by 200
switch sliderDistance
case 50 //Just an example
move graphic "slider" to 20,50 in 200 milliseconds //Again, just example numbers. but this should give you the general idea.
end switch
Last edited by dburdan on Fri Nov 07, 2014 8:32 pm, edited 1 time in total.
-
- Posts: 37
- Joined: Tue Apr 05, 2011 9:58 pm
Re: Custom Slide bar
Great. So i need Animation Engine to do this? I can't wait to see the tutorial.
Do you do any freelance?
Do you do any freelance?
Re: Custom Slide bar
Wayne,
I'm sure there is a way to do this without Animation Engine but it streamlines the process very well and makes it so much more simple. Yes, I currently do very much freelance.
I'm sure there is a way to do this without Animation Engine but it streamlines the process very well and makes it so much more simple. Yes, I currently do very much freelance.
Last edited by dburdan on Fri Nov 07, 2014 8:33 pm, edited 1 time in total.
Re: Custom Slide bar
Id just add a quick note of support for animation engine as well, just completed an iOS app where ive emulated a few controls and AE makes life a lot simpler.
Re: Custom Slide bar
Hey Andy and Darci,
I posted a question on the Animantion Engine section of the forums http://forums.runrev.com/viewtopic.php?f=27&t=7336
But to summarize it I wanted to know if AE will make my game run smoother with AE comands rather than LivCode commands? I realize that I still have to go through my game and look to optimize the current code. I mean is AE just make life easier or does it perform comands more efficient?
If you can answer these questions please post on the AE Forums as I don't think this is the correct area for the post.
Danny
I posted a question on the Animantion Engine section of the forums http://forums.runrev.com/viewtopic.php?f=27&t=7336
But to summarize it I wanted to know if AE will make my game run smoother with AE comands rather than LivCode commands? I realize that I still have to go through my game and look to optimize the current code. I mean is AE just make life easier or does it perform comands more efficient?
If you can answer these questions please post on the AE Forums as I don't think this is the correct area for the post.
Danny
Re: Custom Slide bar
Danny,
I'm not entirely sure if AE runs the code smoother although it seems as if it does. My main reason for using it is the fact that it makes life WAY easier. It is so much more simple to include AE and run 2 lines of code opposed to 15.
I however, am also experiencing lag with my app. I'm not sure if my code isn't very efficient or if there is something else behind the issue. If I happen to come across an answer I will be sure to let you know!
I'm not entirely sure if AE runs the code smoother although it seems as if it does. My main reason for using it is the fact that it makes life WAY easier. It is so much more simple to include AE and run 2 lines of code opposed to 15.
I however, am also experiencing lag with my app. I'm not sure if my code isn't very efficient or if there is something else behind the issue. If I happen to come across an answer I will be sure to let you know!