13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Scripting the AIR HTML Container<br />

If you set the alpha property of the HTMLLoader object to a value other than 1.0.<br />

If you rotate the HTMLLoader cont<strong>en</strong>t.<br />

The cont<strong>en</strong>t reappears if you remove the off<strong>en</strong>ding property setting and remove the active filters.<br />

In addition, the runtime cannot display PDF cont<strong>en</strong>t in transpar<strong>en</strong>t windows. The runtime only displays SWF cont<strong>en</strong>t<br />

embedded in an HTML page wh<strong>en</strong> the wmode parameter of the object or embed tag is set to opaque or transpar<strong>en</strong>t.<br />

Since the default value of wmode is window, SWF cont<strong>en</strong>t is not displayed in transpar<strong>en</strong>t windows unless you explicitly<br />

set the wmode parameter.<br />

Note: Prior to AIR 1.5.2, SWF embedded in HTML could not be displayed no matter which wmode value was used.<br />

For more information on loading these types of media in an HTMLLoader, see “Embedding SWF cont<strong>en</strong>t in HTML”<br />

on page 989and “Adding PDF cont<strong>en</strong>t in AIR” on page 550.<br />

Advanced display properties<br />

Adobe AIR 1.0 and later<br />

The HTMLLoader class inherits several methods that can be used for special effects. In g<strong>en</strong>eral, these effects have<br />

limitations wh<strong>en</strong> used with the HTMLLoader display, but they can be useful for transitions or other temporary effects.<br />

For example, if you display a dialog window to gather user input, you could blur the display of the main window until<br />

the user closes the dialog. Likewise, you could fade the display out wh<strong>en</strong> closing a window.<br />

The advanced display properties include:<br />

Property Limitations<br />

alpha Can reduce the legibility of HTML cont<strong>en</strong>t<br />

filters In an HTML Window, exterior effects are clipped by the window edge<br />

graphics Shapes drawn with graphics commands appear below HTML cont<strong>en</strong>t,<br />

including the default background. The paintsDefaultBackground property<br />

must be false for the drawn shapes to be visible.<br />

opaqueBackground Does not change the color of the default background. The<br />

paintsDefaultBackground property must be false for this color layer to be<br />

visible.<br />

rotation The corners of the rectangular HTMLLoader area can be clipped by the<br />

window edge. SWF and PDF cont<strong>en</strong>t loaded in the HTML cont<strong>en</strong>t is not<br />

displayed.<br />

scaleX, scaleY The r<strong>en</strong>dered display can appear pixelated at scale factors greater than 1. SWF<br />

and PDF cont<strong>en</strong>t loaded in the HTML cont<strong>en</strong>t is not displayed.<br />

transform Can reduce legibility of HTML cont<strong>en</strong>t. The HTML display can be clipped by the<br />

window edge. SWF and PDF cont<strong>en</strong>t loaded in the HTML cont<strong>en</strong>t is not<br />

displayed if the transform involves rotation, scaling, or skewing.<br />

The following example illustrates how to set the filters array to blur the <strong>en</strong>tire HTML display:<br />

Last updated 6/6/2012<br />

1002

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!