Monthly Archives: October 2011

This is a republish from my previous lab. The original publish date was Apr 7, 2010.

Introduction

In experimenting with SWFObject 2, I came across the question, how do I enable my flash content to display full browser? I found a few solutions but found the following solution to work best for me. The implementation is simple and effective.

Solution

The solution comes after viewing the source for the page found at http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test_dynamic_fullbrowserflash.html. An explanation isn’t made, but the result is present in viewing the page, I have in turn created an explanation.

  1. You must create a page using SWFObject, I used the AIR app Generator to streamline my HTML page build.
  2. Ensure you set the “Dimensions” to “Percentage” and set 100 as the value for both the width and height.
  3. Next you need to define some CSS (ideally in an external CSS file) and wrap your alternative content into another DIV tag. View the highlighted elements in the image below for visual reference.

 

Read More »

This is a republish from my previous lab. The original publish date was Aug 6, 2009.

Recently I was working with the TextFormat class and dynamic TextField instances in Actionscript 3 and was noticing a slight rendering error. It seemed as if some of the beginning and ending characters in the text field were being slightly cut-off. After doing some research I found the culprit and the solution as well. I found that the TextFormat object I was using to format the text of the TextField object(s) wasn’t being fully utilized.

The TextFormat object has two properties which can be used to fix this “cut-off” of text. They are the rightMargin and leftMargin properties and setting them will help to reduce and/or remove this “cut-off” effect (depending on the value set).

In my solution I used a value of 1 pixel for each property and ended up with my desired results. The value you use will be dependent on the placement of the TextField instance in accordance with other content as well as the font being used. This find was a simple yet effective solution. Simply setting the leftMargin and/or rightMargin properties of the TextFormat object that is formatting your TextField(s) instances will do the trick. Just ask yourself which side the “cut-off” is occurring and set a value to the correct property (trial and error the values until desired result is achieved).