Ваши комментарии

I do not understand. Looking at the code you pasted here, I do not see an object living as a child of another object.
Please use a code block to display < code > < /code >
Okay, sound can be pretty tricky, so we have a best practice to use a play tag to drive the contents of the sound attributes. Check out the example below that works.

I am using a play tag with some object variables to pass data to the sound tags. This is also referenced in this topic here: https://getsatisfaction.com/rarewire/...


<wire>
<main>
<panel name="background" alias="BACKGROUND" height="100%" width="100%">
<pdf name="pdf" alias="PDF" source="constitution.pdf" height="100%" width="100%" spreads="yes" covertile="no" tile="yes" orientation="horizontal" onscrollto="page1">
<panel name="panel1_2" width="50" height="50" xpos="53" ypos="672" onpage="2" background="ff0000" onclickup="soundstop" onscrollto="page1"></panel>
<panel name="panel1_3" width="50" height="50" xpos="36" ypos="90" onpage="3" background="ffee00" onscrollto="page1" ></panel>
<panel name="panel1_4" width="50" height="50" xpos="36" ypos="90" onpage="4" onscrollto="page1"></panel>
<panel name="panel1_5" width="50" height="50" xpos="36" ypos="90" onpage="5" onscrollto="page1"></panel>
<panel name="panel1_6" width="50" height="50" xpos="940" ypos="90" onpage="6" onscrollto="page1"></panel>
</pdf>
</panel>
</main>

<actions>
<action name="start" oninit="yes">
<assign property="var:page1" value="1"/>
<play action="clip" _action="play" _source="references" _type="mp3" />
</action>

<action name="page1">
<if lhs="[var:page1]" operator="e" rhs="1">
<sync>
<play action="clip" _action="stop" _source="references" _type="mp3" />
<assign property="var:page1" value="0"/>
<alert message="STOP"/>
</sync>
</if>
</action>
<action name="clip">
<sound action="_action" source="_source" type="_type"/>
</action>
</actions>
</wire>
I am sorry if I wasn't more clear.

In your situation you do not need the _alert, you can ignore that.

You need to focus on the onscrollto action. Place an onscrollto action on any page that isn't page 1, so if a user scrolls to any page that isn't page 1 the first time it is effectively "scrolling away" from page 1. If you onscrollto any page that is not page 1 (marked by setting a variable oninit) then you should trigger your page1 action. This way your sound will only stop one time after you scroll away from page one initially. Changing the variable to zero within the if statement ensures that the action is not fired again.

I will see about getting this bug escalated so you can run the onscrollaway normally. Sorry about the inconvenience.
This is a known bug for page one of a pager or pdf and onscrollaway actions. As a work around you can assign a variable to help with your action:

<wire>
<main>
<panel name="main" width="100%" height="100%">
<!--This would be a pdf in your case. The onscrollto needs to be put on several pages to account for "speed scrolling". you can put a 1px transparent panel in the corner that can take the onscrollto-->
<pager name="pager" width="100%" height="200" orientation="horizontal" paginate="yes">
<panel name="1" width="25%" height="100%" background="ff0000" onscrollto="page1" onscrollaway="alert" _alert="1"></panel>
<panel name="2" width="25%" height="100%" background="ffff00" onscrollto="page1" onscrollaway="alert" _alert="2"></panel>
<panel name="3" width="25%" height="100%" background="ffffff" onscrollto="page1" onscrollaway="alert" _alert="3"></panel>
<panel name="4" width="25%" height="100%" background="00ffff" onscrollto="page1" onscrollaway="alert" _alert="4"></panel>
<panel name="5" width="25%" height="100%" background="0000ff" onscrollto="page1" onscrollaway="alert" _alert="5"></panel>
<panel name="6" width="25%" height="100%" background="ff0000" onscrollto="page1" onscrollaway="alert" _alert="6"></panel>
<panel name="7" width="25%" height="100%" background="ffff00" onscrollto="page1" onscrollaway="alert" _alert="7"></panel>
<panel name="8" width="25%" height="100%" background="ff00ff" onscrollto="page1" onscrollaway="alert" _alert="8"></panel>
</pager>
</panel>
</main>
<actions>
<action name="oninit" oninit="yes">
<assign property="var:page1" value="1"/>
</action>
<action name="page1">
<if lhs="[var:page1]" operator="e" rhs="1">
<alert message="1"/> THIS IS WHERE YOUR STOP SOUND ACTION GOES
<assign property="var:page1" value="0"/>
</if>
</action>
</actions>
</wire>

Jessie,

Taking a deeper dive into the code and reviewing your requests I have made the following determinations.

First of all, my apologies. It escaped me that you were trying to use a tableview horizontally. This is not allowed. Only a pager and a list can function both vertically and horizontally. A tableview is limited to vertical only. This is a limitation by Apple.

This leaves you with the option of using a list view or going back to using a PDF. If you use a list, then you will have to reduce the size of your images to something more manageable to load all at once.

It looks like you are using images that are already stored in your app. Is this by design? If so you could also consider using a create and delete to call images open as you use them. Here is an example of that.


<pager name="mag" alias="MAG" width="100%" height="100%" orientation="horizontal" paginate="yes">
<image width="100%" name="page1" source="pageimages/page-1.jpeg"></image>
<image width="100%" name="page2" alias="2" _alias="2" source="pageimages/page-1.jpeg" suppress="yes" onscrollto="load" onscrollaway="unload"></image>
<image width="100%" name="page3" alias="3" _alias="3" source="pageimages/page-1.jpeg" suppress="yes" onscrollto="load" onscrollaway="unload"></image>
<image width="100%" name="page4" alias="4" _alias="4" source="pageimages/page-4.jpeg" suppress="yes" onscrollto="load" onscrollaway="unload"></image>
<image width="100%" name="page5" alias="5" _alias="5" source="pageimages/page-5.jpeg" suppress="yes" onscrollto="load" onscrollaway="unload">
</pager>

<action name="load">
<load target="_alias"/>
</action>
<action name="unload">
<unload target="_alias"/>
</action>
bounces="yes" can be added to a pager tag, a list tag or a tableview tag.
Still looking into this, I am seeing the same as you. I will follow up with you soon with an answer.
Jessie,

Is this a project that I am a collaborator on? With all the images in the wire, it is hard to test.

Is your datasource appearing initially prior to rotating the device? I can see that the actions are firing on rotate, but I am not seeing a datasource at all, so it is hard to tell if the data is missing or just not getting pulled from your sources.

If you can share the project with me that might help.

Сервис поддержки клиентов работает на платформе UserEcho