View Full Version : LUA OpenOrClose question

November 13th, 2009, 12:50 AM
I am attempting to make a "slide-in" frame like the Music tab(button) on the Home Page in the new-pro ccf. I looked at the Action field and saw this action: Execute lua code (OnRelease)(OpenOrClose('MusicFrame')) with the referenced frame residing in a non-visible portion of the page.

I added this action to the button on the page that I want to use with my AV equipment for Volume Control. When the button is depressed I would like the VolCtlFrame to slide into view like your MusicFrame example.

However, when I run the ccf via the Tools/Send This to Netremote nothing happens.

Any ideas as to what I may be doing wrong.


Rob H
November 13th, 2009, 06:29 AM
I assume you changed MusicFrame to VolCtlFrame in that action?

Note that frame names used like this must be unique.

November 13th, 2009, 01:41 PM
That is correct I did substitute VolCtlFrame for MusicFrame. I also have a frame on that page named VolCtlFrame which is a unique name. I didn't know if there was something else that you may have had to define or describe elsewhere for this to work. One thing that was different is that your non-visible frame was hidden on the "left" side of the page. Mine was hidden at the "bottom" of the page to locate it near the VolCtlButton. Don't know if that makes a difference.

I could just design a "jump to" page for this, but I thought the sliding frame was wicked cool and a great answer for the limited PPC screen size.

Any further thoughts would be appreciated. If there is anything I could send you, like the ccf, that might help just let me know.


Rob H
November 13th, 2009, 08:33 PM
Yes, the CCF and any associated .lua files would definitely help.

Before you do that, there's one thing that you need to check, in the CCF's .lua file you need to have

require "ElementAnimation"

for any of this to work.