Event>execute event

Got an idea, post it here

Event>execute event

Postby marque on Sun Feb 13, 2005 3:35 pm

Is this possible?

Ilike to have an enent that can execute an other event with an name that is stored as an variable.
This way it is possible to make an toggle button without the help of girder, and with the feature to set an image wich i requested before it will be realy awsome. I explain:

Code: Select all
event 1: album_play
            cmd1:music:album play
            cmd2:save to variable
                             information:album_add
                             variable:togglebutton1
            cmd3:button set image
                             ID:togglebutton1
                             Image:albumadd.jpg

event 2: album_add
            cmd1:music:album add
            cmd2:save to variable
                             information:album_open
                             variable:togglebutton1
            cmd3:button set image
                             ID:togglebutton1
                             Image:albumopen.jpg

event 3: album_open
            cmd1:music:album open
            cmd2:save to variable
                             information:album_play
                             variable:togglebutton1
            cmd3:button set image
                             ID:togglebutton1
                             Image:albumplay.jpg
event 4: toggle button1
            cmd:execute event
                             event:variable>togglebutton1



I hope myrequest is clear and not that hard to implement.
thanks.
marque
 
Posts: 55
Joined: Thu Dec 09, 2004 11:18 pm

Toggle Trick

Postby Colby on Sun Feb 13, 2005 5:37 pm

are you wanting one button with 3 or 4 toggles?

You could do something like this, (which is really nifty)

Create a new database in F2
Edit the db, and add fields ADD, OPEN, PLAY
For each item add the coverart png. skin://buttons\addalbum.png
Add an event to each item in the Advanced tab. (music: add, open, or play). *you will need to add the events one off for the category. ie if my sort order is ADD, PLAY, OPEN then ADD entry will have the event Playalbum. OPEN will have add event and so on.

In skin editor:
Create a category buttontoggle. Link this category to your new db.
Make it one row by one column, anywhere on the screen. Add the event next item, to the category, and disable scroll (scroll=none).

When you click on the buttontoggle category it will sequentially run through its' db. You can create text category>buttontoggle>display, to show what state your button or screen is in.

This isnt exactly what you wanted but its a neat trick.
Colby
 
Posts: 929
Joined: Mon Feb 02, 2004 7:42 am
Location: Brookline Station, MO, USA