Play a container item from button
#1
Hey,

I'm using a button to scroll 2 containers with the same content (because of animations issue).
I would like to launch the content of the first container when <onclick> on the button :

Dummy button :
Code:
        <!-- Dummy Button for List Scroll -->
        <control type="button" id="50">
            <left>0</left>
            <top>0</top>
            <width>80</width>
            <height>80</height>
            <texturefocus colordiffuse="00FFFFFF">common/white.png</texturefocus>
            <texturenofocus colordiffuse="00FFFFFF">common/white.png</texturenofocus>
            <focusedcolor>-</focusedcolor>
            <disabledcolor>-</disabledcolor>
            <onup>SetProperty(SubMenu2,VISIBLE,Home)</onup>
            <ondown condition="IsEmpty(Window(home).Property(SubMenu2))">ClearProperty(SubMenu,Home)</ondown>
            <ondown>ClearProperty(SubMenu2,Home)</ondown>
            <ondown  condition="IsEmpty(Window(home).Property(SubMenu2))">Control.SetFocus(9000)</ondown>
            <onleft>Control.Move($PARAM[Id],-1)</onleft>
            <onleft>Control.Move(9800,-1)</onleft>
            <onright>Control.Move($PARAM[Id],1)</onright>
            <onright>Control.Move(9800,1)</onright>
            <onclick>???</onclick>
        </control>

List 1 :
Code:
                <control type="wraplist" id="$PARAM[Id]">
                    <top>380</top>
                    <left>200</left>
                    <width>380</width>
                    <height>960</height>
                    <orientation>horizontal</orientation>
                    <onup>SetProperty(SubMenu2,VISIBLE,Home)</onup>
                    <ondown condition="IsEmpty(Window(home).Property(SubMenu2))">ClearProperty(SubMenu,Home)</ondown>
                    <ondown>ClearProperty(SubMenu2,Home)</ondown>
                    <ondown>Control.SetFocus(9000)</ondown>
                    <scrolltime>200</scrolltime>
                    <visible allowhiddenfocus="true">true</visible>

                    <itemlayout width="380" height="960">
                    </itemlayout>

                    <focusedlayout width="380" height="960">
                    </focusedlayout>

                    <content limit="6" sortorder="ascending" sortby="label" target="$PARAM[Target]">$PARAM[Path]</content>

                </control>

List 2 :
Code:
                <control type="wraplist" id="9800">
                    <top>380</top>
                    <left>199</left>
                    <width>1520</width>
                    <height>960</height>
                    <orientation>horizontal</orientation>
                    <onup>SetProperty(SubMenu2,VISIBLE,Home)</onup>
                    <ondown condition="IsEmpty(Window(home).Property(SubMenu2))">ClearProperty(SubMenu,Home)</ondown>
                    <ondown>ClearProperty(SubMenu2,Home)</ondown>
                    <ondown>Control.SetFocus(9000)</ondown>
                    <scrolltime>200</scrolltime>
                    <preloaditems>4</preloaditems>
                    <animation effect="slide" start="0,0" end="0,960" time="400" condition="IsEmpty(Window(home).Property(SubMenu2))">Conditional</animation>

                    <itemlayout width="380" height="960">
                    </itemlayout>

                    <focusedlayout width="380" height="960">
                    </focusedlayout>

                    <content limit="6" sortorder="ascending" sortby="label" target="$PARAM[Target]">$PARAM[Path]</content>

                </control>


Can this be achieved with PlayMedia ?

Tried the following but no luck :

Code:
<onclick>PlayMedia(Container($PARAM[Id]).ListItem.FileNameAndPath)</onclick>

Have to mention I can't throw a SetFocus to Container($PARAM[Id]) because it can break the lists synchro ...

INFO : Content is filled by SkinShortcuts widgetPath

Thanks Smile
[Skin] KOver - V1.1.0 Stable (Repo version)
[WIP] ReKOver - Skinning tool project

If I've been helpful or you like my work, hit "THANK USER" button ;) ...
Reply
#2
really need sendclick() for containers Sad

we do this: <onclick>PlayMedia($ESCINFO[Container(60122).ListItem.FileNameAndPath])</onclick>


Code:
                    <control type="button" id="6012">
                        <visible>Skin.HasSetting(home.easynav)</visible>
                        <top>330</top>
                        <left>SidePad</left>
                        <width>820</width>
                        <height>460</height>
                        <onup>300</onup>
                        <ondown>6013</ondown>
                        <onleft>300</onleft>
                        <onright>6016</onright>
                        <texturefocus>-</texturefocus>
                        <texturenofocus>-</texturenofocus>
                        <onclick>PlayMedia($ESCINFO[Container(60122).ListItem.FileNameAndPath])</onclick>
                    </control>
                    <control type="list" id="60122">
                    ...
                    </control>
Reply
#3
(2016-01-08, 15:27)badaas Wrote: we do this: <onclick>PlayMedia($ESCINFO[Container(60122).ListItem.FileNameAndPath])</onclick>

Thx mate, will test Smile

(2016-01-08, 15:27)badaas Wrote: really need sendclick() for containers Sad

True !
[Skin] KOver - V1.1.0 Stable (Repo version)
[WIP] ReKOver - Skinning tool project

If I've been helpful or you like my work, hit "THANK USER" button ;) ...
Reply

Logout Mark Read Team Forum Stats Members Help
Play a container item from button0