[flexcoders] Embed an image

2007-02-16 Thread moni_singhal

Actually i want to retrieve an image in a Flex Component (Flex 1.5 
Application) from a java file (in java file i am getting the image 
from the database ).
As mx:Image tag only takes source as an attribute  .How should i do 
this ? 

Thanks,
Monika



[flexcoders] Embed an image for a Sprite

2006-08-24 Thread polestar11
Hi there

How does one attach an image to a sprite class?
I have tried the following example, but nothing gets displayed on the
screen:

package 
{
import flash.display.Bitmap;
import flash.display.Sprite;

public class MySprite extends Sprite{

[Embed(source='/assets/board.png')]
public var MyPhoto:Class;

function MySprite()
{
 var pic:Bitmap = new MyPhoto();   
 this.addChild(pic);
}
}
}

Thanks 
Tracy





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/