<doc>
  <legacy_id>2441</legacy_id>
  <name>imageSource</name>
  <type>property</type>
  <syntax>
    <example>set the imageSource of <i>character</i> to {<i>imageID</i> |<i>imageName</i> |<i>imageURL</i> |empty}</example>
  </syntax>
  <library></library>
  <objects>
    <field/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Images &amp; Multimedia</category>
  </classification>
  <references>
    <keyword tag="character">character Keyword</keyword>
    <command tag="hide">hide Command</command>
    <command tag="show">show Command</command>
  </references>
  <history>
    <introduced version="1.1">Added.</introduced>
    <changed version="3.5"></changed>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary>Specifies an <keyword tag="image">image</keyword> to be displayed in place of the specified <keyword tag="character">character</keyword> in a <keyword tag="field">field</keyword>.</summary>
  <examples>
    <example>set the imageSource of char 1 of line 2 of field "This" to 2533</example>
    <example>set the imageSource of char thisChar of field 1 to "Arrow"</example>
    <example>set the imageSource of last char of me to "binfile:My Image"</example>
  </examples>
  <description>
    <p>Use the <b>imageSource</b> <glossary tag="property">property</glossary> to display a picture or <property tag="icon">icon</property> inside a text <keyword tag="field">field</keyword>.</p><p/><p><b>Value:</b></p><p>The <b>imageSource</b> of a <keyword tag="character">character</keyword> is either empty or an image specifier.</p><p/><p>An <i>imageID</i> is the ID of an <keyword tag="image">image</keyword> to display instead of the <i>character</i>. LiveCode looks for the specified <keyword tag="image">image</keyword> first in the <glossary tag="current stack">current stack</glossary>, then in other open <function tag="stacks">stacks</function>.</p><p/><p>An <i>imageName</i> is the short <property tag="name">name</property> of an <keyword tag="image">image</keyword> to display instead of the <i>character</i>. </p><p/><p>LiveCode looks for the specified image (if an ID or name is given) in the following order:</p><p/><p>1) The stack of the object's <property tag="behavior">behavior</property> (if applicable)</p><p>2) The stack of the owner of the object's <property tag="behavior">behavior</property> (if applicable)</p><p> ...</p><p>n) The stack of the object's stack's <property tag="behavior">behavior</property> (if applicable)</p><p>A) The object's stack</p><p>B) The object's stack's mainstack (if a substack)</p><p>C) The object's stack's mainstacks substacks</p><p>D) The list of open stacks, in order they were loaded</p><p/><p>An <i>imageURL</i> is any valid <keyword tag="URL">URL</keyword> that specifies an <keyword tag="image">image</keyword> in a <function tag="format">format</function> LiveCode can display.</p><p/><p>By default, the <b>imageSource</b> for all <keyword tag="characters">characters</keyword> is empty.</p><p/><p><b>Comments:</b></p><p>Setting the <b>imageSource</b> of a <i>character</i> hides the <keyword tag="character">character</keyword>.</p><p/><p>Setting the <b>imageSource</b> of a <keyword tag="character">character</keyword> to empty removes the <keyword tag="image">image</keyword> and allows the <keyword tag="character">character</keyword> to appear instead.</p><p/><p>If the image is noticeably taller than the text in the field, it may appear cut off if the field's <b>fixedLineHeight</b> <glossary tag="property">property</glossary> is set to true. To correct this problem, set the <glossary tag="field">field's</glossary> <property tag="fixedLineHeight">fixedLineHeight</property> to false.</p><p/><p><img src="202653"/> <b>Important!</b> Do not use the <keyword tag="URL">URL</keyword> <glossary tag="keyword">keyword</glossary> when specifying an <i>imageURL</i>. The <b>imageSource</b> of a <keyword tag="character">character</keyword> is a file location (or image ID or name), not the image data itself.  If you use the URL <glossary tag="keyword">keyword</glossary>, the <b>imageSource</b> <glossary tag="property">property</glossary> is set to the contents of the <keyword tag="URL">URL</keyword>, not the <keyword tag="URL">URL</keyword> itself, and this is usually not what's wanted.</p><p/><p><b>Changes:</b></p><p>The order in which LiveCode searches for imageSource IDs was changed in version 3.5. Previously, the current stack was searched first, followed by the list of open stacks.</p>
  </description>
</doc>