April 27, 2007
April 21, 2007
Cross-domain policy
Issue:
- Unable to load variables or XML data into a Flash movie from another domain/subdomain.
- Unable to load swf or flv into Flash movie from another domain/subdomain.
Reason:
For security reasons, data loading operations (load, loadMovie, loadVariables, & etc.) from a different domain is not permitted.
Solution:
Create a cross-domain policy file (crossdomain.xml) and place on the site root of the server you wish to access with the movie.
Cross-domain policy files is a simple XML file that gives the Flash Player permission to access data from a given domain without displaying a security dialog, the file can be created in a simple text editor such as Notepad or SimpleText.
- Sample Cross-domain policy file allow access from any domain
<?xml version="1.0"?> <cross-domain-policy> <allow-access-from domain="*" /> </cross-domain-policy>
- Sample Cross-domain policy file allow access from any subdomains & local server, & secure server
<?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <allow-access-from domain="www.ggshow.com" /> <allow-access-from domain="ggshow.com" /> <allow-access-from domain="*.ggshow.com" /> <allow-access-from domain="blog.ggshow.com" /> <allow-access-from domain="search.ggshow.com" /> <allow-access-from domain="blog" /> <allow-access-from domain="search" /> <allow-access-from domain="www.ggshow.com" secure="false" /> </cross-domain-policy>
- Sample Cross-domain policy file on other websites
- http://www.google.com/crossdomain.xml
- http://www.yahoo.com/crossdomain.xml
- http://www.bing.com/crossdomain.xml
- http://www.youtube.com/crossdomain.xml
- http://www.facebook.com/crossdomain.xml
- http://www.amazon.com/crossdomain.xml
- http://www.flickr.com/crossdomain.xml
- http://www.twitter.com/crossdomain.xml
Additional Information:
crossdomainxml.org
LiveDocs:
Using policy files
TechNote:
External data not accessible outside a Macromedia Flash movie’s domain
Loading data across domains
Macromedia Flash movie fails to load data in Flash Player 7
April 19, 2007
How to use subscript & superscript in dynamic and input text field
Issue:
- Unable to use subscript or superscript in dynamic and input text field.
- Unable to display subscript or superscript for external loaded text.
- Unable to use <sub> & <sup> tags in dynamic or input text field.
- To create subscript or superscript text without Text Layout Framework (TLF).
Reason:
<sub> & <sup> tags are not supported by Flash.
TechNote: Subscript and superscript fail in dynamic and input text fields
LiveDocs: Supported HTML tags
Solution:
- Download & install GG Subscript & GG Superscript TrueType fonts. You will need to restart Flash software after installed fonts.
- Create a dynamic text field with Arial font embeded. Set the HTML property to true.
- Create a dynamic text field with GG Subscript font embeded.
- Create a dynamic text field with GG Superscript font embeded.
- Use HTML tag to set text to subscript or superscript like below:
Adobe<font face="GG Superscript">TM</font>
If you are using ActionScript to test the htmlText, use script like below:
my_txt.text = "Adobe<font face="GG Superscript">TM</font>";
Demo:
Download:
superscript.fla
superscript.swf
Updated: (2008-09-21)
A new set of superscript & subscript fonts includes both sans & serif type, with more complete & improved glyphs, standard scale & shift, is now available to be downloaded (free) from here.
Updated: (2010-10-23)
Another set of fonts for displaying square root (SQRT), cube root, nth root, and other roots formula in dynamic and input text field is now available here.
Related:
For creating subscript & superscript text with Text Layout Framework in AS3 or Flex project, refer to here
April 16, 2007
Download GG’s Flash Extensions
GG Components, GG Tools, GG Commands, GG FLV Player Panel, & GG Book pf2 are available at Adobe Exchange. An Adobe ID is required to login and download components from Adobe Exchange. Registration is free.
Requirements:
Macromedia Flash MX2004 / Flash 8 [Download a 30-day free trial]
Macromedia Extension Manager [Download free]
Installation:
Installer is distributed as a Macromedia Extension Package (MXP).
To install flash extension, start Macromedia Extension Manager,
Start > All Programs > Macromedia > Macromedia Extension Manager,
File > Install Extension, Browse for the MXP file, select the file, and click Install.
April 2, 2007
GG Key Info Panel v1.0.0
GG Key Info Panel is a free Flash panel for key reference. This panel shows key details includes character, constant, keycode, ascii, hex, and URL encoding for pressed key.
You can access GG Key Info Panel from Window > Other Panels > Key.
GG FLV Player Panel v1.1.0
GG FLV Player Panel is a free FLV player run as a panel in Flash. You can preview your flv files directly in Macromedia Flash software without import the flv file. It can load and play any flv located on your local machine or on a web server.
You can access GG FLV Player Panel from Window > Other Panels > FLVpp.
GG Commands v1.2.0
GG Commands is a free JSFL commands extension package, it makes jobs easier in Flash. After you download and install the GG Commands v1, you can access it from Commands menu.
The current version includes 5 useful commands below:
– Distribute to Keyframes
– Insert Multiple
– Resize Text
– Scale To Stage
– Slice Bitmap Instance
After you download and install the GG Commands v1, you can access it from Commands menu.
Distribute to Keyframes
– Distributes selected text fields and symbol instances to keyframes.
Insert Multiple
– Insert multiple frames, keyframes, blank keyframes, or layers.
Resize Text
– Resize selected text field to user defined width and height.
Scale To Stage
– Scale selected shape/instance to the stage size, or with margin.
Slice Bitmap Instance
– Slice selected bitmap instance to rows and columns.
NEW! (2009-05-22)
There is a newer version of GG Commands available. Click here for more detail.
GG Book pf2 v2.0.0
GG Book pf2 is a free Flash flipping book component developed based on Macc/iparigrafika’s PageFlip v2. Support hard cover, pages flipping, tearing, transarency, sounds, button navigation, & more.
Examples:
Download:
GG Tools v1.0.0
GG Tools is a free Flash drawing tools extension package. It adds 4 drawing tools to Flash tools panel, highly extend the power of line (stroke) in Macromedia Flash. The current version of GG Tools available only for Flash MX2004 and Flash 8 under Windows platform.
The current version of GG Tools includes 4 drawing tools below:
– ggAsterisk
– ggSpring
– ggWave
– ggZigZag
After download and install the GG Tools v1, you can access it from the Tools Panel (screenshoot). All the GG tools will be displayed under Line Tool in Flash 8, or under Pen Tool in Flash MX2004. Just press one the Line Tool and hold your mouse button, you will be able to see the tools like in the picture at the left.
Select the tool you want to use, and try to draw on your stage.
* The sequence of tools in Tools Panel can be modified from
Edit – Customize Tool Panel.
ggAsterisk
Click and drag to draw asterisk, press SHIFT key for random line length, change the number of lines through OPTION at property inspector.
ggSpring
Click and drag to draw a spring line, dragging up or down for amplitude, left or right for width, change the frequency through OPTION at property inspector.
ggWave
Click and drag to draw a wave line, draging up or down for amplitude, left or right for width, change the frequency through OPTION at property inspector.
ggZigZag
Click and drag to draw a zigzag line, dragging up or down for amplitude, left or right for width, change the frequency through OPTION at property inspector.
Examples:
GG Components v2.1.0
GG components is a free flash components extension package. You can use it for any purpose at no charge. By using the GG components, you can create many different animation effect or intractive application without using any script.
GG components v2 includes 12 components below:
– GG box v2
– GG clock v2
– GG contextlinks v2
– GG earth v2
– GG magnifier v2
– GG marker v2
– GG pickRGB v2
– GG pointer v2
– GG preloader v2
– GG strew v2
– GG tooltips v2
– GG visualizer v2
You can access the GG Components from Components Panel in Macromedia Flash, menu Windows > Components, or shortcut key Ctrl+F7.
GG box v2
An interactive 3 dimensional cube component, creates boxes using 6 movieclip symbols. User can click and drag to rotate it.
Editable Parameters:
idName | The identifier of 6 exported movieclip symbols for 6 faces of box instance. |
dragable | Define if user can drag the box to rotate it. |
smoothness | Define the smoothness of movement [0,100]. |
Examples:
GG clock v2
An analog clock component. User can create many different style of client-side real time analog clock without any script.
Editable Parameters:
shading | Specifies if the shading is applied. |
backgroundStyle | The style of background [color, image, transparent]. |
backgroundColor | Specify the color of clock background. |
backgroundImage | The identifier of an exported movieclip symbol. |
innerBorderStyle | The style of inner border. |
innerBorderColor | The color of inner border. |
outerBorderStyle | The style of outer border. |
outerBorderColor | The color of outer border. |
numberStyle | The style of clock numbers. |
numberColor | The color of clock numbers. |
handStyle | The style of clock hands. |
handColorHour | The color of clock hour hand. |
handColorMinute | The color of clock minute hand. |
handColorSecond | The color of clock second hand. |
Examples:
GG contextlinks v2
An actionscipt component, customize context menu for flash movie, creates menu items link to any URL.
Editable Parameters:
hideBuildInItems | Specifies if build in items for context menu is hidden. |
costomItems | An array of costom item. |
getURL | URL to open when the context menu is selected. |
target | target window to open URL. |
Examples:
GG earth v2
A spinning earth, with costomizable color, shading, and optional mouse drag control.
Editable Parameters:
land | The color of the land area. |
ocean | The color of the ocean area. |
shading | Show/Hide shading. |
control | Define the earth spinning style. |
Examples:
GG magnifier v2
An interactive magnifying glass component, enlarge the view of a movieclip instance.
Editable Parameters
targetMC | The instance name of a movieclip instance on your stage. |
scale | The scale percentage from original movieclip size to the large view. |
x | x coordinate for the glass. |
y | y coordinate for the glass. |
glass behavior | Define how the magnifying glass move. |
glass size | The size of magnifying glass. |
glass shading | Specifies if the shading effect applied. |
Examples:
GG marker v2
An interactive magnifying glass component, enlarge the view of a movieclip instance.
Editable Parameters:
targetMC | The instance name of a movieclip instance on your stage. |
scale | The scale percentage from original movieclip size to the large view. |
x | x coordinate for the glass. |
y | y coordinate for the glass. |
glass behavior | Define how the magnifying glass move. |
glass size | The size of magnifying glass. |
glass shading | Specifies if the shading effect applied. |
Examples:
GG pickRGB v2
A simple color picker component. Users can pick a color and apply to any movie clip instance. Users can pick a color from the provided swatches, or mix color using the RGB sliders. No any actionscript required.
Editable Parameters:
defaultColor | The default color of the movie clip instance. |
targetMC | Specifies the target movie clip instance to apply color. |
dragable | Specifies if the panel is dragable. |
style | Specifies the positioning style of the color swatches. |
style | Specifies the positioning style of the color swatches. |
x | Specifies the X position of the color swatches. |
y | Specifies the Y position of the color swatches. |
Examples:
GG pointer v2
An actionscript component to create customized mouse cursor, crosshair, pointer trails, object trails and text trails. No any scripting required.
Editable Parameters:
originalCursor | Specifies if the system mouse cursor is visible. |
crosshair | Specifies if the crosshair is visible. |
crosshairColor | The color of crosshair. |
crosshairThickness | The thickness of crosshair. |
crosshairAlpha | The alpha transparency value of crosshair [0,100]. |
pointer | The identifier of the exported movie clip for pointer. |
pointerTrails | Specifies if the pointer trails is visible. |
pointerTrailsScale | Scale pointer trails. |
objectTrails | The content for object trails. |
objectTrailsType | Specifies the object type: none, movie clip, or text. |
objectTrailsQuantity | The quantity of instance for object trails. |
textColor | The text color for text trails. |
textSize | The text size for text trails. |
textFont | The font type for text trails. |
textBorder | Specifies if the border is visible for text trails. |
textBorderColor | The border color for text trails. |
textBackground | Specifies if the background is visible for text trails. |
textBackgroundColor | The background color for text trails. |
xPos | The x distance from mouse pointer to first trails object. |
yPos | The y distance from mouse pointer to first trails object. |
distance | The distance between trails objects. |
Examples:
GG preloader v2
A preloader component, shows loading progress in percent loaded or byte loaded. Can link to a movie clip instance, scales the movieclip instance or makes its’ playback based on the loaded percentage. Just place an instance of the component in first frame of your movie root, no any script required.
Editable Parameters:
progressMC | Define the target movie clip instance to be linked to progress. |
progressMC_control | Define the way to control progress movieclip. |
showDetail | Define the type of loading detail, either percent, byte, or none. |
percentStart | Allow the movie to start playing after how many percent loaded. |
useWaitCursor | Specifies if the wait cursor is visible. |
fontFamily | The font family of detail text. |
fontSize | The font size of detail text. |
fontColor | The font color of detail text. |
fontBold | Specifies if the detail text is bold. |
fontItalic | Specifies if the detail text is italic. |
Examples:
GG strew v2
A strew effects actionscript component, duplicate a quantity of movieclip instance to be located at any location on stage, or attached to any movieclip instance on stage, or attached to the mouse pointer. Strew objects can move across the stage, with blinking or fading effects, This component can be used to create screen effects or mouse effect, like raining, snowing, firework, starry sky, etc.
Editable Parameters:
idName | The identifier of an movie clip linkage. |
strewFrom | The location to place new duplicated movieclip instances. |
pointTarget | Movieclip instance to attach strew objects. |
pointX | y distance relatively from pointTarget. |
pointY | y distance relatively from pointTarget. |
quantity | The number of instances to be created. per 1 click. 0 for unlimited. |
velocity | The moving speed for new duplicated instances. |
gravity | The heaviness of the instances. |
randomSize | Different size of new duplicated instances. |
randomAlpha | Different transparency of new duplicated instances. |
scaleOut | The scale out value. 0 for no scaling. |
fadeOut | The fade out value. 0 for no fading. |
rotateOut | The rotate out value. 0 for no rotating. |
Examples:
GG tooltips v2
An actionscript component, generate tooltips for any movie clip instance on your stage. Tooltips can be costomized text or movieclip. One component instance can generate tooltips for multiple movie clip instances.
Editable Parameters:
type | Specifies the tooltips type, text (text tooltips) or movieclip (image tooltips). |
background | Specifies if the text field has a background fill. |
backgroundColor | The color of the text field background. |
border | Specifies if the text field has a border. |
borderColor | The color of the text field border. |
fontColor | Indicates the color of text. |
fontFamily | The font family for text tooltips. |
fontSize | The font size for text tooltips. |
fontBold | Specifies if the text tooltips font is bold. |
fontItalic | Specifies if the text tooltips font is italic. |
objectList | The list of instance name. |
contentList | Text or movieclip identifier that assigned to related instance. |
Examples:
GG visualizer v2
A simple streaming sound loader with visualizer, volume control, and on/off function.
Editable Parameters:
sound | The sound item identifier or the streaming sound URL/filename. |
source | Specifies if the sould is a library item or external mp3. |
color | The color of visualizer. |
defaultVolume | The default valume level [0,100]. |
showVolumeControl | Specifies if volume control is enabled. |
Examples: