In a post last
month,
I briefly mentioned the list of macro substitutions that are available in the
files in the html-template folder. Here, I’ll offer a little more
information on those. I’ll try to make sure this makes it into the next
version of the documentation.
${project}MyProject.${application}MyApp.${version_major}9 for version 9.0 r28. You can change this and the
other ${version_...} macros by going to Project > Properties, then
“Flex Compiler” or “ActionScript Compiler,” and then changing the player
version number in the “HTML wrapper” section.${version_minor}0 for version 9.0 r28.${version_revision}28 for version 9.0 r28.${build_suffix}"-debug" when building the debug version of
the SWF, and "" when building the release version.${swf}.swf extension, e.g.
MyApp or MyApp-debug. This is essentially a
convenience macro which is equivalent to
${application}${build_suffix}.${bgcolor}backgroundColor attribute of the
<mx:Application> tag, or, in the case of ActionScript-only
projects, in the backgroundColor field of the [SWF]
metadata attribute of the main application class, e.g.
[SWF(backgroundColor="#ffffff")] public class MyApp extends Sprite
(see this post
for more information on setting the width, height, and background color of an
ActionScript project). The result is in the form #rrggbb, e.g.
#ffffff. This can actually be a little tricky to use, because by
default, the background of a Flex app is actually a gentle gradient from one
color to another; if you want the HTML background to match the background of
your Flex app, you may need to fiddle with both the
backgroundColor and backgroundGradientColors
attributes of the <mx:Application> tag.${width}width
attribute of the <mx:Application> tag, or, in the case of
ActionScript-only projects, in the width field of the
[SWF] metadata attribute of the main application class, e.g.
[SWF(width="300", height="400")] public class MyApp extends
Sprite.${height}height
attribute of the <mx:Application> tag, or, in the case of
ActionScript-only projects, in the height field of the
[SWF] metadata attribute of the main application class, e.g.
[SWF(width="300", height="400")] public class MyApp extends
Sprite.${title}pageTitle
attribute of the <mx:Application> tag, or, in the case of
ActionScript-only projects, in the pageTitle field of the
[SWF] metadata attribute of the main application class, e.g.
[SWF(pageTitle="flex r00lz")] public class MyApp extends
Sprite.