Controlling the unity ui slider via script - user-interface

I have a simple question: how does one go about controlling the UI Slider in Unity via code? I can control a GUI slider quite easily, but I'd prefer to work with the UI slider that can be assigned in the hierarchy.
I have a few scripts that control volume and audio timeline scrubbing (moving the slider to a certain point in an audio track) that work great, but I want to assign these scripts to a Unity UI slider.
I think I am missing something pretty easy, but have spent too much time trying to get this right. Any help would be greatly appreciated!

Have you had a look at the Tutorial for Sliders yet? And the Scripting API?
http://docs.unity3d.com/ScriptReference/UI.Slider.html
http://unity3d.com/learn/tutorials/modules/beginner/ui/ui-slider
The Slider has a OnValueChange eventHandler and there you can for example directly drag in your AudioListener (attached to the main Camera) or the script you want to call.
To add more calls just press the + ;)
Good Luck, hope that helps.

Related

Is there a way to render a webpage into a shrinked like control panel like?

I'm new to web development and not sure how to explain this, I'm building a tool with lots of links and features to help making things at a call center easier but I wish everytime the page is opened it resizes to a small rectangular version. Is there a way this can be done? Thanks!!

How To: Animation in Corona SDK

I want to create a game using Corona SDK and have done so before but without the use of any kind of animation. This time, as you might have guessed, I need to learn how to animate!
What exactly am I looking for? What a mighty fine question!
I need some software that will allow me to create multiple pictures (profile view) of a man running and pictures that will allow me to simulate a moving sky. I am open to any and all suggestions!
Also, if you could tell me as to how I can write an animation function in Corona, that would be awesome.

How to animate basiceditfield in blackberry?

In my j2me blackberry application, I want to open editfield to enter text when user clicks on search icon. I have search icon added at the top right corner, when user clicks on it, I want to open basiceditfield with animating from right to left. I want Animation should be like default search on main screen in blackberry. How to do this? Is it possible?
You can do almost anything with the Blackberry Ui, if you understand it and are prepared to put the time in. But what you see when you press the magnifying glass is something that someone has spent a lot of time doing. There is API for doing anything like that (at least not one I have found). So if you are not experienced doing BlackBerry Ui, as I suspect is the case here, then I would suggest that replicating what the BB engineers have done with the animation from the search icon on the Home screen to the search screen, is too difficult to justify.
A lot of these sorts of things are, in my opinion, just gloss. They do not make the application any easier to use, just make it look flash. Personally, I would spend your time on making sure your application works well, rather than making it look flashy.
I do recommend using the screen transition animations as a way of moving from one screen to another. These are fairly easy to use and when used correctly, provide a good visual clue to your user regarding the flow through your application. I also suggest you spend some time making sure your assets (icons etc.) look good, on all the various sizes of BB that you are developing for.

JavaFX 2.0 custom Window frame buttons

I want to add a button to my applications window frame. At the moment I have the regular windows look: "minimize, maximize and close". I were thinking that I should make a whole new window frame with my own buttons, but what I really need is just an additional button that has the functionality of "Log out". Kinda like Skype: http://cloud.addictivetips.com/wp-content/uploads/2011/08/Compact-View.jpg
I have been searching the web for some pointers and hints, but I've gotten no longer.
So if anybody has any comments or code that would help me, it would be greatly appreciated!
The JavaFX Ensemble Sample application demonstrates custom buttons for "minimize, maximize and close", you can get it's source code here.

Is there a way to change the windows phone 7 emulator orientation in runtime

Is there way to change the orientation of the emulator in runtime.
I have some tests for a component which include different layouts based on orientation. It would be great if this is possible.
I'm not sure what you are asking for?
If you just want to change the orientation yourself, then use the mouse - there's some buttons top right on the emulator to change orientation - http://msdn.microsoft.com/en-us/library/ff402568(v=VS.92).aspx
If you want to automate this, then since I'm not sure there's a keyboard shortcut or command line for this, then you could just about do it by modifying the code inside https://github.com/Expensify/WindowsPhoneTestFramework/
Alternatively... it might be quicker/easier to just hack your own code to set the supportedorientation of each page just for one-off testing.
Late response (translated by google), but can be useful for others.
Management guidance on this in the options bar to the right of the emulator:
Detail to know, so that the orientation is done properly and is taken into account, we must re-press the "pause" button if you did previously to use your keyboard. Otherwise, you will feel duty systematic tilt your head to the left or right. :)

Resources