Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 1 made on Tuesday July 6, 2010 at 12:03
alpha
Long Time Member
Joined:
Posts:
September 2003
258
I just updated to Pronto Edit 2.4 and was experimenting with Gestures on my 9400. BluPhenix's Swipes made a great example. I created an activity where if you touch the background and Flick it , Swipe it or Drag it , all the buttons move in unison. One possible uses is to take a photo of the original equipment remote and use as the drag-image with button overlays. I made the background  ( 240 X 960 ), three times the height of the normal display. It is like having three pages in one. The movement is confined to the Y-Axis (up-down). If I Flick Down everything goes down until I stop it with a screen press or if the background reaches the limit. The same with Up.

It all works but...

If I Flick Down when it is already at the bottom the buttons will slide off the screen. Not Good. Same with up.
Also after a couple of hard flicks the buttons do not always stop in the same position relative to dragged background. All a little high or low.
I was looking for a way to keep the buttons on the screen in the same layout as when I put them in the editor , without having to define limits to them individually.
Any thoughts would be appreciated.



// Special speed flick- drag Background button
//When dragging or flicking the main background
// called "drag_back" the rest of the buttons follow.
//When reaching the top or bottom of the
// drag_back the movement stops.
//This only goes Up - Down.


var drag_back   = widget("DRAG_BACK") ;
// The Drag_BACK Button is 240 X 960 Semi-transparent or picture
// placed as the bottom layer.

var but_b = widget ( "BUT_B" ) ;  // Buttons that move with drag_back
var but_c = widget ( "BUT_C" ) ; // probably be about20 buttons in all.
var but_d = widget ( "BUT_D" ) ;
var but_e = widget ( "BUT_E" ) ;
var but_f = widget  ( "BUT_F" ) ;
var but_g = widget ( "BUT_G" ) ;

var old_Y ;     // initial position of top of Drag button
var change_in_Y = 0 ;  // change in position

//-----------------------------------------------------------------------

drag_back.onPress = function ( x,y ) {
    old_Y = y;
    change_in_Y = 0 ;
};

drag_back.onMove = function ( x,y ) {
    change_in_Y = old_Y - y ;
};

function moveAll ( ) {
// this function updates the position of the all buttons

    drag_back.top = drag_back.top - change_in_Y;  // the one pressed

    but_b.top = but_b.top - change_in_Y;  // Buttons that move with drag_back
    but_c.top = but_c.top - change_in_Y; // probably be about 20 buttons in all.
    but_d.top = but_d.top - change_in_Y;
    but_e.top = but_e.top - change_in_Y;
    but_f.top   = but_f.top - change_in_Y;
    but_g.top = but_g.top - change_in_Y;

    // change_in_Y = 0 ;  // speed flick is on
    // remove " //  "  to stop movement on release of Drag  Button

    if ( drag_back.top >= 0) {  // stop  movement at top
    drag_back.top = 0;
    change_in_Y = 0 ;
    };

    if (drag_back.top <= -640) {  // stop  movement at bottom
    drag_back.top = -640 ;
    change_in_Y = 0 ;
     };
    scheduleAfter ( 50,  moveAll ) ;   
};
moveAll ( ) ;



//Thanks.

Project Boredom 2 is here. [Link: mediafire.com]
------------------------
Check Version 1 & 2 out in the files section.


Hosting Services by ipHouse