WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Skinning and Design > Modern Skins > How to add "open url" button
  Last Thread   Next Thread
Author
Thread Post New Thread    Post A Reply
moonspy
Junior Member

Registered: Oct 2009
From:

How to add "open url" button

Hi Project builders

I just started to do build my own skin for a carpc aplication. My idea is to make a very simple skin, but with custom buttons what will open pre defined .pls stream automatically when pressed.

the description:
Like making custom looking buttons for PLAY,PAUSE,NEXT and so on.. I want to make a button that will open "www.di.fm/aacplus/dance.pls" and clears "play list" and start playing the stream automatically.

How can I access this command and can I add this kind of command to player.xml file?

Thanks and Regards
-moonspy-

Quick Link | Report this post to a moderator | IP: Logged

moonspy is offline Old Post 10-28-2009 08:00 AM
Click Here to See the Profile for moonspy Click here to Send moonspy a Private Message Click Here to Email moonspy Find more posts by moonspy Add moonspy to your buddy list Edit/Delete Message Reply w/Quote
moonspy
Junior Member

Registered: Oct 2009
From:

Found some info my self, but haven't discovered how to put everything together..

If I understand correctly I need to make maki code for the url opening part..

I try to keep everything simple..

player.xml file

<!-- Element definition -->
<elements>
<bitmap id="player.background" file="player/Sunset.jpg"
gammagroup="Backgrounds"/>
<bitmap id="player.button.previous" file="player/blue-previous.png"
gammagroup="Buttons"/>
<bitmap id="player.button.play" file="player/blue-play.png"
gammagroup="Buttons"/>
<bitmap id="player.button.pause" file="player/blue-pause.png"
gammagroup="Buttons"/>
<bitmap id="player.button.stop" file="player/blue-stop.png"
gammagroup="Buttons"/>
<bitmap id="player.button.next" file="player/blue-next.png"
gammagroup="Buttons"/>
<bitmap id="player.button.yourbutton" file="player/url.png"
gammagroup="Buttons"/>
</elements>
<!-- Playback Buttons Group Definition -->
<groupdef id="player.normal.playbuttons" name="Player buttons">
<button
id="Prev"
action="PREV"
x="25" y="0"
image="player.button.previous"
tooltip="Previous"
/>
<button
id="Next"
action="NEXT"
x="50" y="0"
image="player.button.next"
tooltip="Next"
/>
<button
id="Play"
action="PLAY"
x="0" y="25"
image="player.button.play"
tooltip="Play"
/>
<button
id="Pause"
action="PAUSE"
x="25" y="25"
image="player.button.pause"
tooltip="Pause"
/>
<button
id="Stop"
action="STOP"
x="50" y="25"
image="player.button.stop"
tooltip="Stop"
/>
<button
id="Yourbutton"
action="?????????"
x="100" y="100"
image="player.button.stop"
tooltip="Stop"
/>
</groupdef>
<!-- Song File Information and Visualization Group Definition -->
<groupdef id="player.normal" name="Winamp">
<text
id="timer"
display="time"
x="120" y="50"
w="30" h="20"
font="wasabi.font.default" fontsize="12"
timecolonwidth="7"
/>

<!-- Song File Information-->
<text
id="infoline" ticker="1"
display="songinfo" default=""
x="160" y="50"
w="200" h="20"
font="wasabi.font.default" fontsize="12" ghost="1"
/>
<!-- Visualization -->

<vis
id="vis"
x="160" y="12"
w="300" h="100"
/>

</groupdef>

<!-- Main Window: Container and Layout -->
<container id="main" name="Main Window" default_x="0" default_y="0" default_visible="1">
<layout id="normal" background="player.background">
<group id="player.normal" />
<group id="player.normal.playbuttons" x="12" y="12" />
</layout>
</container>





testi.M file

#include std.mi

Global Button yourbutton;

System.onScriptLoaded()
{
Layout mainLayout = getContainer("main").getLayout("normal");
yourbutton = mainLayout.getObject("your.button");
}

yourbutton.onLeftButtonUp(int x,int y)
{
system.navigateUrl("http://www.di.fm/..../...pls");
}

So from here can compile the testi.m to maki, but nothing hapens when i try the button..
I know that something is missing, but what and from where..

Do the button "action" indicates somehow that there is code behind it?

Any help is appreciated.. thanks

moonspy

Quick Link | Report this post to a moderator | IP: Logged

moonspy is offline Old Post 10-28-2009 09:37 PM
Click Here to See the Profile for moonspy Click here to Send moonspy a Private Message Click Here to Email moonspy Find more posts by moonspy Add moonspy to your buddy list Edit/Delete Message Reply w/Quote
All times are GMT. The time now is 04:41 AM. Post New Thread    Post A Reply
  Last Thread   Next Thread
WINAMP.COM | Forums : Powered by vBulletin version 2.3.9 WINAMP.COM | Forums > Skinning and Design > Modern Skins > How to add "open url" button
Show Printable Version
 | 
Email this Page
 | 
Subscribe to this Thread

Forum Jump:
 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is off
vB code is ON
Smilies are ON
[IMG] code is ON