Html wrapper issue
My Flex application is built using ant. The html wrapper task is as follows:
<target name="wrapper">
<html-wrapper 开发者_开发百科
title="{$title}"
file="login.htm"
height="300"
width="400"
application="app"
swf="Main.swf"
version-major="9"
version-minor="0"
version-revision="0"
history="true"
template="express-installation"
output="${APP_ROOT}"/>
</target>
My purpose is to display a message to the user in case their browser has JavaScript disabled. I modified the index.template.html file within the express-installation folder to include the following in the tag:
<noscript><my message here/></noscript>
The message does not get displayed. Is there a way I could find out which index.template.html file is used by ant task or is the file being overridden somehow?
Can anyone resolve this? Any help would be appreciated. :)
It should be coming from the SDK that you are using to build the wrapper. It'll be somewhere like...
${FLEX_HOME}/templates/express-installation/index.template.html
As of Flex SDK 4.5:
The template file used when building your project via html-wrapper ant task unfortunately does NOT come from ${FLEX_SDK_HOME}/templates/swfobject.
The template file used by the ant task is actually baked into the flexTasks.jar file found in ${FLEX_SDK_HOME}/ant/lib. As you know, there is no convenient option you can apply on the task to use a different template.
Because my needed changes were minor (and presumably useful on all of my projects) I simply unzipped flexTasks.jar and re-zipped it with my modified template.
Since you did use the history="true" you need change the template inside
P:\ath\to\sdks\X.Y.Z\templates\express-installation-with-history
as documented here.
精彩评论