GGshow reloaded GGshow reloaded

December 31, 2011

Compact, not vacuum…

Issue:

  • Unable to execute a SQLite VACUUM command from actionscript.

Reason:

  • flash.events.SQLErrorEvent
    
    SQLError
    detailID : 2037
    details : VACUUM is not allowed from SQL.

Solution:

  • use method compact() to reclaims all unused space in the database.
    compact(responder:Responder = null):void
Filed under: ActionScript,Flash Platform,SQLite — Tags: , , , , — GG @ 4:36 pm

January 19, 2011

Incompatible or damaged Adobe AIR.dll

Issue:

  • Unable to create an New Flex Project with Application Type = Desktop (runs in Adobe AIR).
  • Flash Builder program stop responding.
  • Found error below in Windows Event Viewer Application Logs.
    • Event 1000, Application Error
      Faulting application name: adl.exe, version: 1.5.3.9120, time stamp: 0x4b06f734
      Faulting module name: Adobe AIR.dll, version: 1.5.3.9120, time stamp: 0x4b06f6c8
      Exception code: 0xc0000005
      Fault offset: 0x000bf36a
      Faulting process id: 0x15f4
      Faulting application start time: 0x01cba0d1d86cb249
      Faulting application path: C:\Program Files\Adobe\Adobe Flash Builder 4\sdks4.0.0\bin\adl.exe
      Faulting module path: C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\runtimes\air\win\Adobe AIR\Versions\1.0\Adobe AIR.dll
      Report Id: 168bbf5f-0cc5-11e0-8667-80b5c7eac2c5

Reason:

  • Incompatible or damaged Adobe AIR.dll in Flex SDK bin folder.

Solution:

  1. Install the latest version of AIR runtime.
  2. Backup the old version of the Adobe AIR.dll file in Flex SDK bin folder.
    Usually the Flex SDK bin folder located in path below.
    %ProgramFiles%\Adobe\Adobe Flash Builder 4\sdks\4.0.0\bin
    e.g:

    • C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\bin
    • C:\Program Files (x86)\Adobe\Adobe Flash Builder 4\sdks\4.0.0\bin
  3. Copy Adobe AIR.dll from
    C:\Program Files\Common Files\Adobe AIR\Versions\1.0
    and paste into
    C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\4.0.0\bin
Filed under: AIR,Flash Buider — Tags: , , — GG @ 1:13 pm

January 18, 2011

AIR 2 Namespace

Issue:
Error message below appear when running an AIR 2 application.
An ActionScript error has occurred:

  • VerifyError: Error #1014: Class IIMEClient could not be found.
    at flash.display::MovieClip/nextFrame()
    at mx.managers::SystemManager/deferredNextFrame()[E:dev4.0.0frameworksprojectsframeworksrcmxmanagersSystemManager.as:267]
    at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:dev4.0.0frameworksprojectsframeworksrcmxmanagersSystemManager.as:2460]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.preloaders::Preloader/timerHandler()[E:dev4.0.0frameworksprojectsframeworksrcmxpreloadersPreloader.as:488]
    at flash.utils::Timer/_timerDispatch()
    at flash.utils::Timer/tick()
    

Reason:
You must update your application descriptor file to the 2.0 namespace in order to access the new AIR 2 APIs and behavior. If your application does not require the new AIR 2 APIs and behavior, you are not required to update the namespace from 1.x based namespace.

Solution:
To update the namespace, change the xmlns attribute in your application descriptor to: http://ns.adobe.com/air/application/2.0

Open your application descriptor file (-app.xml), edit the 2nd line.

  • <application xmlns="http://ns.adobe.com/air/application/1.5.3">

Change the value for xmlns to http://ns.adobe.com/air/application/2.0

  • <application xmlns="http://ns.adobe.com/air/application/2.0">

Additional Information:
Adobe AIR 2 – Release notes for Adobe AIR developers

Filed under: AIR,Flash Buider — Tags: , — GG @ 7:41 pm

October 23, 2010

Roots in dynamic and input text field

This is a solution for using Square root (SQRT), cube root, nth root, and other roots formula in dynamic and input text field, extended from the article How to use subscript & superscript in dynamic and input text field.

  1. Download & install GG Root Sans N, GG Root Sans Radical, GG Root Sans Radicand fonts.
  2. Create a dynamic text field with Arial font embeded. Set the HTML property to true.
  3. Create a dynamic text field with GG Root Sans N font embeded.
  4. Create a dynamic text field with GG Root Sans Radical font embeded.
  5. Create a dynamic text field with GG Root Sans Radicand font embeded.
  6. Use HTML tag to set text to roots formula like below:
    my_txt.html = true;
    my_txt.htmlText = "GG Root Sans<br>";
    my_txt.htmlText += "<font face="GG Root Sans Radical"> </font><font face="GG Root Sans Radicand">2</font>";
    my_txt.htmlText += "<font face="GG Root Sans Radical">n</font><font face="GG Root Sans Radicand">x</font>";
    my_txt.htmlText += "<font face="GG Root Sans Radical">2</font><font face="GG Root Sans Radicand">3</font>";
    my_txt.htmlText += "g = <font face="GG Root Sans N">f(d+e</font><font face="GG Root Sans Radical">)</font><font face="GG Root Sans Radicand">(ax+by)(ax-by)</font>";

Demo:

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

Download:

Filed under: ActionScript,Flash Platform,HTML — Tags: , , , — GG @ 3:37 pm

September 22, 2009

It took long path to be approved

Due to an unknown reason, the latest version of GG Commands MXP file takes 4 months to online.
I’ve got some negative comments regarding this problem.
Sorry for any inconvenience caused. It was unintended.

Below is the submission log:

22/05/2009
Submitted the MXP file to Adobe Exchange. Status: Pending Admin Review.

30/06/2009
More than 6 weeks MXP submitted, still pending admin review, contacted Adobe.

23/07/2009
Adobe Exchange feedback that previous submitted MXP file was unsuccessfully uploaded.
Uploaded the MXP again. Status: In QA Process.

20/09/2009
It has been almost 2 months the new MXP file in QA Process, but it is still not approved. Contacted Adobe again.

22/09/2009
The GG Commands v2 MXP file has finally been approved by Adobe Exchange, and released.

The newest MXP file is now can be downloaded from Adobe Exchange.
For those who has downloaded it previously, please download it again. GG Command v2

More free Flash extension

Filed under: GG's Flash Extensions — Tags: , , , , — GG @ 1:01 pm

May 22, 2009

GG Commands v2.0.0

GG Commands is a free JSFL commands extension package, it makes jobs easier in Flash. After you download and install the GG Commands v2, you can access it from Commands menu.

The current version includes 7 useful commands below:
– Distribute to Keyframes
– Duplicate Selection
– Frames Selection Report
– Insert Multiple
– Resize Text
– Scale to Stage
– Slice Bitmap Instance

After you download and install the GG Commands v2, you can access it from Commands menu (screenshot).

Distribute to Keyframes
– Distributes selected text fields and symbol instances to keyframes.

Duplicate Selection
– Duplicate selected elements with specified quantity, scale, and rotation.

Frames Selection Report
– Generates report for number of selected frames in timeline

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.

Warning: Slice Bitmap Instance command still has a unstablity problem causing the Flash IDE to quit or not responding. Please remember to save your document before slice.

December 23, 2008

Video covered whole screen area when full screen

Issue:

  • Only can see video when full screen mode activated (StageDisplayState.FULL_SCREEN).
  • Other content not visible when full screen.

Reason:

  • Flash Player uses hardware acceleration to scale the video file, rather than scaling it through software.
  • By hardware acceleration for full-screen, FLVPlayback component instance take over whole full screen area by default.

Solution:
Set the fullScreenTakeOver parameter to false.

  • FLVPlaybackInstance.fullScreenTakeOver = false;

Additional Information:
Using the FLVPlayback component with Flash Player 9 Update 3

Filed under: ActionScript,Flash Platform,Web — Tags: , , , — GG @ 2:48 pm

December 18, 2008

How to embed fonts in Flash

Issue:

  • Text in dynamic/input text field not displayed.
  • Text missing after scale, screw, or rotate the text field.
  • Text problem when masking or tweening.

Reason:
Flash does not embed the entire font with all the characters. By default, only used glyphs embeded for static text fields, and no glyphs embeded for dynamic and input text field.

Solution:
Embed the required font glyphs to your Flash document.

Firstly, make sure that the fonts that you want to embed has already been installed in your local machine.

To embed a font thru Property Inspector

  1. Create a dynamic text field on your stage
  2. From the Property Inspector select ‘Embed…’ (or ‘character’ for older version of Flash software).
  3. Choose the character ranges that you want to embed.
  4. Press OK

Note: Make sure that you choose all the range of characters that may appear in the textfield
For Flash 5, you can embed the font thru the Text Options panel (Window>Panel>Character).

To embed a font in ActionScript

  1. Emmbed the font to the library of your Flash document
    – Open Library (Ctrl-L).
    – Click on the Library options button, select New Font.
    – In Font Symbol Properties dialog, select font, style, and size, set the value for name (e.g. my_font), then press OK.
  2. Set linkage for the font symbol
    – Right click on the font symbol in Library, select Linkage…
    – In Linkage Properties dialog, enable the Export for Actionscript option, then press OK.
  3. Create text field
    – Create a dynamic or input text field on your stage
    – In Property Inspector, set the font (my_font*), and set the style and size same value with step 1
    – Set the instance name for the text field, (e.g. my_txt)
  4. Add ActionScript
    – In Action Panel, add the following script

    • For ActionScript 2
      var myFormat:TextFormat = new TextFormat();
      myFormat.font = "my_font";
      myFormat.size = 24;
      my_txt.autoSize = "left";
      my_txt.embedFonts = true;
      my_txt.setTextFormat(myFormat);
    • For ActionScript 3
      var myFont:Font = new my_font();
      var myFormat:TextFormat = new TextFormat();
      myFormat.font = myFont.fontName;
      myFormat.size = 24;
      var myTextField:TextField = new TextField();
      myTextField.autoSize = TextFieldAutoSize.LEFT;
      myTextField.defaultTextFormat = myFormat;
      myTextField.embedFonts = true;

With the font embeded in your Flash document, you can dynamically set the font style, format, rotation, alpha, & etc. and allows mask, tween, and skew of a dynamic text field while gives a consistent, predictable viewing of fonts in your swf. However, embeding a font will increase your SWF file size.

Font embedding in other software
Flash is not the only software which require manual embedding font into published document.

In Microsoft PowerPoint, we need to embed fonts in Save As dialog, Save Options,
choose Embed TrueType fonts for PowerPoint 2003 or below, or choose Embed fonts in the file for PowerPoint 2007.

For web application, we can embed font by converting the font to Portable Font Resources (.pfr) and Embeddable Open Type (.eot) format, and then using <link> and <style> html tag to embed the font.

  • <link rel="fontdef" src="yourfont.pfr">
    <style type="text/css">
    <--!
    @font-face {
    src:url(fonts/yourfont.eot);
    }
    -->
    </style>

Additional Information:
LiveDocs: Embedding fonts
Flash Quick Start: Embedding fonts

Filed under: ActionScript,Flash Platform — Tags: , — GG @ 12:15 am

December 7, 2008

Dynamic Chord Diagram

A single SWF file to generate diagrams for all kinds of guitar chords.
Pass a variable from HTML to SWF when loading it.

Examples:

chord.swf?chord=C,X,3,2,0,1,0
(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

It is customizable…
chord.swf?chord=Am,X,0,2,2,1,0&bgcolor=0xDDFFDD&fgcolor=0x009900

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.) (Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)

It is scalable…

(Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.) (Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.) (Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.) (Either JavaScript is not active or you are using an old version of Adobe Flash Player. Please install the newest Flash Player.)
Filed under: Flash Platform,GG's Flash Extensions,Web — Tags: , , — GG @ 2:09 pm

October 20, 2008

WMODE for SWF

Issue:

  • How to display other HTML content above a swf?
  • DHTML menus appear underneath swf
  • HTML layer z-index not working on swf object

Reason:
By default wmode=”window”, Active Content is rendered directly to the screen on top of web browser window, which means it appears on top of other HTML content.

Solution:
Set the wmode parameter for swf object & embed tag to “opaque” or “transparent”.
e.g.:

  • In HTML,
    1. add to object tag:
      <param name="wmode" value="opaque">
    2. add to embed tag:
      wmode="opaque"

    So your html code will looked like:

    • <object ... >
          ...
          <param name="wmode" value="opaque">
          <embed ... wmode="opaque" ... >
      </object>
  • From Flash,
    1. From menu, File > Publish Settings,
    2. click HTML tag,
    3. select “Opaque Windowless” for Window Mode.
    4. Publish
  • From Dreamweaver,
    1. Select the swf in the Design View.
    2. In the Properties panel, choose Parameters.
    3. Enter “wmode” (without quotes) for the Parameter.
    4. Enter “transparent” (without quotes) for the Value.
    5. Save the document.

Additional Information:

TechNote:
Flash content displays on top of all DHTML layers
How to make a Flash movie with a transparent background

Filed under: Flash Platform,HTML,Web — Tags: , , , — GG @ 1:48 am
Older Posts »

© 2017 GGSHOW | Powered by WordPress