Thursday, October 23, 2008

Accessing Variables

You know, I'm just learning blind here so there may be a better way to do this... but was trying to access data pulled in from a remote object in the application (master page) from a component page. It turned out to be very easy.



In the master page make your variable bindable and public


[Bindable]
public var myFooter:String;


Then in your component page, import the application scope





import mx.core.Application;
]>




Then to spit it out, you can bind to the variable through your Application scope:




Friday, October 17, 2008

Type Coercion failed: cannot convert flash.events

I ran into this error while trying to insert an img tag into the htmlText field of a flex mx:text tag. The solution is very simple - you have to include the width and height properties in your img tag.