+1
Answered

flip 3D object flips wire not panel

brandon.sloan 8 years ago updated by icahill (Administrator) 8 years ago 14
hello...
I'm having an issue with - replace type="flipleft". It seems to flip the whole wire and not the panel. Is there something Im missing in the code?
The replace action will trigger on whatever you are targeting, so if you have a specific panel you want to flip, then you need to add target="" and use either the path to the panel in question or the alias of the panel if you have given it one.
Also if you don't define a replacement it will simply flip your panel and display nothing, which might be what you are seeing.


<replace type="flip" target="PANELALIAS" replacement="NAMEOFREPLACEPANEL" />
Also all children will be taken in the flip as well.
Thanks for the response....I still get the entire wire flipping. Here is the example that I'm working with

Any help is greatly appreciated
In order for me to see your code, you have to wrap it in < code > block. If I can see it I can help troubleshoot it :)
Sorry about that...I'm new.



>


<wire>

<datasources></datasources>

<styles></styles>

<classes></classes>

<main>
<panel name="container" width="100%" height="100%">

<web name="bg" alias="BG" width="100%" height="100%" file="m1-dis-06.html" valign="top" />

<panel name="womanscenario" width="100%" height="100%">
<panel name="hotspot1" alias="HOTSPOT1" width="100" height="200" xpos="870" ypos="50" onclick="showPanel" clicktarget="TEXTBALLON1" />
<panel name="textballon1" alias="TEXTBALLON1" width="100%" height="100%" onclick="closePanel" clicktarget="TEXTBALLON1" alpha="0">
<image name="womanquote" alias="WOMANQUOTE" source="images/1_6-womanQuote.png" xpos="415" ypos="55" ></image>
</panel>
</panel>

<panel name="manscenario" width="100%" height="100%">
<panel name="hotspot2" alias="HOTSPOT2" width="100" height="200" xpos="870" ypos="50" onclick="showPanel" clicktarget="TEXTBALLON2" />
<panel name="textballon2" alias="TEXTBALLON2" width="100%" height="100%" onclick="closePanel" clicktarget="TEXTBALLON2" alpha="0">
<image name="manquote" alias="MANQUOTE" source="images/1_6-manQuote.png" xpos="440" ypos="105" ></image>
</panel>
</panel>

<panel name="msltpie-hotspot2" alias="MSLTPIE-HOTSPOT2" width="269" height="40" xpos="307" ypos="20" onclick="showTab2Flip" clicktarget="TABPANEL1" background="#339933" alpha=".3"></panel>

<panel name="flippanel1" alias="FLIPPANEL1" width="650" height="400" xpos="200" ypos="215" background="#ffffff" alpha="0">
<web name="msltinfo" alias="MSLTINFO" file="m1-dis-06-03.html" width="643" height="400" valign="top" />

</panel>
<panel name="tabpanel1" alias="TABPANEL1" width="650" height="400" xpos="200" ypos="215" background="#ffffff" draggable="no">
<web name="msltpie" alias="MSLTPIE" file="m1-dis-06-01.html" width="643" height="400" valign="top" />
<panel name="msltpie-hotspot" width="269" height="40" xpos="307" ypos="20" onclick="showTab2" clicktarget="TABPANEL2"></panel>
<panel name="msltflip-hotspot" width="44" height="44" xpos="50" ypos="100" onclick="flipleft" clicktarget="TABPANEL1" background="#339933" alpha=".3"></panel>
</panel>

<panel name="tabpanel2" alias="TABPANEL2" style="tabpannel" width="650" height="400" xpos="200" ypos="215" background="#ffffff" draggable="no" alpha="0">
<web name="esspie" alias="ESSPIE" file="m1-dis-06-02.html" width="643" height="400" valign="top" transparent="yes" />
<panel name="esspie-hotspot" width="277" height="40" xpos="45" ypos="20" onclick="showTab1" clicktarget="TABPANEL1"></panel>
</panel>

</panel>
</main>

<actions>
<action name="showPanel">
<alpha value="1" time=".25" />
</action>
<action name="closePanel">
<alpha value="0" time=".25" />
</action>
<action name="showTab2">
<alpha value="0" time=".25" target="TABPANEL1" />
<alpha value="1" time=".25" target="TABPANEL2" />
</action>
<action name="showTab1">
<alpha value="0" time=".25" target="TABPANEL2" />
<alpha value="1" time=".25" target="TABPANEL1" />
</action>
<action name="flipleft">
<alpha value="1" target="FLIPPANEL1" />
<replace type="flipleft" replacement="MSLTINFO" target="FLIPPANEL1"/>
<set onclickup="flipleft" />
</action>
<action name="showTab2Flip">
<replace type="flipleft" replacement="TABPANEL1" />
<alpha value="0" time=".25" target="TABPANEL1" />
<alpha value="1" time=".25" target="TABPANEL2" />
</action>
</actions>

</wire>
It looks like you are trying to replace the panel with one of its children. This is probably what is causing the problem. Once FLIPPANEL1 replaces, it can't find the child because it got replaced too. I would pull out your MSLTINFO web panel and make it a sibling to FLIPPANEL1. This should fix the issue.
Thanks for the help!
Thanks for the help...I got it to work. One question...is there anyway to go from parent to child back to parent from child using the flips? I'm trying to do a flipleft to one and flipright back to the same page.
You should be able to perform a reverse of the replace simply by swapping the target and replacement values and using the second object to trigger a second action. Basically recreate the action in opposite.

At this time I don't think you will ever be able to use a child within a replace for the reasons I listed above.