This content has been marked as final. Show 4 replies
probably the source path doesn't point to the direct location of the picture file.
I would place this into a .css like this
into the mxml goes:
<mx:Style source="../css/Panel.css" />
and the panel.css:
(if Panel is a part of your app, else dot doesn't needed at the beginning of "Panel" name)
and the folder architecture is:
--.mxml (your file)
"GeorgeWS" <firstname.lastname@example.org> wrote in message
>I have tried alot, I get this error when I compile:
> Invalid Embed directive in stylesheet - con't resolve source ...
> backgroundImage: Embed("assets/Grapes4.jpg");
> I tried using css but that gave the same error, I am using Flex 2 I do not
> anywhere in the Design mode to set a backgroundImage. How can such easy
> seem so hard. Thanks
I read somewhere that if you refer to something in an embed statement, it
needs an extra forward slash ("/assets/Grapes4.jpg")
Thanks, but it still does not work. I put the Grapes4.jpg everywere to see if it would see it. I even took out the backgroundImage line, compiled and then changed the css file on the server. That stalls on the loading process.
You can try to give stylename (.styleName property at the component), and use that name in the css file