Re: [Flashcoders] access to drawing API information via ActionScript

2006-11-08 Thread Ben

 You can see an example of what I'm talking about here:
 http://www.imagination3.com/


now THAT, my friend, is EXACTLY what I'm talking about!

That's a beautiful example, it looks really well designed. With its various
tools, eg the 'stamper', it goes way beyond what I was looking for.

I guess I'll have to try to do similar, I was just hoping to avoid building
my own 'IDE' (not trivial) when there is already one lying around inside
Flash...


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread Tom Rhodes
Have a google for actionscript SVG file readers, i seem to remember 
people achieving the effect you are after like that, i'm pretty sure 
exactly what you are asking is impossible though...


Ben wrote:

Hi Flashcoders

is it possible to write ActionScript code to gain access to
lines/fills/shapes drawn on the stage using the standard Flash API?

eg
open a new document
draw a line on the stage
draw another line
add some more lines, curves, add some filled shapes, rectangles, circles etc

now is it possible to write ActionScript that will translate the drawing you
created above into AS-style:

moveTo(x1,y1);
lineTo(x2,y2);
curveTo(cx,cy, x3,y3);
beginFill();
lineTo(x4,y4);
etc etc

I want to be able to trace out a fairly complex drawing using all the Flash
tools, but then control how it gets drawn entirely from ActionScript.

Thanks! Ben.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


  



--

__

Tom Rhodes - Developer / Composer
Wheelhouse Creative Ltd, 2 Albion Place,
Hammersmith, London. W6 0QT
Tel: 020 8748 4466  Fax: 020 8748 4850
www.wheelhousecreative.co.uk
__

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread Janis Radins

No you cannt access curve data throught AS.
Only thing thats possible would be to save all drawing activity in memory
for later reproduction.
That wouldnt be that hard actually.

2006/11/7, Ben [EMAIL PROTECTED]:


Hi Flashcoders

is it possible to write ActionScript code to gain access to
lines/fills/shapes drawn on the stage using the standard Flash API?

eg
open a new document
draw a line on the stage
draw another line
add some more lines, curves, add some filled shapes, rectangles, circles
etc

now is it possible to write ActionScript that will translate the drawing
you
created above into AS-style:

moveTo(x1,y1);
lineTo(x2,y2);
curveTo(cx,cy, x3,y3);
beginFill();
lineTo(x4,y4);
etc etc

I want to be able to trace out a fairly complex drawing using all the
Flash
tools, but then control how it gets drawn entirely from ActionScript.

Thanks! Ben.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread slangeberg

Are you asking if you can somehow save out all the commands to a text file?

now is it possible to write ActionScript that will translate the drawing you
created above into AS-style:

You see, you would have been using AS to perform all those commands in the
first place. ie. lineTo, moveTo... etc.

Scott


On 11/7/06, Ben [EMAIL PROTECTED] wrote:


Hi Flashcoders

is it possible to write ActionScript code to gain access to
lines/fills/shapes drawn on the stage using the standard Flash API?

eg
open a new document
draw a line on the stage
draw another line
add some more lines, curves, add some filled shapes, rectangles, circles
etc

now is it possible to write ActionScript that will translate the drawing
you
created above into AS-style:

moveTo(x1,y1);
lineTo(x2,y2);
curveTo(cx,cy, x3,y3);
beginFill();
lineTo(x4,y4);
etc etc

I want to be able to trace out a fairly complex drawing using all the
Flash
tools, but then control how it gets drawn entirely from ActionScript.

Thanks! Ben.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--

: : ) Scott
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread Ben

 You see, you would have been using AS to perform all those commands in the
 first place. ie. lineTo, moveTo... etc.

 Scott


the lines are first created directly onto the stage using the Flash IDE (not
ActionScript) eg the line, circle, box tools from the tools palette on the
left side of the workspace.

then these shapes are (somehow - this is the bit I don't know) converted
into their API equivalents (lineTo, curveTo, beginFill, endFill etc)


I'm sure it would be possible to write a drawing program using the API
which allows the user to create lines and fills and edit them, but this
seems like a HUGE waste of time since there is already an absolutely perfect
drawing program inside Flash itself...

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread slangeberg


I want to be able to trace out a fairly complex drawing using all the
Flash tools, but then control how it gets drawn entirely from ActionScript.



Now I understand you want to take drawings from IDE and trace them in
ActionScript. What is your  goal with this?  You want to stylize your
drawings on the fly? I'm just wondering if there wouldn't be logical
constraints, much less technical.

Scott


On 11/7/06, Ben [EMAIL PROTECTED] wrote:



 You see, you would have been using AS to perform all those commands in
the
 first place. ie. lineTo, moveTo... etc.

 Scott


the lines are first created directly onto the stage using the Flash IDE
(not
ActionScript) eg the line, circle, box tools from the tools palette on the
left side of the workspace.

then these shapes are (somehow - this is the bit I don't know) converted
into their API equivalents (lineTo, curveTo, beginFill, endFill etc)


I'm sure it would be possible to write a drawing program using the API
which allows the user to create lines and fills and edit them, but this
seems like a HUGE waste of time since there is already an absolutely
perfect
drawing program inside Flash itself...

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--

: : ) Scott
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [SPAM]Re: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread Ben

  I want to be able to trace out a fairly complex drawing using all the
  Flash tools, but then control how it gets drawn entirely from
 ActionScript.


 Now I understand you want to take drawings from IDE and trace them in
 ActionScript. What is your  goal with this?  You want to stylize your
 drawings on the fly? I'm just wondering if there wouldn't be logical
 constraints, much less technical.

exactly!

the goal is to build up a complex drawing step by step under the control of
ActionScript. So the style can be modified, it can be influenced by the user
while its being drawn, the animation can be synchronised with external
events, reversed, speeded up, slowed down, paused, branched etc.

ActionScript is GREAT for the control. But the IDE is GREAT for all the
initial inputting of lines, curves and shapes (with its ability to edit
lines, use guide layers, snap to objects, align objects, adjust control
points etc).

but can ActionScript gain access to this IDE-stored info...???




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [SPAM]Re: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread slangeberg

You're going to need a fairly complex system to set this up!

Even if you could use AS to trace the artwork in the IDE (which I doubt),
you'd need a system in place to figure out where you are in the drawing.

reversed, speeded up, slowed down, paused, branched etc.




Can you imagine how hard it would be to guess where you are in the artwork
generation process to emulate these things? Say you have a shape with a
bunch of sub-shapes that have sub-shapes that are overlapped by some other
stuff. How would you know in when in the code that you need to render each
item?

Not trying to slam you, but to help you think about this critically.

Here's one thing to consider: Have you ever seen this done anywhere else? If
so, that would be a good starting point to figure out how it was done. If
not, there may be a good reason!

Scott

On 11/7/06, Ben [EMAIL PROTECTED] wrote:



  I want to be able to trace out a fairly complex drawing using all the
  Flash tools, but then control how it gets drawn entirely from
 ActionScript.


 Now I understand you want to take drawings from IDE and trace them in
 ActionScript. What is your  goal with this?  You want to stylize your
 drawings on the fly? I'm just wondering if there wouldn't be logical
 constraints, much less technical.

exactly!

the goal is to build up a complex drawing step by step under the control
of
ActionScript. So the style can be modified, it can be influenced by the
user
while its being drawn, the animation can be synchronised with external
events, reversed, speeded up, slowed down, paused, branched etc.

ActionScript is GREAT for the control. But the IDE is GREAT for all the
initial inputting of lines, curves and shapes (with its ability to edit
lines, use guide layers, snap to objects, align objects, adjust control
points etc).

but can ActionScript gain access to this IDE-stored info...???




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





--

: : ) Scott
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread R�kos Attila

B is it possible to write ActionScript code to gain access to
B lines/fills/shapes drawn on the stage using the standard Flash API?

If you need to parse a drawing created in the Flash IDE and convert it
to an AS script which creates the same result, but using Drawing API
methods, then use JSFL. Through JSFL you have full access to the
content of an FLA document and I guess that it is not too complicated
to translate JSFL objects into AS methods. I never tried such but it
looks possible to me.

  Attila

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread Steven Sacks | BLITZ
I think he wants to take what some artist drew in Flash and code it to
draw at run-time using the drawing API.  I'm not sure what benefit that
has except to make designers have to code their drawings instead of draw
their drawings and I don't know (m)any designers who would like to do
that.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread Ben
 I think he wants to take what some artist drew in Flash and code it to
 draw at run-time using the drawing API.  I'm not sure what benefit that
 has except to make designers have to code their drawings instead of draw
 their drawings and I don't know (m)any designers who would like to do
 that.

the benefit is that the animation can be controlled programatically. For
example it can be made interactive or synchronised with external events, or
it could respond to, or invite responses from, other Flash movies. In short,
it can contain programming logic. The benefits are many and varied.

It has nothing to do with making designers do anything, I don't mind how
designers produce their work.

Thanks anyway, I appreciate the time you guys give to these issues.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread Robert r. Sanders

I'd second two earlier opinions, plus a few other ideas.

1. You could get a JSFL component written to translate the FLA content 
to a different structure.


2. You could look at the SVG renders for Flash/SWF; then the drawing 
could be in a different tool and exported or saved as SVG.


3. With extra work the drawing could be done as a set of internal 
movieclip objects which could then be manipulated by actionscript with 
out having to use the drawing API.


Ben wrote:

You see, you would have been using AS to perform all those commands in the
first place. ie. lineTo, moveTo... etc.

Scott




the lines are first created directly onto the stage using the Flash IDE (not
ActionScript) eg the line, circle, box tools from the tools palette on the
left side of the workspace.

then these shapes are (somehow - this is the bit I don't know) converted
into their API equivalents (lineTo, curveTo, beginFill, endFill etc)


I'm sure it would be possible to write a drawing program using the API
which allows the user to create lines and fills and edit them, but this
seems like a HUGE waste of time since there is already an absolutely perfect
drawing program inside Flash itself...

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread Joseph Balderson
Ben is not asking designers to code their drawings, and I'm pretty sure 
you cannot access the IDE freeform pencil's actions in JSFL, I tried it 
once. Unless you somehow manage to get a tablet PC connected to the line 
drawing tool in Flash but build continuous lines, then yes, /that/ is 
reproducible in JSFL, in which case you'd just copy-paste the history 
panel, or a record the strokes using a JSFL application which would spit 
out some AS conversion. If having a drawing composed of connected lines 
is the look you're going for. A Davis (as in Josh), maybe, but it 
certainly won't be a Monet.


What you need Ben is to create a freeform drawing tool, in Flash, that 
captures continuous line data drawn in the app using the Drawing API in 
such a way that the lines are so small that each stroke appears 
freeform, I've seen it done. As you draw it records and converts the 
drawing to a data format of some kind, it really isn't important what 
(custom XML format, SVG, array sets, whatever) as long as your 
reciprocal 'player' app can read the data. You can output the results to 
a text window to cut-and paste into a text data file, or you can use the 
FileReference API plus some backend script to create a downloadable 
text/XML data file to use with your 'player'.


You would then need to create a 'player' app that reads the data and 
replicates the drawing's creation, at either a hardcoded or user-defined 
speed, to 'animate-in' the final drawing, all using the Drawing API.


But you would have to have your artist re-create any drawing using this 
tool, in order to capture his pencil strokes and record them to the data 
model.


Taking an existing drawing and recompositing it in actionscript can 
theoretically be done if you convert the swf vector image to SVG and 
then read it/re-create it using an SVG parser connected to your player 
app. The only thing is, because you'd most likely wind up with thousands 
of minute line segments, you'd have to handle their re-creation using an 
algorithm, not in the order they were created, which would be unknown. 
At best this would yield a relatively intuitive re-creation but would 
still look machine-generated. Worst-case scenario the strokes would form 
in no particular order, and in linear left-right-top-bottom or radial 
pattern best case scenario.


So really, your only option for effect realism is to create a drawing 
tool and a matched player for the job.


Or maybe find a drawing application that outputs to time-coded SVG (if 
such a thing exists), and read it back to the player app.



__

Joseph Balderson, Flash Platform Developer
http://www.joeflash.ca | 416-768-0987
Writing partner, Community MX | http://www.communitymx.com
Consultant, New Toronto Group | http://www.newyyz.com

Ben wrote:

I think he wants to take what some artist drew in Flash and code it to
draw at run-time using the drawing API.  I'm not sure what benefit that
has except to make designers have to code their drawings instead of draw
their drawings and I don't know (m)any designers who would like to do
that.


the benefit is that the animation can be controlled programatically. For
example it can be made interactive or synchronised with external events, or
it could respond to, or invite responses from, other Flash movies. In short,
it can contain programming logic. The benefits are many and varied.

It has nothing to do with making designers do anything, I don't mind how
designers produce their work.

Thanks anyway, I appreciate the time you guys give to these issues.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread Joseph Balderson

 You would then need to create a 'player' app that reads the data and
 replicates the drawing's creation, at either a hardcoded or user-defined
 speed, to 'animate-in' the final drawing, all using the Drawing API.

You can see an example of what I'm talking about here:
http://www.imagination3.com/

1. Make a drawing.
2. Email it to yourself.
3. Click the link in the email.
4. Watch it recreate the drawing.

__

Joseph Balderson, Flash Platform Developer
http://www.joeflash.ca | 416-768-0987
Writing partner, Community MX | http://www.communitymx.com
Consultant, New Toronto Group | http://www.newyyz.com

Joseph Balderson wrote:
Ben is not asking designers to code their drawings, and I'm pretty sure 
you cannot access the IDE freeform pencil's actions in JSFL, I tried it 
once. Unless you somehow manage to get a tablet PC connected to the line 
drawing tool in Flash but build continuous lines, then yes, /that/ is 
reproducible in JSFL, in which case you'd just copy-paste the history 
panel, or a record the strokes using a JSFL application which would spit 
out some AS conversion. If having a drawing composed of connected lines 
is the look you're going for. A Davis (as in Josh), maybe, but it 
certainly won't be a Monet.


What you need Ben is to create a freeform drawing tool, in Flash, that 
captures continuous line data drawn in the app using the Drawing API in 
such a way that the lines are so small that each stroke appears 
freeform, I've seen it done. As you draw it records and converts the 
drawing to a data format of some kind, it really isn't important what 
(custom XML format, SVG, array sets, whatever) as long as your 
reciprocal 'player' app can read the data. You can output the results to 
a text window to cut-and paste into a text data file, or you can use the 
FileReference API plus some backend script to create a downloadable 
text/XML data file to use with your 'player'.


You would then need to create a 'player' app that reads the data and 
replicates the drawing's creation, at either a hardcoded or user-defined 
speed, to 'animate-in' the final drawing, all using the Drawing API.


But you would have to have your artist re-create any drawing using this 
tool, in order to capture his pencil strokes and record them to the data 
model.


Taking an existing drawing and recompositing it in actionscript can 
theoretically be done if you convert the swf vector image to SVG and 
then read it/re-create it using an SVG parser connected to your player 
app. The only thing is, because you'd most likely wind up with thousands 
of minute line segments, you'd have to handle their re-creation using an 
algorithm, not in the order they were created, which would be unknown. 
At best this would yield a relatively intuitive re-creation but would 
still look machine-generated. Worst-case scenario the strokes would form 
in no particular order, and in linear left-right-top-bottom or radial 
pattern best case scenario.


So really, your only option for effect realism is to create a drawing 
tool and a matched player for the job.


Or maybe find a drawing application that outputs to time-coded SVG (if 
such a thing exists), and read it back to the player app.



__

Joseph Balderson, Flash Platform Developer
http://www.joeflash.ca | 416-768-0987
Writing partner, Community MX | http://www.communitymx.com
Consultant, New Toronto Group | http://www.newyyz.com

Ben wrote:

I think he wants to take what some artist drew in Flash and code it to
draw at run-time using the drawing API.  I'm not sure what benefit that
has except to make designers have to code their drawings instead of draw
their drawings and I don't know (m)any designers who would like to do
that.


the benefit is that the animation can be controlled programatically. For
example it can be made interactive or synchronised with external 
events, or
it could respond to, or invite responses from, other Flash movies. In 
short,

it can contain programming logic. The benefits are many and varied.

It has nothing to do with making designers do anything, I don't mind how
designers produce their work.

Thanks anyway, I appreciate the time you guys give to these issues.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



Re: [Flashcoders] access to drawing API information via ActionScript

2006-11-07 Thread Joseph Balderson

 1. Make a drawing.
 2. Email it to yourself.
 3. Click the link in the email.
 4. Watch it recreate the drawing.

or just press Replay, DOH! :)

if you move your mouse very fast while drawing you can see that it's 
actually creating lines...

__

Joseph Balderson, Flash Platform Developer
http://www.joeflash.ca | 416-768-0987
Writing partner, Community MX | http://www.communitymx.com
Consultant, New Toronto Group | http://www.newyyz.com

Joseph Balderson wrote:

  You would then need to create a 'player' app that reads the data and
  replicates the drawing's creation, at either a hardcoded or user-defined
  speed, to 'animate-in' the final drawing, all using the Drawing API.

You can see an example of what I'm talking about here:
http://www.imagination3.com/

1. Make a drawing.
2. Email it to yourself.
3. Click the link in the email.
4. Watch it recreate the drawing.

__

Joseph Balderson, Flash Platform Developer
http://www.joeflash.ca | 416-768-0987
Writing partner, Community MX | http://www.communitymx.com
Consultant, New Toronto Group | http://www.newyyz.com

Joseph Balderson wrote:
Ben is not asking designers to code their drawings, and I'm pretty 
sure you cannot access the IDE freeform pencil's actions in JSFL, I 
tried it once. Unless you somehow manage to get a tablet PC connected 
to the line drawing tool in Flash but build continuous lines, then 
yes, /that/ is reproducible in JSFL, in which case you'd just 
copy-paste the history panel, or a record the strokes using a JSFL 
application which would spit out some AS conversion. If having a 
drawing composed of connected lines is the look you're going for. A 
Davis (as in Josh), maybe, but it certainly won't be a Monet.


What you need Ben is to create a freeform drawing tool, in Flash, that 
captures continuous line data drawn in the app using the Drawing API 
in such a way that the lines are so small that each stroke appears 
freeform, I've seen it done. As you draw it records and converts the 
drawing to a data format of some kind, it really isn't important what 
(custom XML format, SVG, array sets, whatever) as long as your 
reciprocal 'player' app can read the data. You can output the results 
to a text window to cut-and paste into a text data file, or you can 
use the FileReference API plus some backend script to create a 
downloadable text/XML data file to use with your 'player'.


You would then need to create a 'player' app that reads the data and 
replicates the drawing's creation, at either a hardcoded or 
user-defined speed, to 'animate-in' the final drawing, all using the 
Drawing API.


But you would have to have your artist re-create any drawing using 
this tool, in order to capture his pencil strokes and record them to 
the data model.


Taking an existing drawing and recompositing it in actionscript can 
theoretically be done if you convert the swf vector image to SVG and 
then read it/re-create it using an SVG parser connected to your player 
app. The only thing is, because you'd most likely wind up with 
thousands of minute line segments, you'd have to handle their 
re-creation using an algorithm, not in the order they were created, 
which would be unknown. At best this would yield a relatively 
intuitive re-creation but would still look machine-generated. 
Worst-case scenario the strokes would form in no particular order, and 
in linear left-right-top-bottom or radial pattern best case scenario.


So really, your only option for effect realism is to create a drawing 
tool and a matched player for the job.


Or maybe find a drawing application that outputs to time-coded SVG (if 
such a thing exists), and read it back to the player app.



__

Joseph Balderson, Flash Platform Developer
http://www.joeflash.ca | 416-768-0987
Writing partner, Community MX | http://www.communitymx.com
Consultant, New Toronto Group | http://www.newyyz.com

Ben wrote:

I think he wants to take what some artist drew in Flash and code it to
draw at run-time using the drawing API.  I'm not sure what benefit that
has except to make designers have to code their drawings instead of 
draw

their drawings and I don't know (m)any designers who would like to do
that.


the benefit is that the animation can be controlled programatically. For
example it can be made interactive or synchronised with external 
events, or
it could respond to, or invite responses from, other Flash movies. In 
short,

it can contain programming logic. The benefits are many and varied.

It has nothing to do with making designers do anything, I don't mind how
designers produce their work.

Thanks anyway, I appreciate the time you guys give to these issues.

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive: