Adobe Dreamweaver Forums



Last 10 THreads :         gesture driven scrolling list (Last Post : cntpmaxn - Replies : 64 - Views : 950 )           »          Formatting Text Paragraph (Last Post : BudHud - Replies : 0 - Views : 1 )           »          Tutorial Announcement :: Dynamic DropDwon Accordion Panel :: (Last Post : Günter_Schenk@adobeforums.com - Replies : 1 - Views : 2 )           »          Locking resize handles in browser. (Last Post : Jasper Thayer - Replies : 9 - Views : 10 )           »          Pushy div (Last Post : howeaver - Replies : 2 - Views : 3 )           »          adding a tag in replay history (Last Post : DynV - Replies : 6 - Views : 22 )           »          IE7 & CSS Opacity (Last Post : Al Sparber - PVII - Replies : 2 - Views : 3 )           »          file directory. (Last Post : lachy455 - Replies : 9 - Views : 10 )           »          Updating Templates (Last Post : Murray *ACE* - Replies : 3 - Views : 4 )           »          Re: Why can't Snit ever tell the truth? Is it a genetic problem? (Last Post : Steve Carroll - Replies : 0 - Views : 1 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:

Reply
  #1 (permalink)  
Old 07-23-2008, 03:44 PM
georges.goebel
 
Posts: n/a
Diggs:
Default draw lines and other graphics

Hi,

We need do draw some lines (in fact it is the highway road system in
luxemburg) and other graphic components and dynamically change the colors of
these lines based on some values which are generated in the backend. You can
check it out at : http://www.cita.lu

At the moment we have a simple flash application which does all the color
changing baed on the values an we want to change this application in a flex
application which gets the processed data through Java interaces. The problem
of this application is that most of the business logic is in the flash
application which we want to move to the Java application.

Our first problem is how do we draw the lines in flex ? We found some ideas
but they are all based on programatical drawing. So you write actionscript to
draw these lines. This is quite hard and also not very usefull as the location
of the lines do not change. Only their color ! So we want to draw the lines as
in Flash, which works fine and in some seconds.
Next idea we had war to draw the lines in flash and load this application in
flex with the "swloader" component. We can load the flash application but we
cannot access the draw lines. In fact they are drawn in flash and then
converted to "graphics" (not movieclips nor commands). They have a name in
flash but when we try to get a reference in flex to these elements we always
get a null reference.

Does somebody know a best practise or a solution of this problem ?

Thanks

Georges


Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-24-2008, 01:23 PM
anirudhs
 
Posts: n/a
Diggs:
Default Re: draw lines and other graphics

Hi,

Declarative drawing is coming up in Flex 4. This is currently possible in Flex
3 using the Degrafa library: http://degrafa.com/

By the way, if you programatically draw the lines using actionscript, you can
move the lines simply by moving the Shape / Sprite object by changing it's x or
y property.

Reply With Quote
  #3 (permalink)  
Old 07-24-2008, 03:08 PM
georges.goebel
 
Posts: n/a
Diggs:
Default Re: draw lines and other graphics

Hi,

Thanks for your reply.

The degrafa is an interesting library but all the lines are drawn in a
matematically way. You have to specify the coordiantes where you want to dra
the lines. The library hides to the user the nasty code of the drawing and
filling which is described in the doc of flex (programatical drawing) as I
understand. As I understood it is comparable to a taglib in java which hides
alle the nasty jsp scriptlet and html code to the user (like <hutputTest
value="Hello"/> for jsf components)

What we are looking for is the possibility to draw freehand lines. Like
drawing with the brush tool in flash on the background. And in flex we want to
have the possiblilty to change graphics of a flash component. Or, better would
be to leave out the flash component (not using the sfloader component) and draw
immediately in flex. For example take the panel or canvas component and draw
freehand lines on that component. And each line could be accessed by their ID.

Georges Goebel

Reply With Quote
  #4 (permalink)  
Old 07-24-2008, 05:19 PM
levancho
 
Posts: n/a
Diggs:
Default Re: draw lines and other graphics

[q]Originally posted by: georges.goebel

What we are looking for is the possibility to draw freehand lines. Like
drawing with the brush tool in flash on the background. And in flex we want to
have the possiblilty to change graphics of a flash component. Or, better would
be to leave out the flash component (not using the sfloader component) and draw
immediately in flex. For example take the panel or canvas component and draw
freehand lines on that component. And each line could be accessed by their ID.

Georges Goebel[/q]

you can do that by developing component in flash and then importing in flex,
flex can still access objects from within loaded swf file an also listne to its
event as well.



Reply With Quote
  #5 (permalink)  
Old 07-25-2008, 05:00 AM
anirudhs
 
Posts: n/a
Diggs:
Default Re: draw lines and other graphics

Check out http://graphics-geek.blogspot.com/20...er-part-i.html
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 01:08 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk