Blog Archives

positioning the cursor in a text field

positioning the cursor in flash can be a little tricky and sometimes temperamental, but we should be able to control where the cursor is with setSelection, with both beginIndex and endIndex set to the same position, for example the end

Tagged with: ,
Posted in Flash

printAsBitmap – object must be on stage

just for future reference, I’ve discovered today something that appears to be undocumented – when setting a PrintJob to printAsBitmap=true OR you are printing from a mac,(using the PrintJobOptions class) it is suddenly important that the object is on the

Tagged with: ,
Posted in Flash

preloader absorbing application FlashVars

As has happened frequently, after completing a Flash application, I find that the size of the application demands a preloader swf to load the application swf (complete with progress bar). the problem i have found with this preloader swf is

Tagged with: , ,
Posted in Flash

adding a symbol dynamically from the library

how to add a symbol from the library? in AS2, this.attachMovie(“square”, “square”, 1); and in AS3, var square1:square=new square(); but how do you add a symbol dynamically from the library? say if you have a shape stored in a variable:

Tagged with: ,
Posted in Flash

Frustrating Flex problems solved #2 – addChild

this.addChild(new Sprite()) looks simple enough doesn’t it? especially if you’ve been working solely in Flash AS3. But if you try this line within a Flex component, you’ll receive the error: ‘Type Coercion failed: cannot convert flash.display::Sprite@86cc0e1 to mx.core.IUIComponent.’ This is

Tagged with: , ,
Posted in Flex

Embedding a font in a component

it took me quite a while and a variety of sources to work out how to set an embedded font for use in a comboBox component in AS3, so i thought i would record the solution for others(and myself in

Tagged with: , , ,
Posted in Flash

ENTER_FRAME problem

i’ve got an interesting conundrum for you all. According to Flash help, ENTER_FRAME “…does not go through a ‘capture phase’ and is dispatched directly to the target, whether the target is on the display list or not.” and it is

Tagged with: ,
Posted in Flash

labels that are numbers

today i was given a movieClip of a candle slowly burning down. it had 15 states represented by numbered frame labels, and i wanted to go to the appropriate label based on the number of days the candle had been

Tagged with:
Posted in Flash

double click problems

Let’s say we want to set up a standard doubleClick interaction on a movie-clip(draw a square inside this clip) with instance name square: square.doubleClickEnabled=true; square.addEventListener(MouseEvent.DOUBLE_CLICK,double); function double(event:MouseEvent):void { trace(“doubleclick”); } Compile, it should work fine – “doubleclick” should trace when

Tagged with:
Posted in Flash

Weird sizing problem

After a lot of pulling my hair out trying to work out why my custom scrollbars weren’t resizing correctly, thinking there must be a problem with my code, i’ve discovered that it’s actually a strange problem with flash resizing movieclips

Tagged with: ,
Posted in Flash