IPhone MLLighting Slider

Forum for discussing building user interfaces for controlling MLServer using the iPhone or iPod Touch.
User avatar
maik
Senior Member
Senior Member
Posts: 208
Joined: Sat Mar 10, 2007 12:46 pm
Location: North Bay, Ontario, Canada
Contact:

IPhone MLLighting Slider

Postby maik » Tue Aug 09, 2011 10:14 pm

Who can help me PLEASE?
I can controll my lights with the OFF and the ON button, also if I use the slider I can dimm the lights. BUT how do I ge the slider to stay or show the level of the active light?
Is it some thing I need to change here?

Code: Select all

$('slider2handle').addEventListener('touchend', function(event) {
         var sVal = Math.floor(Sliders[0].curX / Sliders[0].maxX * 100);
         $('ml__mllighting_2_level').innerHTML = sVal;
         doCommand("MLLighting|On~7~"+sVal);


I have changed the "'ml__mllighting_2_level'" to mllighting|7~value but that just breaks the dimming.


Thank you
Maik

shakey
Intermediate
Intermediate
Posts: 285
Joined: Sat Jun 28, 2008 9:55 pm
Contact:

Re: IPhone MLLighting Slider

Postby shakey » Tue Aug 09, 2011 10:30 pm

Maik,

Change the code to the following and it should work.

$('slider2handle').addEventListener('touchend', function(event) {
var sVal = Math.floor(Sliders[0].curX / Sliders[0].maxX * 100);
$('ml__mllighting_7_value').innerHTML = sVal;
doCommand("MLLighting|On~7~"+sVal);

Chad

User avatar
maik
Senior Member
Senior Member
Posts: 208
Joined: Sat Mar 10, 2007 12:46 pm
Location: North Bay, Ontario, Canada
Contact:

Re: IPhone MLLighting Slider

Postby maik » Tue Aug 09, 2011 10:50 pm

This is on the Lighting-Room1.html page

Code: Select all

      $('slider2handle').addEventListener('touchend', function(event) {
         var sVal = Math.floor(Sliders[0].curX / Sliders[0].maxX * 100);
         $('ml__mllighting_007_value').innerHTML = sVal;
         doCommand("MLLighting|On~7~"+sVal);

AND


Code: Select all

      <span style="z-index:3;position:absolute;top:160px;left:20px;width:285px;height:34px;text-align:center;font:normal 22px/34px Helvetica;color:rgba(255, 255, 255, 1.0);padding:0px;border:0px;margin:0px;overflow:hidden;text-overflow:clip;">number 7 pool</span>
      <div class="sliderbase" style="z-index:2;position:absolute;top:190px;left:15px;">
         <img id="slider2" src="images/Slider1.png" style="z-index:3;position:inherit;top:16px;left:58px;-webkit-transform:scale(1.45);" />
         <img id="slider2handle" src="images/SliderHandle1.png" style="z-index:4;position:inherit;top:16px;left:7px;-webkit-transition: -webkit-transform 0.25s ease" />
         <span id="ml__mllighting_007_value" _MLSlider="1" _MLSliderIndex="2" style="visibility:hidden;">{{mllighting_007_value}}</span>


This now works on UPB light #007. On Off Dimming and status.

Working! Great, THANK YOU Chad!!

shakey
Intermediate
Intermediate
Posts: 285
Joined: Sat Jun 28, 2008 9:55 pm
Contact:

Re: IPhone MLLighting Slider

Postby shakey » Wed Aug 10, 2011 3:50 pm

No problem I'm glad I could help. I have the iPhone and iPad pages just about redone with the new commands for them MLS4 family drives. I will post when done if anyone has interest.

Chad

User avatar
jjjukebox
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1024
Joined: Sat May 22, 2004 9:54 pm
Location: Toronto
Contact:

Re: IPhone MLLighting Slider

Postby jjjukebox » Wed Aug 10, 2011 5:53 pm

Has any one tried this type of slider on the iPad?
J.J. Jukebox
Member

shakey
Intermediate
Intermediate
Posts: 285
Joined: Sat Jun 28, 2008 9:55 pm
Contact:

Re: IPhone MLLighting Slider

Postby shakey » Wed Aug 10, 2011 6:26 pm

I haven't tried it. I guess I could cut and paste it to a page to try. I suck at HTML. I can go thru Daves work and change commands and variables , but moving graphics, etc. around is hit or miss. That's why I would like to see a iDeivce client designer. I've seen some very nice non flash screens.

Chad


Return to “iPhone / iPod Touch Beta”

Who is online

Users browsing this forum: No registered users and 1 guest