Whoops, slight alteration to my last post.
I meant to say change
[EMAIL PROTECTED]('/images/image.png')]
to
[Embed(source='/images/image.png')]
You'll need to add the 'source' part. The commentary in the previous
post is still in play here, however.
--- In [email protected], "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')]
>