Post 1 made on Wednesday July 7, 2010 at 23:20 |
I am using the following code( referred to pronto script developers' guide) under a button's action to display some info in my pronto page while excuting assigned IR codes' actions whenever the button is pressed. 1)I used a panel and named it " INFO" 2)text and named it " A" respectively under the panel propertie's advanced tag
As soon as the page start , i want to display the panel , but not the text "A". I wanna display the text " A" only after the button is clicked.
Any suggestion ?
Thanks
var info = GUI.widget("A"); info.visible = true; var b = GUI.widget("eg_1"); b.onPress = function (x,y) { info.visible = true; } b.onRelease = function () { info.visible = false; }; executeActions();
|
|
Post 2 made on Thursday July 8, 2010 at 14:11 |
Guy Palmer Active Member |
Joined: Posts: | June 2008 648 |
|
|
I'm not clear how your question and your script relate to each other. But, to answer your question, simply put the line GUI.widget("A").visible = false in your page script.
|
|
Post 3 made on Thursday July 8, 2010 at 21:49 |
alpha Long Time Member |
Joined: Posts: | September 2003 258 |
|
|
Try this. Make a blank label in the editor with widget "A" with the size and color you want then.....
Place this script in the page.
var info = GUI.widget( "A" ) ; info.visible = true ; // this line makes the panel visible var b = GUI.widget( "eg_1" ) ; // should be caps
Place this script in the button.
b.onPress = function (x,y) { info.visible = true; // makes panel visible info.label = "A" ; // place whatever text between the quotes executeActions ( ) ; // executes before you release the button } ;
b.onRelease = function ( ) { info.visible = false; // makes panel not visible info.label = "" ; // when you let go it returns to a blankspace };
// end of script
You can also use the onHold function. Check that out in the P.S. Developers guide . The onPress function only works with the latest firmware and prontoedit .
|
Project Boredom 2 is here. [Link: mediafire.com]------------------------ Check Version 1 & 2 out in the files section. |
|
Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our
Marketplace. For information on how to advertise your service or product
click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.