Your comments

Update!  Using the eval feature works.  In the code below, I start by setting the counter t 1, then cycle through all 173 preference by loading them into variables and then using them to assign an image source.


<assign property="var:markCount" value="1"/>
<loop lhs="[var:markCount]" operator="lte" rhs="173"> <assign property="[eval:'var:'+'MARK[var:markCount]']" value="[pref:MARK[var:markCount]]" /> <assign property="[eval:'object:MARK[var:markCount]'+'.source']" value="[eval:'like.'+'[var:MARK[var:markCount]]'+'.png']" /> <assign property="var:markCount" value="[eval: [var:markCount] + 1]"/> </loop>
Thank you so much Ian for showing me this use of If statements.  It has allowed me to reduce the size of my wire file by at least 100 lines.
I have an alert tag showing me the variable is holding the right value but I've been unable to get a preference to update using either of these two methods.

<assign property="preferences:[var:mark]" value="next">

<assign property="preferences:_mark" value="next">

The only way I've been able to write to a preference is to name it explicitly like this:

<assign property="preferences:MARK001" value="_next">
Oh, for sure. My idea is to have a little 40 x 40 image next to each route listing in my app.  When a user touches the image it will change to the next image in a five image series to give them five different ways to mark the route.  The way I currently have this set up is to have all five images displayed in the same place with the first set to alpha="1" and the rest to alpha="0".  Each image tag has a variable with its name, a variable with the name of the next image in the series, and a variable with the name of the preference being set.  When clicked, the action uses an if statement to determine which preference is being set, then turns the current image to alpha="0" and turns the next image to alpha="1" and assigns the preference.  On start up each preference is read and the corresponding image is set to alpha="1".

Is there a way for me to paste the code here?
Do you mean write only?  You can write to an image's source using <assign property="object:PICTURE.source" value="newpicture.jpg">.

If there were a way to read an image's source I could include just 200 image tags and swap between five different images for each depending on what the current one is.  Else, I'll have to include 1,000 separate image tags for my 200 preferences with five options each. :/
<image name="blue01" alias="PICTURE" source="01.blue.png" style="img2" ></image>
I've also tried these:

"preference:[var:mark]"

"preference:_mark"
Could you give an example of an action that reads a picture's source and loads it into a variable?  I've been having trouble with this.  The code below results in an alert that says, "Image Source: nil".

<assign property="var:imgSource" value="[object:PICTURE.source]" />
<alert message="Image Source: [var:imgSource]"/>

This is working!  Thank you so much Ian.  I really appreciate all your efforts to help me.