One simple button, one big puzzle

Post in this thread issues and solution you find with the MainLobby 3 Client
Wysocki
Intermediate
Intermediate
Posts: 403
Joined: Mon Feb 03, 2003 10:50 pm
Location: Los Angeles Area
Contact:

One simple button, one big puzzle

Postby Wysocki » Tue Apr 19, 2011 4:58 pm

Amazing. I've been creating scenes for many years but I'm puzzled here. I have a scene that has been working but one button just started failing. Ultimately, to debug the problem, I created a new scene and put just one button on it. The button text is {{testvar}} and there is one conditional MLserveCmd defined:

mlservecmd.MLConditional|IsEqual##{{testvar}}##On##SetVariable|testvar~Off##SetVariable|testvar~On

While in the edit panel, clicking the TEST button works with no problem, the server variable shows the change and the button text changes. Also, if I leave the testing in the ON state and Launch the scene, the button will turn the variable off. HOWEVER, the launched button will not change the state to ON!!!! Not only that, it doesn't even show up in the verbose events on the server (the turn off command did show up along with all the TEST button events. What on Earth could I not be seeing here?

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Re: One simple button, one big puzzle

Postby mcascio » Tue Apr 19, 2011 7:37 pm

Do you have a {{testvar}} also in the label field for that button?

If so, do you have click enabled for both On and Off states?
Mario Cascio
Cinemar, Inc.
http://www.cinemaronline.com

Wysocki
Intermediate
Intermediate
Posts: 403
Joined: Mon Feb 03, 2003 10:50 pm
Location: Los Angeles Area
Contact:

Re: One simple button, one big puzzle

Postby Wysocki » Tue Apr 19, 2011 10:11 pm

Thanks for the quick reply, Mario!
Until you posed that question, I had never noticed there was a CLICK checkbox for both states. One was unchecked. Problem solved.

That's the problem with an old timers like me that have worked with early versions of ML and not kept up with some of the newer features (because if it works, don't fix it). Like, what is the "Alias" field for under the label (searched the wiki for half an hour with no luck)? Anyway, thanks again for your "outside of the forest" view of the trees.

User avatar
mcascio
Founder
Founder
Posts: 8270
Joined: Tue Jan 28, 2003 4:03 pm
Location: Kenosha, Wi
Contact:

Re: One simple button, one big puzzle

Postby mcascio » Wed Apr 20, 2011 7:57 am

Hi Terry,

Stick with it. We've added quite a bit of new features over the years. The ability to determine whether a button is clickable or not depending upon the state comes in very handy.

Alias is used to target a specific button or library object on the page.

For example, when using Text.Sizable, you can scroll that text field up/down based upon the Alias:
MLText|ScrollUp~layer~aliasname

Check out these release notes from back in 2008 where we describe the use of AliasName:
http://wiki.cinemaronline.com/index.php ... n_3.00.121

New MLCMDs to support Aliasname
setProperty|visible~layer~aliasname~true/false/toggle
ie: MLServeCmd.MLCmd|{{clientname}}~setProperty|visible~0~lyricsText~toggle
setProperty|alpha~layer~aliasname~%
setProperty|x~layer~aliasname~xPos
setProperty|y~layer~aliasname~yPos
setProperty|tint~layer~aliasname~TintColor~%Level
setProperty|graphic~layer~aliasname~LibraryID_Name
setProperty|rotation~layer~aliasname~degrees
setProperty|scale~layer~aliasname~%
setProperty|xscale~layer~aliasname~%
setProperty|yscale~layer~aliasname~%

Keep in mind, the button must be on the scene in order to be targeted.
Mario Cascio

Cinemar, Inc.

http://www.cinemaronline.com


Return to “MainLobby 3 Client”

Who is online

Users browsing this forum: No registered users and 1 guest