Your comments

Why don't you look at this example and see if it gets you where you need. I think I understand it. 

<wire>
    <main>
       <panel name="main" width="100%" height="100%">
       	<image name="pic" alias="PIC" source="ian1.jpg" onclickup="update" align="center"></image> 
        <panel name="check" width="200" height="100" background="ff0000" align="center" valign="bottom" onclickup="check"></panel>   
       </panel>


    </main>

    <actions>
	<action name="on" oninit="yes">
           <sync> 
            <assign property="var:imgCount" value="1" />
        	<assign property="var:imgSource" value="ian[var:imgCount].jpg" />
           </sync>    
        </action>
        <action name="update">
           <if lhs="[var:imgCount]" operator="lte" rhs="4"> 
            <sync>
               
			<if lhs="[var:imgCount]" operator="e" rhs="4"> 
                <assign property="var:imgCount" value="1" />    
                <else>
                	<assign property="var:imgCount" value="[js:[var:imgCount]+1]" />    
                </else>
            </if>
        	<assign property="var:imgSource" value="ian[var:imgCount].jpg" />
            <assign property="object:PIC.source" value="[var:imgSource]" />
            <assign property="pref:imgSource" value="[var:imgSource]" />
            </sync> 
            <else>
              <assign property="var:imgCount" value="1" />  
              <assign property="var:imgSource" value="ian1.jpg" /> 
              <assign property="object:PIC.source" value="[var:imgSource]" />
              <assign property="pref:imgSource" value="[var:imgSource]" />
           </else>    
           </if>    
           
        </action>
         
        <action name="check">
        	<alert message="VARIABLE:[var:imgSource] PREF:[pref:imgSource] COUNT:[var:imgCount]"/>
        </action>
    </actions>
</wire>
As long as the var you are using exists then either option is possible. So you would need to assign your [var:mark] or path correctly from an object with _mark to ensure that the preference can find that value. 

My advice is in your setmark action to throw an alert tag at the top to make sure that your variable has a value before you assign it to the pref. 

<action name="setMark">
<alert message="VAR - [var:mark] VAR2 - _next"
<assign property="preference:[var:mark]" value="_next">
</action>
yeah I meant write only.

Can you help me understand the workflow? Do you have 800 images in your app that all display oninit?
David,

I did some research and it does appear that this IS a write only object property. I have corrected the documentation. 

I think the rationale here is that you are defining that source upfront or using an assign to determine it, so you should always be in a position to know what it is. If you have it set upfront, you can assign your imgSource var oninit and if it changes at any point during an action you can reassign the var as well. 


What does your image tag look like?
There could be potential for slow down depending on how you build it, but once a preference is set, it will be stored in the app's memory until the app is removed from the device, so unless you are updating that preference in every user session, it should be fine to use those values.
source is an object property for images, so you can read and write. To read this property you will do this by adding an alias to the image:

<image name="picture" alias="PICTURE" source="picture.jpg"></image>

[object:PICTURE.source] = picture.jpg
This also works for urls [object:PICTURE.url]
Oh I am so glad we got on the same page. Congrats.
Try this option.

<wire>
<classes>
	<class name="map">
    	<panel name="map01" alias="MAP01" width="100%" height="1136" lheight="100%" zoomable="yes" draggable="yes" zoommin="1" zoommax="60" alpha="1">
			<image name="map01IMG" alias="MAP01IMG" source="[param:mapsource]" width="100%" ypos="40" lypos="0" lwidth="480"></image>
		</panel> 
    </class>    
</classes>    
<main>


<!-- Background -->


<panel name="bg" width="100%" height="100%" background="#a0c4ee"></panel>
<panel name="map-container" alias="MAPCONTAINER" width="100%" height="1136">


</panel>
<!-- Header -->


<panel name="header" alias="HEADER" width="100%" height="40" background="#1d54e5" ypos="0" lypos="-5000">
<image name="showMap01" alias="SHOWMAP01" source="menu.icon.04.png" valign="top" xpos="0" lxpos="-5000" width="40" height="40" alpha="0" onclick="showMap01"></image>
<image name="showMap02" alias="SHOWMAP02" source="menu.icon.04.png" valign="top" xpos="0" lxpos="-5000" width="40" height="40" alpha="1" onclick="showMap02"></image>
</panel>


</main>


<actions>
<action name="on" oninit="yes">
	<create class="map" mapsource="map01.gif" target="MAPCONTAINER"/>	    
</action>
<action name="showMap01">
<delete target="MAP01"/>
<create class="map" mapsource="map01.gif" target="MAPCONTAINER"/>
<alpha value="0" target="SHOWMAP01" />
<alpha value="1" target="SHOWMAP02" />
</action>

<action name="showMap02">
<delete target="MAP01"/>
<create class="map" mapsource="map02.gif" target="MAPCONTAINER"/>
<alpha value="1" target="SHOWMAP01" />
<alpha value="0" target="SHOWMAP02" />
</action>

</actions>
</wire>