[osflash] Build number with Ant

Jim Kremens kremens at gmail.com
Thu Oct 27 07:58:28 PDT 2005


Hi,
 Putting <buildnumber/> and <tstamp/> into an Ant build file makes them
accessible to other tasks:
  <buildnumber />
<tstamp><format property="timestamp" pattern="MM/dd/yyyy hh:mm:ss"
/></tstamp>
 You could then, for example, write the build number and timestamp into an
html file:
  <concat destfile="buildinfo.html">
<![CDATA[<b>Title Text<br> DATE: ${timestamp} <br>BUILD: ${build.number}
<br>AUTHOR: <a href="mailto:yourName at gmail.com">Your
Name<yourName at gmail.com">Your Name>
</a></b>]]>
</concat>
 Which Flash could read. A simple text file would be simpler, but I had this
example handy...
 You could even use Ant to write a FlashVar with the build number into the
html page that contains your swf... Then your swf would have direct access
to it. For that I'd look into the Ant replaceregexp task. Something like:
  <replaceregexp file="myHtmlpage.html" match="FlashVars="
replace="FlashVars='buildNumber=${build.number}'"/>
 Jim Kremens

 On 10/27/05, erixtekila <erixtekila at gmail.com> wrote:
>
> Thanks Ralf,
> > Hamtasc does it via rb_param.
> > Other than that, you could do simple String replacement inside of an as
> > class file. Take a look at the ant replace task
> >
> Very neat solution.
> I'll give it a try.
> Thanks to point it to me.
>
> Respect ;)
>
> -----------
> erixtekila
> http://blog.v-i-a.net/
>
>
> _______________________________________________
> osflash mailing list
> osflash at osflash.org
> http://osflash.org/mailman/listinfo/osflash_osflash.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://osflash.org/pipermail/osflash_osflash.org/attachments/20051027/90db5ada/attachment.htm


More information about the osflash mailing list