What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] Trouble using ImageElmt_SetImageFile()

[?] Trouble using ImageElmt_SetImageFile()
Author: Message:
Skarbo
New Member
*


Posts: 7
38 / Male / Flag
Joined: Apr 2008
O.P. [?] Trouble using ImageElmt_SetImageFile()
Hi, i just started scripting scripts for Messenger. Right now im just playing around and figuring out what i can do.

When i try to change the image id=ImgSound2 using ImageElmt_SetImageFile() nothing happens.
Im pretty new at XML, so maybe the problem lies there.

Im running Messenger Plus! Live 4.60.324 on a XP.

Here is an example:

XML
code:
<Interfaces xmlns="urn:msgplus:interface" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:msgplus:interface PlusInterface.xsd">
  <Window Id="WndTest" Version="1">       
    <Attributes>           
      <Caption>Test Window</Caption>
    </Attributes>
    <TitleBar>
        <Title><Text>Hello!</Text></Title>
    </TitleBar>
    <Position ClientWidth="170" ClientHeight="45"/>
    <DialogTmpl/>

    <Elements>
      <Element     xsi:type="ImageElement" Id="ImgSound">
        <Position Top="5" Left="6"/>
        <Image>
          <Name>icon-speaker</Name>
        </Image>
      </Element>
      <Element     xsi:type="ImageElement" Id="ImgSound2">
        <Position Top="5" Left="40"/>
        <Image>
          <Name></Name>
        </Image>
      </Element>
    </Elements>

    <Controls>
        <Control xsi:type="ButtonControl" Id="Test">
            <Position Left="115" Top="25" Width="50"/>               
            <Caption>Test</Caption>
        </Control>
    </Controls>
   
  </Window>
</Interfaces>

JS
code:
function OnEvent_Initialize(MessengerStart)
{
    var Wnd = MsgPlus.CreateWnd("InterfaceTest.xml", "WndTest");
    Wnd.ImageElmt_SetImageFile("ImgSound2","icon-speaker");    // not working
}

function OnEvent_Uninitialize(MessengerExit)
{
}

function OnWndTestEvent_CtrlClicked(Wnd, ControlId)
{
    if(ControlId == "Test")
        Wnd.ImageElmt_SetImageFile("ImgSound2","icon-speaker");    // not working
}
Sorry for the long copy/paste, tried to make it as short and easy as possible.

04-22-2008 03:02 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] Trouble using ImageElmt_SetImageFile() - by Skarbo on 04-22-2008 at 03:02 PM
RE: [?] Trouble using ImageElmt_SetImageFile() - by pollolibredegrasa on 04-22-2008 at 03:15 PM
RE: [?] Trouble using ImageElmt_SetImageFile() - by matty on 04-22-2008 at 05:28 PM
RE: [?] Trouble using ImageElmt_SetImageFile() - by Skarbo on 04-22-2008 at 05:51 PM
RE: [?] Trouble using ImageElmt_SetImageFile() - by Matti on 04-22-2008 at 06:44 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On