Change

[EMAIL PROTECTED]('/images/image.png')]

to

[Embed('/images/image.png')]

The @ symbol isn't needed when you're embedding via script (as opposed
to inline), and its causing the compiler to ignore the directive.

Unfortunately, the compiler doesn't seem to give off any warning when
it encounters an unknown directive - at least not if you're using FB2.

--- In flexcoders@yahoogroups.com, "lytvynyuk" <[EMAIL PROTECTED]> wrote:
>
> I have problem to bind image to static var
> 
> my piece of code is:
> [EMAIL PROTECTED]('/images/image.png')]
> [Bindable]
> public static var image:Class;
> 
> getting exception:
> TypeError: Error #1009: Cannot access a property or method of a null
> object reference.
>      at support::PublicConstants$/get
>
voipguardImage()[W:\jboss-4.0.5\server\default\deploy\ISP.war\isp_flex\s\
> upport\PublicConstants.as:117]
>      at support::PublicConstants$cinit()
>      at
>
global$init()[W:\jboss-4.0.5\server\default\deploy\ISP.war\isp_flex\supp\
> ort\PublicConstants.as:5]
>      at
>
isp_flex/initApplication()[W:\jboss-4.0.5\server\default\deploy\ISP.war\\
> isp_flex\isp_flex.mxml:66]
>      at
>
isp_flex/___isp_flex_Application1_initialize()[W:\jboss-4.0.5\server\def\
> ault\deploy\ISP.war\isp_flex\isp_flex.mxml:6]
>      at flash.events::EventDispatcher/dispatchEventFunction()
>      at flash.events::EventDispatcher/dispatchEvent()
> 
> Any ideas why?
> 
> Also how to make something like array of embedded images:
> 
> var images:Array = [ @Embed('/images/image1.png') ,
> @Embed('/images/image2.png'), @Embed('/images/image3.png')]
>


Reply via email to