Re: [flexcoders] Manipulating SVG

2005-10-24 Thread Dave H
Thanks Dan, slightly disappointing but at least it explains why I've 
been unable to find the documentation!  :o)

Dave


 Yahoo! Groups Sponsor ~--> 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/nhFolB/TM
~-> 

--
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/
 




RE: [flexcoders] Manipulating SVG

2005-10-23 Thread Roger Gonzalez
> This is essentially correct, although I don't yet have a good 
> example of the SVG that might be used.  All I'd like to do at 
> this stage is have an mx:Button which highlights a 
> corresponding polygon.  The data could conceivably be 
> embedded, I wouldn't be intending to load in new SVG files on 
> the fly.  I don't have a proper project yet, it's very much a 
> proof-of-concept thing.

I believe that it makes sense for Flex to import SVG as an efficient
mechanism for transcoding textual vector data down to a more efficient
binary SWF represententation.  As of yet, it has not made as much sense
to do the extensive work necessary to support SVG DOM scripting, given
that Flash has a more robust and better supported programming model.
Purists get twitchy about our
almost-but-not-quite-fully-standards-compliant implementation, but
honestly, its often been tough to even justify a single concrete
business case for implementing SVG at all.

I think your use case is interesting, but at this level, it really
wouldn't be rocket science for you to just import the XML at runtime and
draw it yourself.  It would not take:

> The best solution is probably the one that doesn't require me 
> to be a complete Flash guru.  :o)

as your case is really very simple.  Vectors and fills are at the
trivial end of Flash gurudom.  Another option might be to separate the
data into multiple SVG "documents", and to composite the individual
polygons using code.

> Having the Flex server translate the SVG into the final SWF 
> sounds like the best solution to me, if it can be done.  It 
> seems I either treat SVG as an image, but then I can't 
> manipulate it, or I treat it as XML, in which case Flex won't 
> let me display it.

I can imagine us providing some sort of access to the various subpieces
of the SVG DOM from Actionscript, biased towards "getting stuff
accomplished" rather than "pedantic standards compliance".  File a
"wish" if this would be valuable to you.

> 
> Thank you for all of your suggestions.  I've searched as you 
> suggested and found DENG (Flash-based SVG rendering) as well 
> as an article by Helen Triolo, these certainly sound like 
> avenues worth exploring.
> 

DENG kicks serious booty.  I've seen DENG render SVG faster than some
native renderers!

-rg


 Yahoo! Groups Sponsor ~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~-> 

--
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/
 




Re: [flexcoders] Manipulating SVG

2005-10-23 Thread Dave H
John Dowdell wrote:
> 
> This is interesting. I was hoping someone else had a better answer than 
> what I've currently got, but didn't want to leave it unanswered too.
> 
> Let me make sure I'm correctly understanding what you'd like to do... it 
> seems like there's some external mapping source which can give you a 
> series of irregular polygons, with stroke/fill colors, in SVG format. 
> You'd like these to display in the final SWF delivered to the audience, 
> and would like to be able to programmatically change stroke/fill colors 
> in response to user activity. Am I seeing the problem correctly here?



This is essentially correct, although I don't yet have a good example of 
the SVG that might be used.  All I'd like to do at this stage is have an 
mx:Button which highlights a corresponding polygon.  The data could 
conceivably be embedded, I wouldn't be intending to load in new SVG 
files on the fly.  I don't have a proper project yet, it's very much a 
proof-of-concept thing.

The best solution is probably the one that doesn't require me to be a 
complete Flash guru.  :o)

Having the Flex server translate the SVG into the final SWF sounds like 
the best solution to me, if it can be done.  It seems I either treat SVG 
as an image, but then I can't manipulate it, or I treat it as XML, in 
which case Flex won't let me display it.

Thank you for all of your suggestions.  I've searched as you suggested 
and found DENG (Flash-based SVG rendering) as well as an article by 
Helen Triolo, these certainly sound like avenues worth exploring.

Regards,

Dave


 Yahoo! Groups Sponsor ~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
~-> 

--
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/
 




Re: [flexcoders] Manipulating SVG

2005-10-23 Thread Robert Thompson
I apologize for the 2nd e-mail, but this is another
example of a great response, but also one where we
might begin to implement a protocol (as the poster was
asking about pointers to resources), of, at the end of
the message:

SEE ALSO:
1. Title, url
2. Title, url

I'm not trying to get anal about this; I just think it
would dramatically cut down on people asking for more
information as they could research it directly for
themselves (note: not all posts make it clear how one
would find the mentioned info.; let alone most of it
is usually bleeding edge).

-r


--- John Dowdell <[EMAIL PROTECTED]> wrote:

> Dave H wrote:
> > Can anyone point me to any useful resources on
> manipulating SVG from 
> > within Flex?  I'd like to be able to highlight
> different parts of an 
> > image at the click of a button.
> 
> This is interesting. I was hoping someone else had a
> better answer than 
> what I've currently got, but didn't want to leave it
> unanswered too.
> 
> Let me make sure I'm correctly understanding what
> you'd like to do... it 
> seems like there's some external mapping source
> which can give you a 
> series of irregular polygons, with stroke/fill
> colors, in SVG format. 
> You'd like these to display in the final SWF
> delivered to the audience, 
> and would like to be able to programmatically change
> stroke/fill colors 
> in response to user activity. Am I seeing the
> problem correctly here?
> 
> 
> If so, then I see two other possible paths, in
> addition to the 
> "" path you mentioned, but I'm not sure
> which of these are 
> viable paths, and hope that other people can expand
> on these.
> 
> 1)  Use a standalone SVG->SWF serverside utility to
> turn the mapping 
> service's output into something very easily usable
> by the Macromedia 
> Flash Player clientside renderer.
>  (Some exist, but it would take some research to
> learn how closely 
> current candidates match this project's needs.)
> 
> 2)  Have the Flex server request and translate the
> SVG data into the 
> final SWF, where each polygon is still individually
> addressable.
>  (Other people on this list know more than me
> here.)
> 
> 3)  Have the Macromedia Flash Player request the raw
> SVG data, and use 
> procedural drawing to render and then manipulate the
> polygons.
>  (ActionScript and the Drawing API have been
> used to render basic 
> SVG files before... a search term "wahlers triolo
> svg" pulls up citations.)
> 
> 
> Are any of the above paths of interest...?
> 
> jd
> 
> 
> 
> -- 
> John Dowdell . Macromedia Developer Support . San
> Francisco CA USA
> Weblog: http://www.macromedia.com/go/blog_jd
> Aggregator: http://www.macromedia.com/go/weblogs
> Technotes: http://www.macromedia.com/support/
> Spam killed my private email -- public record is
> best, thanks.
> 





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


 Yahoo! Groups Sponsor ~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM
~-> 

--
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/
 




Re: [flexcoders] Manipulating SVG

2005-10-23 Thread John Dowdell
Dave H wrote:
> Can anyone point me to any useful resources on manipulating SVG from 
> within Flex?  I'd like to be able to highlight different parts of an 
> image at the click of a button.

This is interesting. I was hoping someone else had a better answer than 
what I've currently got, but didn't want to leave it unanswered too.

Let me make sure I'm correctly understanding what you'd like to do... it 
seems like there's some external mapping source which can give you a 
series of irregular polygons, with stroke/fill colors, in SVG format. 
You'd like these to display in the final SWF delivered to the audience, 
and would like to be able to programmatically change stroke/fill colors 
in response to user activity. Am I seeing the problem correctly here?


If so, then I see two other possible paths, in addition to the 
"" path you mentioned, but I'm not sure which of these are 
viable paths, and hope that other people can expand on these.

1)  Use a standalone SVG->SWF serverside utility to turn the mapping 
service's output into something very easily usable by the Macromedia 
Flash Player clientside renderer.
 (Some exist, but it would take some research to learn how closely 
current candidates match this project's needs.)

2)  Have the Flex server request and translate the SVG data into the 
final SWF, where each polygon is still individually addressable.
 (Other people on this list know more than me here.)

3)  Have the Macromedia Flash Player request the raw SVG data, and use 
procedural drawing to render and then manipulate the polygons.
 (ActionScript and the Drawing API have been used to render basic 
SVG files before... a search term "wahlers triolo svg" pulls up citations.)


Are any of the above paths of interest...?

jd



-- 
John Dowdell . Macromedia Developer Support . San Francisco CA USA
Weblog: http://www.macromedia.com/go/blog_jd
Aggregator: http://www.macromedia.com/go/weblogs
Technotes: http://www.macromedia.com/support/
Spam killed my private email -- public record is best, thanks.


 Yahoo! Groups Sponsor ~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~-> 

--
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/
 




RE: [flexcoders] Manipulating SVG

2005-10-22 Thread Dan Plesse










The iteration book says only  

 

The SVG people are horrified by Flex 

 

http://svg.org/story/2004/07/01/111213/00

 

Flex, does not support interactivity, scripting, animation, masking
or filters.

 

And 

 

Macromedia do not appear to provide a single valid piece of
documentation on SVG support in Flex

 

Can someone add this to the Flex wish list?  

 

Thanks Dan 

 









From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Dave H
Sent: Saturday, October 22, 2005
8:51 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Manipulating
SVG



 

Hi,

Can anyone point me to any useful resources on
manipulating SVG from 
within Flex?  I'd like to be able to
highlight different parts of an 
image at the click of a button.

I have a simple graphic containing two polygons:

 http://www.w3.org/2000/svg">
   england"
id="england"

style="fill:#9F9; stroke:black"

d="M 35,10 L 50,10 55,40 60,40 65,60 40,70
   
15,65 15,55 30,40 35,10 z"/>
   

style="fill:none; stroke:black"

d="M 50,40 L 45,40 45,45 50,50 55,50 50,40 z"/>
 

If I embed the graphic into my application using
, what 
happens to the object model, for example what's
the equivalent to:


document.getElementById('cambridgeshire').

setAttribute('style', 'fill:none; stroke:red');

Any pointers would be most appreciated!  :o)

I'm using Flex 1.5.

Many thanks,

Dave








--
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



   Visit your group "flexcoders" on the web. 
   To unsubscribe from this group, send an email to: [EMAIL PROTECTED] 
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  











[flexcoders] Manipulating SVG

2005-10-22 Thread Dave H
Hi,

Can anyone point me to any useful resources on manipulating SVG from 
within Flex?  I'd like to be able to highlight different parts of an 
image at the click of a button.

I have a simple graphic containing two polygons:

 http://www.w3.org/2000/svg";>
   
   
 

If I embed the graphic into my application using , what 
happens to the object model, for example what's the equivalent to:

 document.getElementById('cambridgeshire').
 setAttribute('style', 'fill:none; stroke:red');

Any pointers would be most appreciated!  :o)

I'm using Flex 1.5.

Many thanks,

Dave


 Yahoo! Groups Sponsor ~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM
~-> 

--
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/