Recently, I was given the challenge to make Flash in an eCard printable in all browsers through the HTML. The thing about printing an HTML page with Flash is that the default on all browsers is to suppress printout on background images as well as Flash Objects. The challenge was that both content from the HTML page and Flash content needed to print. The solution I came up with was to push all desired printed content into Flash and utilize Flash’s PrintJob Object. Continue reading…
Printing Content Within Flash
How to Clone Objects in AS3
Cloning simple objects in AS3 can have great advantages when creating an application. It creates shortcuts for recreating an object. I have put together a simple example of my exploration with cloning TextFormat and TextField objects. These methods can be applied to cloning other objects as well. Continue reading…
Order Matters When Creating a TextField
It may be obvious to most Flash programmers that order of operation is key to running a program. What may not be so apparent is to what order to apply properties to a TextField class so that it gets rendered properly at runtime. Continue reading…
How to Animate a Line Drawing With Flash Using Actionscript 3: Part 2
If you haven’t read Part 1 on Animating a Line Drawing, I suggest you start there. It goes into the basics of recording your animation using points with the click of a mouse. Here, in Part 2, I have decided to go into more depth of enhancements of the line drawing tool for greater control while experimenting with options and certain effects.
How to Animate a Line Drawing With Flash Using Actionscript 3: Part 1
Have you ever wanted to create an animation of a line drawing? I was given this challenge recently to animate a picture being drawn. At first I thought that using masks was going to be the only way to go, but I quickly realized that it is a pain to mask complex lines in a drawing. I also was thinking that reduction animation could work where segments are erased frame-by-frame, but this quickly becomes monotonous pain-staking process. Then a colleague and I began to think of a way to do this programatically through Actionscript. As it turns out, it really isn’t overly complex to program.
Odd TypeErrors When Loading and Parsing XML in AS3
Recently I was running into this issue with three TypeErrors when loading an XML file. The following errors were:
TypeError: Error #1088: The markup in the document following the root element must be well-formed.TypeError: Error #1089: Assignment to lists with more than one item is not supported.TypeError: Error #1090: XML parser failure: element is malformed.
The errors that were getting thrown were not consistent and made no sense as the XML file was, in fact, well formed.I did a bit of research and found some interesting things out on the erros. Continue reading…
Actionscript 3: Reference to Stage is Null
While writing a custom Class in Actionscript 3 today I came across an issue that took me a little bit to figure out where the compile error was coming from. I was getting the wonderful error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
After a bit of troubleshooting I discovered that a reference to the stage in my Class was returning null. Continue reading…
Flash AS3 Garbage Collection
New developers and/or Flash designers make the mistake of forgetting to clear an object when it is finished being used so that it is available for garbage collection. Many noobs simply don’t understand the importance and/or rules behind the Flash Player Garbage Collector. Some think that if you simply remove a child object from the stage, or simply made an object null, all is done and memory is automatically freed up. This is a misnomer and if you continually add large objects at runtime, especially with bitmaps and video, you quickly see a performance hit to the processor. Continue reading…
Timer Class in Actionscript 3.0
I have been playing with the Timer Class in Actionscript 3.0. It replaces setInterval from AS2. It seems to work about the same. It is a bit more robust; you quite a bit more control over it. Continue reading…