![]() |
![]() |
![]() |
![]() |
|
|
#1 |
|
Member
|
Please sticky
Hello everyone, I coded a UCI launcher which allows changing UCIs. All you have to do is: add your UCI to the launcher and post an updated version here. To call the launcher from your UCI, add the following code: Code:
var uciconf : SharedObject = SharedObject.getLocal("UCIchoosersSaveState");
uciconf.data.UCIchosen=-1;
uciconf.flush();
ext_fscommand2("EtcUsrSetMainmenu", "0");
_global.Load_SWF(_global.MODE_MAIN);
![]() Here is the code of the launcher. Get the .fla and a working example from http://planetlars.net/store/BB.zip. Code:
/*start code*/
var UCIs : Array = new Array();
var UCIOffs : Array = new Array();
var UCICovers : Array = new Array();
/*please add to*/
UCIs.push(Aero);
UCIOffs.push(AeroOff);
UCICovers.push(AeroCover);
UCIs.push(Swipe);
UCIOffs.push(SwipeOff);
UCICovers.push(SwipeCover);
UCIs.push(Puzzle);
UCIOffs.push(PuzzleOff);
UCICovers.push(PuzzleCover);
UCIs.push(BB);
UCIOffs.push(BBOff);
UCICovers.push(BBCover);
var UCISWFnames : Array = ["Aero.swf","Swipe.swf","Puzzle.swf","BB.swf"];
var OnForEachUCI : Number = 15; // 1111 bitwise //the decimal representation of the binary number which consists of 1s only and has got as many 1s as there are UCIs.
/*adding end*/
/*do not touch*/
var conf : SharedObject = SharedObject.getLocal("UCIchoosersSaveState");
var UCIchosen : Number = conf.data.UCIchosen;
if(UCIchosen==undefined)
{
conf.data.UCIchosen=-1;
conf.flush();
}
else if(UCIchosen>=0&&UCIchosen<UCISWFnames.length) _global.Load_SWF(_global.MODE_ETC,UCISWFnames[UCIchosen]);
var visibly : Number = conf.data.visibly;
if(visibly==undefined)
{
conf.data.visibly=OnForEachUCI;
conf.flush();
visibly=OnForEachUCI;
}
for(i=0;i<UCIs.length;i++)
{
if(visibly-(visibly|1)==-1)
{
UCIs[i]._visible=false;
UCIOffs[i]._visible=false;
UCICovers[i]._visible=false;
}
visibly>>=1;
}
/*do not touch end*/
/*please add to*/
AeroCover.onRelease=function()
{
_root.conf.data.UCIchosen=0;
_root.conf.flush();
_global.Load_SWF(_global.MODE_ETC,_root.UCISWFnames[0]);
}
AeroOff.onRelease=function()
{
_root.conf.data.visibly=conf.data.visibly&14; // 1110 bitwise
_root.conf.flush();
Aero._visible=false;
AeroOff._visible=false;
AeroCover._visible=false;
}
SwipeCover.onRelease=function()
{
_root.conf.data.UCIchosen=1;
_root.conf.flush();
_global.Load_SWF(_global.MODE_ETC,UCISWFnames[1]);
}
SwipeOff.onRelease=function()
{
_root.conf.data.visibly=conf.data.visibly&13; // 1101 bitwise
_root.conf.flush();
Swipe._visible=false;
SwipeOff._visible=false;
SwipeCover._visible=false;
}
PuzzleCover.onRelease=function()
{
_root.conf.data.UCIchosen=2;
_root.conf.flush();
_global.Load_SWF(_global.MODE_ETC,_root.UCISWFnames[2]);
}
PuzzleOff.onRelease=function()
{
_root.conf.data.visibly=conf.data.visibly&11; // 1011 bitwise
_root.conf.flush();
Puzzle._visible=false;
PuzzleOff._visible=false;
PuzzleCover._visible=false;
}
BBCover.onRelease=function()
{
_root.conf.data.UCIchosen=3;
_root.conf.flush();
_global.Load_SWF(_global.MODE_ETC,_root.UCISWFnames[3]);
}
BBOff.onRelease=function()
{
_root.conf.data.visibly=conf.data.visibly&7; // 0111 bitwise
_root.conf.flush();
BB._visible=false;
BBOff._visible=false;
BBCover._visible=false;
}
/*adding end*/
AllOnCover.onRelease=function()
{
for(i=0;i<_root.UCIs.length;i++)
{
_root.UCIs[i]._visible=true;
_root.UCIOffs[i]._visible=true;
_root.UCICovers[i]._visible=true;
}
_root.conf.data.visibly=_root.OnForEachUCI;
_root.conf.flush();
}
/*enable if you had to create a new mainmenu page, 3 mainmenu pages total maximum!*/
FlipCover.onRelease=function()
{
/*
ext_fscommand2("EtcUsrSetMainmenu", "1");
_global.Load_SWF(_global.MODE_MAIN2);
*/
}
/*enabling end*/
/*end of code*/
Hope it helps and gets supported The foot is from GNOME. It's their logo, yet as far as I understood from their brands page free to use.planetLars |
|
|
|
|
#2 |
|
Senior Member
Join Date: Mar 2009
Location: Germany, Leipzig
Posts: 276
|
very nice
__________________
current: Cowons S9 16gb previous: Archos Gmini 402 earbuds: Shure SE115 AKG K 324 P Sennheiser HD 202 |
|
|
|
|
#3 |
|
Junior Member
Join Date: Sep 2004
Posts: 3
|
Very nice. I have some ideas I would like to see if I can implement. I'm getting my S9 later today.
![]() |
|
|
|
|
#4 |
|
Member
|
I bump this only this one time for the foreseeable future to get the attention of other developers.
Even if there are the names of UCIs other than BigButtons listed in the current version, they are not supported right now. They are placeholders only.
__________________
![]() avatar and signature images cut from the Opera 10 wallpaper
|
|
|
|
|
#5 |
|
We're still breathing baby.
![]() |
Sorry but I couldn't really understand the use of the launcher.. unless it's related to launching UCIs.. for which I don't see how designers' support is needed. Help me out, someone.
__________________
2. Reinstall firmware if this fails, THEN start a thread about it. Signature Permissions For New Members DonIago never leaves spam threads/bots for me to delete/ban ![]() |
|
|
|
|
#6 |
|
Member
|
Hi, the launcher is for launching UCIs. The launcher automatically launches the last chosen UCI after the S9 has powered on (it replaces mainmenu1). In order to show the launcher again a UCI coder/designer has to add the code mentioned at the beginning of the first post to his/her UCI. Also a text entry has to be added to the launcher with which to access the UCI. Currently I'm only aware of BigButtons being able to show the launcher again, the other shown UCIs were placeholders meant to show how it looks with several UCIs. Perhaps this launcher is obsolete as I read something about a xml-based launcher which may be supported natively by the S9. Perhaps that one is in wide-spread use already? I don't know as I don't follow the forum anymore for time-reasons.
__________________
![]() avatar and signature images cut from the Opera 10 wallpaper
|
|
|
![]() |
| Tags |
| chooser, launcher, selector, uci |
| Thread Tools | |
| Display Modes | |
|
|