Post Reply 
using images as nodes
06-11-2008, 07:05 PM (This post was last modified: 06-11-2008 07:09 PM by 34all.)
Post: #11
RE: using images as nodes
Hi Protocole,

welcome to FLAP and sorry that you have problems with the demo. And even more sorry, I have no idea why you get this error. As far as I see the necessary import for the EdgeSprite class is included in the demo
Code:
    import flare.vis.data.EdgeSprite;

so if you have flare included in your class path it should do. Which IDE are you using? Hope somebody else here can give some hint.

Cheers

martin
Find all posts by this user
Quote this message in a reply
01-12-2008, 06:11 PM
Post: #12
RE: using images as nodes
line 101 visits all edges, maybe you missed something of the code, or deleted some part...i just download it and run here without problem. it's not a code problem.
Visit this user's website Find all posts by this user
Quote this message in a reply
22-07-2009, 04:55 PM
Post: #13
RE: using images as nodes
I modified the code, but still, the color of the rectangle (in the getRectSprite() method) sometimes appears and sometime doesn't appear (I mean, the rectangle appears sometimes only) ! It's really random ! I don't know why, any clue ?

I guess it comes from a bad handle of flash of the different layers in the node.

Do you have the same problem ?
Find all posts by this user
Quote this message in a reply
13-08-2009, 08:04 PM
Post: #14
RE: using images as nodes
(28-10-2008 02:32 PM)34all Wrote:  Good morning,

this demo shows how to use images as nodes. It does this by simply adding a Loader for the respective image to the node while setting the shape attribute null. (you might want to use a shape, an image and a textsprite together also)

The images are appearing in an animated fashion in this demo once the loading process is complete. More important to notice here is that the width and height of an image, if not known beforehand, can only be determined once the image is loaded completely. We use the loading complete event for that matter also to center the image.

Cheers

martin


ps Don't forget to also download the three attached images in order to run the demo (or use your own ones and change the source code accordingly). These images have to be included in the output folder of your IDE.

Hi Martin,

I'm newbie with flare and I'm trying to use images as nodes, I tried your example and works fine. Thanks for posting it Smile. So, I have a question: I have only 7 different images but lot of nodes. In your example you use a loader per node, and I tried to use 7 loaders and add this 7 loaders to all nodes with addChild...

The result i have is that the first node of each type has the right image but the other nodes no. And the question is... if is possible to addChild a loader to diferent nodes?. Or can I do this wthout loading 50 images when much are the same image?

ion.

Achmed
Find all posts by this user
Quote this message in a reply
14-08-2009, 07:10 PM (This post was last modified: 14-08-2009 07:12 PM by 34all.)
Post: #15
RE: using images as nodes
Hi Achmed,

one way to go is to clone the bitmapdata loaded by the Loader.

Check for example the BitmapDataExample at the bottom of

http://livedocs.adobe.com/flash/9.0/Acti...pData.html

cheers

martin
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: