GhostWire Studios - Flash/Flex UI Components Development And Consulting Services
Quality User Interface Controls For Flash Application DevelopmentAspireUI Components

Aug 23 2011

Severe TextField WordWrap Bug in Flash Player version 10.3.183.5

Published by under Flash

There is a severe TextField bug in current Flash Player version 10.3.183.5, causing text to display vertically with each letter on each line in TextField instances where the wordWrap property has been set to true.

This causes a concern for the Flash Platform in general, because this shows that existing code is basically held hostage to future Adobe Flash Player updates that may break past deployed code. I would expect Adobe QA to be more rigorous than this.

This issue can be found in the bugbase, but while marked as fixed, it is not:

https://bugbase.adobe.com/index.cfm?event=bug&id=2941694

Being an inherent player bug that causes problems to past deployed code, this is not something that can be fixed by using “workaround code”.

The problem is severe enough to warrant a quick update to version 10 (or pull 10.3.183.5 from further distribution), but Adobe has chosen to fix it only in version 11 BETA instead. I don’t think this is acceptable.

One response so far

Aug 16 2011

[AS3] Referencing Embedded Assets Of Another Class Using Underscore

Published by under Flash,Flash AS3,Tips

This is rather unorthodox but it works. In Flash, when you embed an image into the SWF using a static class member of a class, a new class with the name of CLASSNAME_MEMBERNAME is actually created internally. Using flash.utils.getDefinitionByName(), you can access this class, regardless of whether the static member was declared as public or private. This makes it possible to make a very simple embedded image assets manager.

Continue Reading »

One response so far

Feb 09 2011

FlashDevelop, Flex SDK, Windows 7, Missing DLL

Published by under Flash,Flash AS3,Others

This post is for my own future reference because I have forgotten about this problem until a recent reinstall of Windows 7.

After a clean install of Windows 7, trying to use compc and/or mxmlc from the Flex SDK through command line may yield a “System Error” message:

It seems like Microsoft somehow forgot to ship this Microsoft C Runtime Library DLL in Windows 7. When installing some programs, this DLL may be installed by the respective installers. If you encounter this missing DLL problem, the only way to fix it is to install one of these programs, or otherwise grab hold of the DLL from somewhere and place it in the correct folder:

For Windows 7 32-bit, place the DLL in
C:\Windows\System32

For Windows 7 64-bit, place it in
C:\Windows\SysWOW64

WARNING: Do not install DLL obtained from untrusted sources. You can actually copy the DLL from one of your old Windows OS installations. If you want to use my copy, here it is.

No responses yet

Aug 28 2010

On Permutations, Probabilities and Psychology

Published by under Others

Shuffling an array of items is a common topic in programming, especially as an academic exercise. In my previous post, I wrote about a different approach towards cards shuffling in programming – which is to not do it. Instead, you can randomly select and remove an item from the array whenever you need to retrieve an item. As far as distribution of probabilities goes, there is no difference between the two methods.

The seemingly controversial topic received some interesting comments. Due to certain fallacies introduced by a commenter, I thought I should clarify those points for the benefit of any reader who might become confused after reading his comments. My reply got a little too long, so I am posting it here.

Continue Reading »

One response so far

Aug 21 2010

[Game Programming] Consider A Different Approach To Cards Shuffling

Published by under Flash,Flash AS3,Tips

Very commonly, computer programs (usually games) that have the need to simulate a shuffling of a deck of cards (or drawing a tile from a bag, etc.) will go the obvious way of putting the items in an array, and then randomize the order of the elements of the array. A common algorithm for doing that is the Fisher–Yates shuffle (you can find a suitable implementation easily by googling).

The purpose of this post, however, is not to discuss “how” to shuffle arrays. Rather, I would like to bring up the question of “why” (do it) in the first place.

Continue Reading »

13 responses so far

Aug 19 2010

FlashDevelop: Getting trace() Statements To Show In Output Panel

Published by under Flash,Flash AS3,Tips

This is quite an obscure, little known, hidden-by-default feature, but the FlashDevelop IDE actually has a built-in Flash tracer. The plug-in is unfortunately not enabled by default, and new users of FlashDevelop often get frustrated wondering where to look for the output of their trace statements.

To get the tracer to work:

1) Go to Tools -> Program Settings (F10).

2) In the Plugins list on the left of the dialog box, look for FlashLogViewer and click on it.

3) On the right panel, look for the “Start Tracking” property, click on the drop down box and select “OnBuildComplete” (it is set to “Manually” by default).

The output of your trace statements are now shown in the Output Panel after you build your project.

2 responses so far

Aug 04 2010

Mac OSX Keeps Restarting On Its Own?

Published by under Others

Ever since I first started using Mac OSX, I have been haunted by this strange behavior. On Windows, if I leave the machine to take a much needed break, or to take a phone call, go for a run, take a shower, etc. I can return to the machine later, with my work-in-progress intact, safe and sound. Or downloads in Firefox completed. Or whatever tasks that were left running, either still running or completed.

On the Mac, I have lost much work and time due to the Mac OSX intrusively restarting on its own. Drafts not saved? Say farewell – lost forever. Downloads disrupted – start over (unless resume miraculously works). This is especially exasperating, considering that Apple requires you to update the iPhone SDK/Xcode by re-downloading the whole package. Not patching, but re-downloading a 2GB+ file.

So, why exactly is the Mac restarting on its own, even when it is not idle such as having a download-in-progress?

Turns out that this is due to a rather useless Security feature. Ridiculously, the “Log out after 30 minutes of inactivity” setting is the culprit. So, to save yourself some agony, make sure you turn it off:

If your Mac has been suffering from this problem, hope the above helps!

Seriously, I have no idea what purpose this Security feature serves, other than to make you lose progress in your work. By comparison, on Windows, if the OS logs you out due to inactivity, it actually restores your session with your work-in-progress intact the next time you log in. You can even safely switch between user accounts on Windows, and log back into an account with its last session intact.

P/S: As far as security goes, you should just check the “Require password” option.

2 responses so far

Apr 22 2010

uiImage: Loading Resources From Foreign Domains

Published by under Aspire UI,Flash

The uiImage component is used to display an image (JPG/PNG/GIF). The path to the image is specified by the source property. By default, the uiImage object will attempt to load resources from the “assets/images/” folder (path is relative to the application SWF). To load from a different path, for example the folder “resources/images/”, prefix the source with “url:”, example “url:resources/images/garden.jpg”.

In order to load images from a different domain, the Flash Player will need to read a crossdomain.xml file from the foreign domain (and this file must grant permission to your domain to access the required resources). Typically, you would expect to need to specify a checkPolicyFile property somewhere. In the case of the uiImage component, there is no checkPolicyFile property to set because this would be unnecessary.

Continue Reading »

No responses yet

Apr 15 2010

[OSX] Goodbye, Spaces… Hello, Spark!

Published by under Others,Tips

This post may come across as blasphemous to ardent Mac fanatics, but I am hoping that OSX users who are in the same predicament as me may find it useful.

I have finally disabled Spaces on Mac OSX. It’s a little painful to disable it, because I had considered it a very crucial feature, considering that without it the desktop gets cluttered quickly with the way the Mac OS presents applications and their respective windows (all mixed together in one very confusing bucket). However, the slide animation that occurs every time Spaces switches from one space to another has become really nauseating.

It was cool at first, but now it is painful to watch.

So much for Apple’s acclaimed emphasis on the “user experience”. Does nobody in the UX team ever stop to think that not everyone likes gimmicky animation stuff for frequent tasks, and there should be an easy way to disable such animations? Unfortunately, there is just no way to disable the animations – I hope to be proven wrong, but my searches have come up fruitless. A quick google visit shows there are other users who wish to get rid of the animation too (and apparently I am not the only one suffering from motion sickness, although most simply want to get rid of the animation just to save time, keeping multitasking slick and snappy).

So, now that I have disabled Spaces, what do I do now with the cluttered desktop? I am currently solving the issue with a little AppleScript and implementation of keyboard shortcuts via Spark – a free utility to create Hot Keys to launch applications and documents, execute AppleScript, etc.

Continue Reading »

No responses yet

Mar 31 2010

uiFrame: ActionScript 3.0 GroupBox

Published by under Aspire UI,Flash,Tips

It is often overlooked, but the uiFrame component in the Aspire UI toolkit essentially has the same utility as the GroupBox in WPF (Windows Presentation Foundation).

A GroupBox displays a border/frame around a group of controls, with or without a caption/title. This is typically done to provide visual feedback to end-users that a collection of controls on a form is logically grouped.

When using the Aspire UI toolkit in ActionScript 3.0 projects, you can use the uiFrame component for the same results.

Continue Reading »

No responses yet

Next »