[Flashcoders] RE: Convert webcam image to line drawing

2009-08-26 Thread juju
Hi All, I'm using a Flash app to capture snapshots from a webcam. Question:
how do you convert the captured snapshot into a line drawing on the fly? Is
this possible with actionscript? Thanks, juju
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] spacing horizontal dynamic xml menu textfields

2009-08-26 Thread thomas horner
Hi Sid many thanks for the demo, have managed to incorporate this
successfully into what I was doing,  and evenly space the items, but am
struggling to space the items, 

as per line;

 runningX += textheader.textwidth + 20;  //20 is the offset or padding
between the items, however for some reason there is no gap and all the items
are butted up to one another?

many thanks, in advance , Thomas 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Sidney de
Koning - Funky Monkey Studios
Sent: 25 August 2009 16:44
To: Flash Coders List
Subject: RE: [Flashcoders] spacing horizontal dynamic xml menu textfields

He Thomas,

This stuff can be a bit difficult when making the transition.
Textfield has a really cool property called textWidth and textHeight, that
retruns only the width and height of the actual height :)

I have put comment in the code that explain it. Here is an example to demo:

var runningX:Number = 0;

// This is basically your data comming from XML
var itemsArr:Array = new Array(one, different length, piece of text,
last bit, evently spaced);

// It does not really matter what kind of loop you do, it is the way of
spacing them thst matters, so you can do your loop like you normally
would,
// here i'm just using an array to demonstrate
for (var index:int = 0; index  itemsArr.length ; index++) {

// You create items of any kind you like...
var _textheader:TextField = new TextField( );
_textheader.text = itemsArr[index];
_textheader.autoSize = TextFieldAutoSize.LEFT;

// You say that runningX is some value. since it was zero in the
beginning we are adding the value ontop of its current value (see line
below)
_textheader.x = runningX;
// ... And then you space them. You can use textWidth if using text
width
or plain width for object that extend from DisplayObjects or Sprites
etc...
runningX += _textheader.textWidth + 20; // +10 is the offset between
the
items you want ot use. Can be any number.
// And then you add the child to the display list so it becomes
visible.
addChild(_textheader);
}

Any questions, just ask :)

Cheers, Sid
 im using it with in the gaia framework do you know it? below is my loop
 and
 'navbut.x' is what im trying to find, i need to add all the widths of all
 the dynamic textfields sequentially and then space them out evenly
 horizontally ,

 im just totally stuck!


 for each (var section:XML in siteNav.section) {

   navbut = new navItem();


 navbut.label.autoSize=TextFieldAutoSize.LEFT;


   //Insert the menu text (li...@name reads the
 link's name attribute)
   navbut.label.text=secti...@name;
   //Assign an url to a menu item
   navbut.linkto=secti...@src;
   navbut.keepopen=secti...@keep;
   navbut.isclicked=secti...@highlight;

   //Insert the menu button to stage

   navbut.y=0;

   trace(total);

   navbut.x= ?;

   nav1.addChild(navbut);


   //Make the button look like a button (hand
 cursor)
   navbut.buttonMode=true;
   navbut.mouseChildren=false;
   navbut.alpha=0;
   navbut.name=secti...@url;
   TweenMax.to(navbut, 0.5, {alpha:1});
   //Add event handlers (used for animating the
 buttons)

 navbut.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);

 navbut.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
   navbut.addEventListener(MouseEvent.CLICK,
 mouseClickHandler);


   //trace(navbut.x);

   //Increment the menu button counter, so we
 know how many buttons there are
   i++;
   }
   }

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Sidney de
 Koning - Funky Monkey Studios
 Sent: 25 August 2009 15:52
 To: Flash Coders List
 Subject: RE: [Flashcoders] spacing horizontal dynamic xml menu textfields

 No problem :)
 This is using AS3. Where do you have problem with?

 Sid


 is this using as2 as im trying to do it in as3 so am a bit confused

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Sidney
 de
 Koning
 Sent: 25 August 2009 15:22
 To: Flash Coders List
 Subject: Re: [Flashcoders] spacing horizontal dynamic xml menu
 textfields

Re: [Flashcoders] spacing horizontal dynamic xml menu textfields

2009-08-26 Thread Steven Sacks

As I described on my forum post, you have to first put your items in an array.

var items:Array = [all, of, your, items];
var len:int= items.length;
var i:int;

Then, you do the following measurements:


// the right of the last item minus the left of the first item
var availableWidth:Number = items[len - 1].x + items[len -1].width - items[0].x;

// the total widths of all the items
var totalWidth:Number = 0;
i = len;
while (i--)
{
totalWidth += items[i].textWidth;
}

//Subtract the totalWidth from availableWidth to get the remainingWidth
var remainingWidth:Number = availableWidth - totalWidth;

// Divide remainingWidthby the number of items
var gapWidth:Number = remainingWidth / len;


// iterate through your array setting the x positions
// of the items based on the previous item's width and the gap.

var lastX:Number = 0;
for (i= 0; i  len; ++i)
{
items[i].x = lastX;
lastX = items[i].textWidth + gapWidth;
}

// That's all there is to it.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] spacing horizontal dynamic xml menu textfields

2009-08-26 Thread thomas horner
thanks steven, again! i had already managed to get the sids version going
inside my build, but was just getting problems with adding spacing between
them.  

for some reason now though all my buttons are acting as one when i
mouseOver, 



siteNav=IXml(assets.siteNav).xml;

var runningX:Number=0;

var padding:Number=50;

var itemsArr:Array=new Array(sitenav.secti...@name);

for (var index:int = 0; index  itemsArr.length;
index++) {

// You create items of any kind you like...
var navbut:navItem = new navItem( );
//assign the menu text from the navxml
navbut.label.text=itemsArr[index];

navbut.label.autoSize=TextFieldAutoSize.LEFT;

//Assign an url to a menu item
navbut.linkto=sitenav.secti...@src;

//read instructions fomr nav xml
navbut.keepopen=sitenav.secti...@keep;
navbut.isclicked=sitenav.secti...@highlight;

//Make the button look like a button (hand
cursor)
navbut.buttonMode=true;
navbut.mouseChildren=false;
navbut.alpha=0;
navbut.name=sitenav.secti...@url;
TweenMax.to(navbut, 0.5, {alpha:1});
//Add event handlers (used for animating the
buttons)

navbut.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);

navbut.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
navbut.addEventListener(MouseEvent.CLICK,
mouseClickHandler);


// You say that runningX is some value.
since it was zero in the beginning we are adding the value ontop of its
current value (see line below)
navbut.x=runningX;


// ... And then you space them. You can use
textWidth if using text width or plain width for object that extend from
DisplayObjects or Sprites etc...
runningX+=navbut.textWidth+padding;// +10 is
the offset between the items you want ot use. Can be any number.
// And then you add the child to the display
list so it becomes visible.
nav1.addChild(navbut);

trace(runningX);
}
}


function mouseClickHandler(e:Event):void {
}

function mouseOverHandler(e:Event):void {

TweenMax.to(e.target, 0.25, {tint:0x88})

 
}


function mouseOutHandler (e:Event):void {   
if (e.target.alpha  1) {
TweenMax.to(e.target, 0.25, { alpha:0.3 } )
} else {
//do nothing
}

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks
Sent: 26 August 2009 09:53
To: Flash Coders List
Subject: Re: [Flashcoders] spacing horizontal dynamic xml menu textfields

As I described on my forum post, you have to first put your items in an
array.

var items:Array = [all, of, your, items];
var len:int= items.length;
var i:int;

Then, you do the following measurements:


// the right of the last item minus the left of the first item
var availableWidth:Number = items[len - 1].x + items[len -1].width -
items[0].x;

// the total widths of all the items
var totalWidth:Number = 0;
i = len;
while (i--)
{
 totalWidth += items[i].textWidth;
}

//Subtract the totalWidth from availableWidth to get the remainingWidth
var remainingWidth:Number = availableWidth - totalWidth;

// Divide remainingWidthby the number of items
var gapWidth:Number = remainingWidth / len;


// iterate through your array setting the x positions
// of the items based on the previous item's width and the gap.

var lastX:Number = 0;
for (i= 0; i  len; ++i)
{
 items[i].x = lastX;
 lastX = items[i].textWidth + gapWidth;
}

// That's all there is to it.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] spacing horizontal dynamic xml menu textfields

2009-08-26 Thread Sidney de Koning

Hi Thomas,

In the nav item objects you are creating you can override the width  
and height functions, like so;


override public function get width( ):Number {
// The plus 4 makes it look better, change this if you like
return _myTextfield.textWidth + 4;
}

Then it will all have a different width.

Oh i just see that you have to use width since navItem is not a  
textfield, but uses a textfield so it does not have the textWidth  
funtion. Try that :)


runningX += navItem.width + 20;

Oh and just a (real important) note, it is very good practice to  
always create classes with a capital letter, so it then becomes  
NavItem instead of navItem.


Cheers,

Sid




On Aug 26, 2009, at 10:28 AM, thomas horner wrote:


Hi Sid many thanks for the demo, have managed to incorporate this
successfully into what I was doing,  and evenly space the items, but  
am

struggling to space the items,

as per line;

runningX += textheader.textwidth + 20;  //20 is the offset or padding
between the items, however for some reason there is no gap and all  
the items

are butted up to one another?

many thanks, in advance , Thomas

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of  
Sidney de

Koning - Funky Monkey Studios
Sent: 25 August 2009 16:44
To: Flash Coders List
Subject: RE: [Flashcoders] spacing horizontal dynamic xml menu  
textfields


He Thomas,

This stuff can be a bit difficult when making the transition.
Textfield has a really cool property called textWidth and  
textHeight, that

retruns only the width and height of the actual height :)

I have put comment in the code that explain it. Here is an example  
to demo:


var runningX:Number = 0;

// This is basically your data comming from XML
var itemsArr:Array = new Array(one, different length, piece of  
text,

last bit, evently spaced);

// It does not really matter what kind of loop you do, it is the way  
of

spacing them thst matters, so you can do your loop like you normally
would,
// here i'm just using an array to demonstrate
for (var index:int = 0; index  itemsArr.length ; index++) {

// You create items of any kind you like...
var _textheader:TextField = new TextField( );
_textheader.text = itemsArr[index];
_textheader.autoSize = TextFieldAutoSize.LEFT;

// You say that runningX is some value. since it was zero in the
beginning we are adding the value ontop of its current value (see line
below)
_textheader.x = runningX;
// ... And then you space them. You can use textWidth if using text
width
or plain width for object that extend from DisplayObjects or Sprites
etc...
runningX += _textheader.textWidth + 20; // +10 is the offset between
the
items you want ot use. Can be any number.
// And then you add the child to the display list so it becomes
visible.
addChild(_textheader);
}

Any questions, just ask :)

Cheers, Sid
im using it with in the gaia framework do you know it? below is my  
loop

and
'navbut.x' is what im trying to find, i need to add all the widths  
of all

the dynamic textfields sequentially and then space them out evenly
horizontally ,

im just totally stuck!


for each (var section:XML in siteNav.section) {

navbut = new navItem();


navbut.label.autoSize=TextFieldAutoSize.LEFT;


//Insert the menu text (li...@name reads the
link's name attribute)
navbut.label.text=secti...@name;
//Assign an url to a menu item
navbut.linkto=secti...@src;
navbut.keepopen=secti...@keep;
navbut.isclicked=secti...@highlight;

//Insert the menu button to stage

navbut.y=0;

trace(total);

navbut.x= ?;

nav1.addChild(navbut);


//Make the button look like a button (hand
cursor)
navbut.buttonMode=true;
navbut.mouseChildren=false;
navbut.alpha=0;
navbut.name=secti...@url;
TweenMax.to(navbut, 0.5, {alpha:1});
//Add event handlers (used for animating the
buttons)

navbut.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);

navbut.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
navbut.addEventListener(MouseEvent.CLICK,
mouseClickHandler);


//trace(navbut.x);

//Increment the menu button counter, so we
know how many buttons there are
i++;
 

RE: [Flashcoders] spacing horizontal dynamic xml menu textfields

2009-08-26 Thread thomas horner
Hi Sid for some reason that still doesn't work, it's not spacing the buttons
out,  it also seems to be treating all the buttons as just one button, and
when i trace out the value of runningX it only gives me one value,

any ideas, many thanks again, Thomas

siteNav=IXml(assets.siteNav).xml;

var runningX:Number=0;

var padding:Number=50;

var itemsArr:Array=new Array(sitenav.secti...@name);

for (var index:int = 0; index  itemsArr.length;
index++) {

// You create items of any kind you like...
var navbut:navItem = new navItem( );
//assign the menu text from the navxml
navbut.label.text=itemsArr[index];

navbut.label.autoSize=TextFieldAutoSize.LEFT;

//Assign an url to a menu item
navbut.linkto=sitenav.secti...@src;

//read instructions fomr nav xml
navbut.keepopen=sitenav.secti...@keep;
navbut.isclicked=sitenav.secti...@highlight;

//Make the button look like a button (hand
cursor)
navbut.buttonMode=true;
navbut.mouseChildren=false;
navbut.alpha=0;
navbut.name=sitenav.secti...@url;
TweenMax.to(navbut, 0.5, {alpha:1});
//Add event handlers (used for animating the
buttons)

navbut.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);

navbut.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
navbut.addEventListener(MouseEvent.CLICK,
mouseClickHandler);


// You say that runningX is some value.
since it was zero in the beginning we are adding the value ontop of its
current value (see line below)
navbut.x=runningX;


// ... And then you space them. You can use
textWidth if using text width or plain width for object that extend from
DisplayObjects or Sprites etc...
runningX+=navbut.width + 10;// +10 is the
offset between the items you want ot use. Can be any number.
// And then you add the child to the display
list so it becomes visible.
nav1.addChild(navbut);

trace(runningX);
}
}

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Sidney de
Koning
Sent: 26 August 2009 10:42
To: Flash Coders List
Subject: Re: [Flashcoders] spacing horizontal dynamic xml menu textfields

Hi Thomas,

In the nav item objects you are creating you can override the width  
and height functions, like so;

override public function get width( ):Number {
// The plus 4 makes it look better, change this if you like
return _myTextfield.textWidth + 4;
}

Then it will all have a different width.

Oh i just see that you have to use width since navItem is not a  
textfield, but uses a textfield so it does not have the textWidth  
funtion. Try that :)

runningX += navItem.width + 20;

Oh and just a (real important) note, it is very good practice to  
always create classes with a capital letter, so it then becomes  
NavItem instead of navItem.

Cheers,

Sid




On Aug 26, 2009, at 10:28 AM, thomas horner wrote:

 Hi Sid many thanks for the demo, have managed to incorporate this
 successfully into what I was doing,  and evenly space the items, but  
 am
 struggling to space the items,

 as per line;

 runningX += textheader.textwidth + 20;  //20 is the offset or padding
 between the items, however for some reason there is no gap and all  
 the items
 are butted up to one another?

 many thanks, in advance , Thomas

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of  
 Sidney de
 Koning - Funky Monkey Studios
 Sent: 25 August 2009 16:44
 To: Flash Coders List
 Subject: RE: [Flashcoders] spacing horizontal dynamic xml menu  
 textfields

 He Thomas,

 This stuff can be a bit difficult when making the transition.
 Textfield has a really cool property called textWidth and  
 textHeight, that
 retruns only the width and height of the actual height :)

 I have put comment in the code that explain it. Here is an example  
 to demo:

 var runningX:Number = 0;

 // This is basically your data comming from XML
 var itemsArr:Array = new Array(one, different length, piece of  
 text,
 last bit, evently spaced);

 // It does not really matter 

Re: [Flashcoders] Reading text from PDF files or show PDF pages into Flash Player.

2009-08-26 Thread Omar Fouad
That is for generating PDFs on the server...

On Wed, Aug 26, 2009 at 7:05 AM, juju jlee...@gmail.com wrote:

 Hi Omar, take a look at AlivePDF.

 http://alivepdf.bytearray.org/

 HTH, juju


 On Tue, Aug 25, 2009 at 10:32 PM, Omar Fouad omarfouad@gmail.com
 wrote:

  So,
 
  I'm creating an e-Library that consents users to read text from a pdf
  source
  and display it into a dynamic Text Field in Flash. But I am experiencing
 a
  problem which is that RTL languages (in my case it is ARABIC) are not
  displayed correctly. This is the famous Flash Problem since years I know,
  but today I felt frustrated when I uploaded an Arabic written document to
  scribd.com. iPaper just popped out and showed me the text wrapped and
  correctly formatted. I thought that is an image of the page but the text
 is
  perfectly selectable.
 
  I've tried the Text Layout Framework for FP 10 but it seems to be
  unsupported yet as in I can't find any documentation online.
 
  I'm wondering if there is something that would permit me to show pdf
 files
  directly in the Flash Player, instead of tying to fetch the text within
 it.
 
 
 
  Please help, I'm frustrated.
  --
  Omar M. Fouad - Adobe™ Flash© Platform Developer
  www.omar-fouad.net
  Cellular: (+20) 1011.88.534 / (+20) 1444.37.175
 
 
  This e-mail and any attachment is for authorised use by the intended
  recipient(s) only. It may contain proprietary material, confidential
  information and/or be subject to legal privilege. It should not be
 copied,
  disclosed to, retained or used by, any other party. If you are not an
  intended recipient then please promptly delete this e-mail and any
  attachment and all copies and inform the sender. Thank you.
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




-- 
Omar M. Fouad - Adobe™ Flash© Platform Developer
www.omar-fouad.net
Cellular: (+20) 1011.88.534 / (+20) 1444.37.175


This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an
intended recipient then please promptly delete this e-mail and any
attachment and all copies and inform the sender. Thank you.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] empty XML Attributes..

2009-08-26 Thread Glen Pike

Hi,

   I am having problems parsing some XML config files and testing for 
empty attributes.  There is an example xml below.
  
   Problem is that I am asking for the following:


   _co...@instance
  
   Which is returning a value, but I am not sure what type of value.  
Should this return null, or an empty string or something??


   var _conf:XML =screen name=Library 
swf=LibraryScreenTest.swf 
symbol=com.robothespian.screen.LibraryScreen config=library.xml /
  


Glen
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] spacing horizontal dynamic xml menu textfields

2009-08-26 Thread thomas horner
thanks steven but where in this do i populate my textfield in order to
calculate the widths?

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steven Sacks
Sent: 26 August 2009 09:53
To: Flash Coders List
Subject: Re: [Flashcoders] spacing horizontal dynamic xml menu textfields

As I described on my forum post, you have to first put your items in an
array.

var items:Array = [all, of, your, items];
var len:int= items.length;
var i:int;

Then, you do the following measurements:


// the right of the last item minus the left of the first item
var availableWidth:Number = items[len - 1].x + items[len -1].width -
items[0].x;

// the total widths of all the items
var totalWidth:Number = 0;
i = len;
while (i--)
{
 totalWidth += items[i].textWidth;
}

//Subtract the totalWidth from availableWidth to get the remainingWidth
var remainingWidth:Number = availableWidth - totalWidth;

// Divide remainingWidthby the number of items
var gapWidth:Number = remainingWidth / len;


// iterate through your array setting the x positions
// of the items based on the previous item's width and the gap.

var lastX:Number = 0;
for (i= 0; i  len; ++i)
{
 items[i].x = lastX;
 lastX = items[i].textWidth + gapWidth;
}

// That's all there is to it.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] empty XML Attributes..

2009-08-26 Thread Kenneth Kawamoto

XMLList, and you can check its length().

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Glen Pike wrote:

Hi,

   I am having problems parsing some XML config files and testing for 
empty attributes.  There is an example xml below.

 Problem is that I am asking for the following:

   _co...@instance
 Which is returning a value, but I am not sure what type of value.  
Should this return null, or an empty string or something??


   var _conf:XML =screen name=Library 
swf=LibraryScreenTest.swf 
symbol=com.robothespian.screen.LibraryScreen config=library.xml /
 
Glen

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] empty XML Attributes..

2009-08-26 Thread Glen Pike

Aha, I see now - bit of a waste of code too.

And who's bright idea was it to use length for Strings and Arrays, but 
length() for XML / e4x?


Kenneth Kawamoto wrote:

XMLList, and you can check its length().

Kenneth Kawamoto
http://www.materiaprima.co.uk/

Glen Pike wrote:

Hi,

   I am having problems parsing some XML config files and testing for 
empty attributes.  There is an example xml below.

 Problem is that I am asking for the following:

   _co...@instance
 Which is returning a value, but I am not sure what type of 
value.  Should this return null, or an empty string or something??


   var _conf:XML =screen name=Library 
swf=LibraryScreenTest.swf 
symbol=com.robothespian.screen.LibraryScreen config=library.xml /
 
Glen

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] empty XML Attributes..

2009-08-26 Thread Ian Thomas
On Wed, Aug 26, 2009 at 12:27 PM, Glen Pikeg...@engineeredarts.co.uk wrote:
 Aha, I see now - bit of a waste of code too.

Yeah, I agree, it's overly verbose.

 And who's bright idea was it to use length for Strings and Arrays, but
 length() for XML / e4x?

It's because in E4X:

someNode.length

Means get this node:

someNode
   length/
/someNode

:-)

The brackets () are the only way to work out what you mean...

Ian
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] help with frame navigation and xml

2009-08-26 Thread Isaac Alves
Hi,

I'd like to have a function that tells a MovieClip to go to a specific
frame and then in this frame, look for a scpecific tag in an XML file,
based on the frame's label, and then take some text (a  bunch of
actually) that is in the XML node and put it on a TextField.

For example, clicking on a Next Frame button it will go to the next
frame (which has a label intro) of the movieclip and then search
content.xml for the tag that contains the attribute name equal to
intro and then put the content of the @text node into an empty
TextField that is already positioned in this intro frame.

Am I obligated to have the code in this specfic frame?

I'm doing it because if I have too much text within textfields in an
FLA file it becomes incredibly lagged and therefore impossible to
work.

I've tried to use the event ENTER.FRAME to do that but it rendered the
SWF lagged and consomming way too much memory...

Help !! Thanks in advance!!
Isaac
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] help with frame navigation and xml

2009-08-26 Thread Merrill, Jason
You don't need any code inside the clip, I think you're approaching this
the wrong way around.  Why have the XML node based on the frame's label?
You already know it's going to intro since you have to tell the
MovieClip to go there. Do something like this instead:

var destination:String = intro;
myClip.gotoAndPlay(destination);
myClip.myTextField.text = myXML.myNode.(@destination);

Hope that helps,

Jason Merrill 

Bank of  America   Global Learning 
Shared Services Solutions Development 

Monthly meetings on making the most of the Adobe Flash Platform -
presented by bank associates, Adobe engineers, and outside experts in
the borader multimedia community - join the Bank of America Flash
Platform Community  (note: this is for Bank of America employees only)




-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Isaac
Alves
Sent: Wednesday, August 26, 2009 8:17 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] help with frame navigation and xml

Hi,

I'd like to have a function that tells a MovieClip to go to a specific
frame and then in this frame, look for a scpecific tag in an XML file,
based on the frame's label, and then take some text (a  bunch of
actually) that is in the XML node and put it on a TextField.

For example, clicking on a Next Frame button it will go to the next
frame (which has a label intro) of the movieclip and then search
content.xml for the tag that contains the attribute name equal to
intro and then put the content of the @text node into an empty
TextField that is already positioned in this intro frame.

Am I obligated to have the code in this specfic frame?

I'm doing it because if I have too much text within textfields in an
FLA file it becomes incredibly lagged and therefore impossible to
work.

I've tried to use the event ENTER.FRAME to do that but it rendered the
SWF lagged and consomming way too much memory...

Help !! Thanks in advance!!
Isaac
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] help with frame navigation and xml

2009-08-26 Thread Merrill, Jason
Or could be this if your text is in the text node:

var destination:String = intro;
myClip.gotoAndPlay(destination);
myClip.myTextField.text = myXML.myNode.(@destination).text();


Jason Merrill 

Bank of  America   Global Learning 
Shared Services Solutions Development 

Monthly meetings on making the most of the Adobe Flash Platform -
presented by bank associates, Adobe engineers, and outside experts in
the borader multimedia community - join the Bank of America Flash
Platform Community  (note: this is for Bank of America employees only)





-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Merrill,
Jason
Sent: Wednesday, August 26, 2009 8:26 AM
To: Flash Coders List
Subject: RE: [Flashcoders] help with frame navigation and xml

You don't need any code inside the clip, I think you're approaching this
the wrong way around.  Why have the XML node based on the frame's label?
You already know it's going to intro since you have to tell the
MovieClip to go there. Do something like this instead:

var destination:String = intro;
myClip.gotoAndPlay(destination);
myClip.myTextField.text = myXML.myNode.(@destination);

Hope that helps,

Jason Merrill 

Bank of  America   Global Learning 
Shared Services Solutions Development 

Monthly meetings on making the most of the Adobe Flash Platform -
presented by bank associates, Adobe engineers, and outside experts in
the borader multimedia community - join the Bank of America Flash
Platform Community  (note: this is for Bank of America employees only)




-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Isaac
Alves
Sent: Wednesday, August 26, 2009 8:17 AM
To: flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] help with frame navigation and xml

Hi,

I'd like to have a function that tells a MovieClip to go to a specific
frame and then in this frame, look for a scpecific tag in an XML file,
based on the frame's label, and then take some text (a  bunch of
actually) that is in the XML node and put it on a TextField.

For example, clicking on a Next Frame button it will go to the next
frame (which has a label intro) of the movieclip and then search
content.xml for the tag that contains the attribute name equal to
intro and then put the content of the @text node into an empty
TextField that is already positioned in this intro frame.

Am I obligated to have the code in this specfic frame?

I'm doing it because if I have too much text within textfields in an
FLA file it becomes incredibly lagged and therefore impossible to
work.

I've tried to use the event ENTER.FRAME to do that but it rendered the
SWF lagged and consomming way too much memory...

Help !! Thanks in advance!!
Isaac
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] AWS calls with signature... not working

2009-08-26 Thread Eric E. Dolecki
I tried this class out:
http://blog.promethe.net/2009/08/24/amazon-web-services-rest-queries-signature-in-actionscript-3/

I compiled a SWC out of FB and hooked up the crypto stuff from as3corelib,
and when I provide my key and secret key, I get this returned XML (Error
opening URL):


?xml version=1.0?
ItemSearchErrorResponse
xmlns=http://ecs.amazonaws.com/doc/2009-01-06/;ErrorCodeSignatureDoesNotMatch/CodeMessageThe
request signature we calculated does not match the signature you
provided. Check your AWS Secret Access Key and signing method. Consult
the service documentation for
details./Message/ErrorRequestIDeceb7bee-8c4e-4e67-827b-6b5a2c14cf3a/RequestID/ItemSearchErrorResponse


My secret key and my key are correct in my call.

Has anyone found any problems with the supplied URL's class?


-- 
http://ericd.net
Interactive design and development
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] FLV export - size(w, h) vs data rate

2009-08-26 Thread jared stanley
cool. I've heard that scaling up works the processor more, but haven't
found any substantative evidence.




On Tue, Aug 25, 2009 at 9:36 PM, Peter Bpete...@googlemail.com wrote:
 I did a lot of work around optimising videos about a year and a half
 back. For my money, I'd say you get better results by encoding at a
 smaller resolution and scaling up i Flash than by trying to squeeze
 the data rate down, so I'd say No.2.
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] determining whether or not xml has children

2009-08-26 Thread thomas horner
have created a  dynamic menu, kind off, with a hell of a lot of help and
have positioned it evenly. i am trying to determine when a person clicks on
the inital button whether that branch of the xml has children and therefore
bring up the corresponding submenu for that section.

 

below is my code; and below that my xml file.

 

thanks in advance!

 

public function createnavItem():void {

//var i:uint=0;

 

 

//var navbut:navItem;

 

 
siteNav=IXml(assets.siteNav).xml;

 

var runningX:Number=0;

 

var itemsArr:Array=new
Array(sitenav.secti...@name);

 

 

var
xmlLabels:xmllist=sitenav.secti...@name;



 
trace(sitenav.section.subsecti...@name);

  

  

var labelsArray:Array /* of
String */ = new Array(xmlLabels.length);

 

var t:int=0;

 

for each (var
labelText:String in xmlLabels) {

 
labelsArray[t++]=labelText;

 

var
navbut:navItem = new navItem( );

 

 
navbut.label.text=labelText;

 
navbut.label.autoSize=TextFieldAutoSize.LEFT;

 

 
navbut.linkto=sitenav.secti...@src;

 

//read
instructions fomr nav xml

 
navbut.keepopen=sitenav.secti...@keep;

 
navbut.isclicked=sitenav.secti...@highlight;

 

//Make the
button look like a button (hand cursor)

 
navbut.buttonMode=true;

 
navbut.mouseChildren=false;

 
navbut.alpha=0;

 
navbut.name=sitenav.secti...@url;

 
TweenMax.to(navbut, 0.5, {alpha:1});

 

 
navbut.x=runningX;

 

 
runningX+=navbut.width+10;

 

 
navbut.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);

 
navbut.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);

 
navbut.addEventListener(MouseEvent.CLICK, mouseClickHandler);

 
nav1.addChild(navbut);

 

 

}

 

}

 

 

 

function
mouseClickHandler(e:MouseEvent):void {

TweenMax.to(e.target, 0.25,
{tint:0xF19E8B});



var page:String =
e.target.label.text;







 

}

 

 

 

my xml file;

 

 

site 

section name=about src=index/nav/about keep=false/

section name=hers src=index/nav/hers keep=false 

subsection name=small
src=index/nav/hers/smalltheirs keep=true /

subsection name=medium
src=index/nav/hers/mediumtheirs keep=true /   

subsection name=large
src=index/nav/hers/largetheirs keep=true /

/section

section name=his src=index/nav/his keep=false 


subsection name=small src=index/nav/his/smalltheirs
keep=true /

subsection name=medium src=index/nav/his/mediumtheirs
keep=true /

subsection name=large src=index/nav/his/largetheirs
keep=true /

/section 

section name=theirs src=index/nav/theirs keep=false 

subsection name=small src=index/nav/theirs/smalltheirs
keep=true /

subsection name=medium
src=index/nav/theirs/mediumtheirs keep=true /

subsection name=large src=index/nav/theirs/largetheirs
keep=true /

/section

section name=contact src=index/nav/contact keep=true
/

/site



 

 

 

 

 

 

 

 

 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Job Fair - CIM (Comcast Interactive Media)

2009-08-26 Thread Schumacher, Steven
Hi, can I post this ad?

 

C'MON AND GET CIM.

CIM JOB FAIR

 

Comcast Interactive Media (CIM) is a division of Comcast Corporation
dedicated to developing online and cross-platform entertainment and
media businesses.

 

We're expanding interactive, broadcast and mobile technologies for a
global media revolution-and we want the best and the brightest to join
us.

 

Calling all: 

* Web Developers 

* Database Administrators 

* Software Engineers

* System Administrators

 

Thursday, September 24th 

By Invitation Only

Additional details will be provided to selected invitees a week prior to
the event.

 

Submit your resume by September 17th to: 

cim_j...@comcast.com

 

 Comcast.net | Fancast | Fandango | Plaxo | X-Platform | Daily Candy

(c)2009 Comcast Interactive Media * All Rights Reserved

 

 

 

Steven Schumacher

Comcast Interactive Media

Recruiter

 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Centering field text vertically

2009-08-26 Thread Hudson Ansley
Anyone have a technique for centering a TextField vertically
(accurately)? other than converting to bitmap...
I can get the textHeight, but I don't know how to get the amount of
empty space between the top of the TextField and the actual text. This
varies with font, style, etc, and of course the characters in the
text. Looked at TextLineMetrics, afaict, it does not give a value for
the distance from the top of the field to the top of the text, and I
suppose I might be able to use getCharBoundaries, but then I'd have to
combine the results from all the characters, which seems a bit over
the top... also, must be Flash 9


Regards,
Hudson
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: Centering field text vertically

2009-08-26 Thread Hudson Ansley
I realize that if TextLineMetrics had a y property as well as the
x, that would do it for me, so I wonder why that was left off...
Regards,
Hudson

On Wed, Aug 26, 2009 at 4:39 PM, Hudson Ansleyhudsonans...@gmail.com wrote:
 Anyone have a technique for centering a TextField vertically
 (accurately)? other than converting to bitmap...
 I can get the textHeight, but I don't know how to get the amount of
 empty space between the top of the TextField and the actual text. This
 varies with font, style, etc, and of course the characters in the
 text. Looked at TextLineMetrics, afaict, it does not give a value for
 the distance from the top of the field to the top of the text, and I
 suppose I might be able to use getCharBoundaries, but then I'd have to
 combine the results from all the characters, which seems a bit over
 the top... also, must be Flash 9


 Regards,
 Hudson

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Job Fair - CIM (Comcast Interactive Media)

2009-08-26 Thread Peter B
 Hi, can I post this ad?

Is it too late to say 'no'?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Flash video playback issues

2009-08-26 Thread Eric Woods
Hi All,

I would dearly appreciaty any light anyone could shed on this issue - I have 
run into a couple of Flash bugs that have stumped me for quite a while, and my 
deadline is aproaching fast.

Essentially, I would like to play back 3 reasonably high res videos (On2 VP6-S) 
simultaneously in one Flash App (using flash.video, netstream and netconnect - 
code only). Unfortunately, when I do this, the video playback drops a lot of 
frames, however, CPU usage does not go much above 50% - spread over both cores. 
I'm using a Core2Duo. If I play the same 3 videos simultaneously in 3 separate 
flash apps (FP10), they play much better (and use close to 100% CPU). I even 
tried creating it as an AIR app with 3 separate windows (NativeWindow), but 
that made little difference. I have lodged this as a bug via the Flash Bug 
Reporting System (http://bugs.adobe.com/jira/browse/FP-2341).

And yes, I do need to be doing something as crazy as this - it is for a pretty 
cool kiosk app, so I know what hardware will be used (and it has a good 
Graphics Card).

One promising workaround appeared to be playing back a single NetStream in 
multiple Video instances, as it is NetStream that does the decoding, so I could 
decode once and present it in 3 places. Two of my video objects are actually 
the same flv (on different monitors), so there would be a 33% saving right 
there. If necessary, I could encode both flvs into a single 1920x1200 flv (I've 
checked - it would play back ok) and then use video.mask to show the relevant 
bits.
However, another bug has been reported at 
http://bugs.adobe.com/jira/browse/FP-920 saying this does not work - Video in 
the object that last called attachNetStream(ns) will play, all others will 
freeze. They do mention a workaround that gets both videos to play - reset the 
size of freezed videos on ENTER_FRAME event. However, I cannot get this 
workaround to work - my first video is empty (not even frozen).

So there are a couple of things I would love any feedback on. Firstly, if 
anyone has insights on how I could get this to work. Secondly, if anyone could 
try the multiple videos on one netStream with workaround code below (simply 
copy, paste and point to a relevant flv) and let me know if it works and the 
versions of software they used, I'd be very thankful.

---Code Begins-
import flash.events.Event;
import flash.media.Video;
import flash.net.NetConnection;
import flash.net.NetStream;

showRedrawRegions(true); // both the placeholders and the entire window redraws 
every frame.
// When only video1 is attached, only video1's region is redrawing
// When both videos are attached, both video's regions are redrawing, BUT 
video1 is empty.
trace (Capabilities.version =  + Capabilities.version); // = WIN 10,0,22,91 
// in Flash CS4 10.0.2

//var nc:NetConnection = new NetConnection( null ); // Got Eror: 1137: 
Incorrect number of arguments. Expected no more than 0.
var nc:NetConnection = new NetConnection();
nc.connect(null);
// Connect nc here ...? Unnecessary in this case?
var ns:NetStream = new NetStream(nc);
ns.client = new Object(); // Simplest way to deal with cuePoints and metaData 
by doing nothing. For more, see 
http://blogs.adobe.com/pdehaan/2006/07/playing_back_flvs_with_actions_1.html
var stream:String = test.flv;
var video1:Video = new Video(); // Defaults to size of 320x240
var video2:Video = new Video(); // Defaults to size of 320x240
video2.x = 320;
addChild(video1);
addChild(video2);

ns.play(stream);

video1.attachNetStream(ns);
video2.attachNetStream(ns);
// PROBLEM: Video in the object that last called attachNetStream(ns) will play, 
all others will freeze.
// See WORKAROUND below for solution:


//WORKAROUND to stop the first split stream from freezing:
addEventListener(Event.ENTER_FRAME, onEnterFrame);
function onEnterFrame(e:Event){
video1.width = 320;
video1.height = 240;
trace (video1.videoWidth =  + video1.videoWidth);
trace (video2.videoWidth =  + video2.videoWidth);
// When only video1 is attached, video1.videoWidth = 1920, video2.videoWidth = 0
// When both videos are attached, video1.videoWidth = 0, video2.videoWidth = 
1920
}
---Code Ends-

Letting me know what exact versions of the following software was used would 
help a lot:
- Windows/OS (e.g. XP SP3).
- App code was written in. (e.g. Flash CS4 IDE 10.0.2, Flash Develop 3.0.1).
- App code was compiled in. (e.g. Flash CS4 IDE 10.0.2, Flex SDK 3.4.0.6955).
- Type and Version of Flash Player used (e.g. Standalone Debug Flash Player 
v10,0,22,91).
The versions I used are listed above.


Lastly, for what it is work, I found three interesting/informative results, but 
they didn't help me:
- When only video1 is attached, video1.videoWidth = 1920, video2.videoWidth = 0
  When both videos are attached, video1.videoWidth = 0, video2.videoWidth = 1920
- When only video1 is attached, only video1's region is redrawing
  When both videos are attached, both video's regions 

Re: [Flashcoders] empty XML Attributes..

2009-08-26 Thread Steven Sacks
You will get runtime errors when attempting to access an attribute that isn't 
there.  The proper way to check for existence and length of an attribute is to 
use the .attributes() syntax as such:


if (node.attribute(instance).length()  0)
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] empty XML Attributes..

2009-08-26 Thread Taka Kojima
The Top Level XML class actually has a function, called hasOwnProperty that
exists for this purpose.

However, to answer your question exactly, it returns a value of undefined.
This is not null or  it is it's own return type, as this relates to XML
(which by definition is an object) and objects are dynamic. Null would only
be returned if you've already declared a variable but it has no value,
undefined is returned for something that you have not declared.

So in addition to Steven's method, you could also do:

if (node.hasOwnProperty(@instance))

or

if (no...@instance != undefined)

- Taka

On Wed, Aug 26, 2009 at 6:06 PM, Steven Sacks flash...@stevensacks.netwrote:

 You will get runtime errors when attempting to access an attribute that
 isn't there.  The proper way to check for existence and length of an
 attribute is to use the .attributes() syntax as such:

 if (node.hasOwnProperty(instance).length()  0)

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] empty XML Attributes..

2009-08-26 Thread Steven Sacks
hasOwnProperty does not tell you whether it has a length, though.  It only 
checks for existence.


And for some reason, it looks like you modified my code when quoting me:

 if (node.hasOwnProperty(instance).length()  0)

I didn't write that code, which would error since a Boolean doesn't have 
length().

I wrote this:

if (node.attribute(instance).length()  0)

Which not only works, but is the recommended way of writing this code by Adobe 
themselves directly from the E4X documentation.


You're suggesting to write more code to do the same thing. Why should anyone 
write more code to do the same thing?

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] RE: Flash speech-to-text

2009-08-26 Thread Chris Foster
Hi Juju,

You can't currently do speech-to-text in Actionscript. It's not that
people are choosing not to answer you, there just aren't any useful
solutions to your question.

C:

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of juju
Sent: Thursday, 27 August 2009 2:20 PM
To: Flash Coders List
Subject: Re: [Flashcoders] RE: Flash speech-to-text

I wonder, if I offered $50 for an answer, how many replies with actual
useful information would be posted to answer this question... :) Or
$100?

On Wed, Aug 26, 2009 at 12:02 PM, juju jlee...@gmail.com wrote:

 Hi Jonathan, I'm trying to do speech to text. AFAIK Flash API cannot 
 record the microphone input. It can listen for the sound level of the 
 microphone input, and you could create interactivity with this (like 
 shooting a bullet by clapping your hands). But how do you record a 
 person's voice and convert this to text when you can't record the 
 microphone input with Flash? Has anyone tried Ribbit to create voice 
 interactive applications, like speech to text and voice-recognition? 
 Would like to get some guidance before going into Ribbit development.

 I've tried SpeechXML but this needs SAPI 5 and TMK it only works on a 
 local machine. I'm looking for speech-to-text solution and 
 voice-recording/analysis that can be done via a Flash RIA. Am hoping 
 that there's some actionscript library out there that gives this
functionality.
 Or hopefully, the next version of Flash/Actionscript will have this 
 functionality.

 Thanks, juju


 On Tue, Aug 25, 2009 at 8:48 PM, jonathan howe
jonathangh...@gmail.comwrote:

 Are you trying to do text-to-speech or speech-to-text? The latter is 
 better searched for under 'voice recognition'.
 Seems like there are a bunch of results for the former:
 http://www.bing.com/search?q=flash+text-to-speechform=QBLHqs=n
 -jonathanhttp://www.bing.com/search?q=flash+text-to-speechform=QBLH
 qs=n%0A-jonathan


 On Tue, Aug 25, 2009 at 5:30 AM, juju jlee...@gmail.com wrote:

  HI All, I searched Google and the forums but could not find an 
  answer,
 hope
  you actionscript sages can help. There's plenty of text to speech 
  solutions, but how do you do Speech-to-text with Flash? Can you do 
  speech-to-text
 with
  ribbit http://www.ribbit.com/?
 
  Thanks, juju
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 -jonathan howe
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
This e-mail, including any attached files, may contain confidential and 
privileged information for the sole use of the intended recipient.  Any review, 
use, distribution, or disclosure by others is strictly prohibited.  If you are 
not the intended recipient (or authorized to receive information for the 
intended recipient), please contact the sender by reply e-mail and delete all 
copies of this message.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] RE: Flash speech-to-text

2009-08-26 Thread juju
I wonder, if I offered $50 for an answer, how many replies with actual
useful information would be posted to answer this question... :) Or $100?

On Wed, Aug 26, 2009 at 12:02 PM, juju jlee...@gmail.com wrote:

 Hi Jonathan, I'm trying to do speech to text. AFAIK Flash API cannot record
 the microphone input. It can listen for the sound level of the microphone
 input, and you could create interactivity with this (like shooting a bullet
 by clapping your hands). But how do you record a person's voice and convert
 this to text when you can't record the microphone input with Flash? Has
 anyone tried Ribbit to create voice interactive applications, like speech to
 text and voice-recognition? Would like to get some guidance before going
 into Ribbit development.

 I've tried SpeechXML but this needs SAPI 5 and TMK it only works on a local
 machine. I'm looking for speech-to-text solution and
 voice-recording/analysis that can be done via a Flash RIA. Am hoping that
 there's some actionscript library out there that gives this functionality.
 Or hopefully, the next version of Flash/Actionscript will have this
 functionality.

 Thanks, juju


 On Tue, Aug 25, 2009 at 8:48 PM, jonathan howe jonathangh...@gmail.comwrote:

 Are you trying to do text-to-speech or speech-to-text? The latter is
 better
 searched for under 'voice recognition'.
 Seems like there are a bunch of results for the former:
 http://www.bing.com/search?q=flash+text-to-speechform=QBLHqs=n
 -jonathanhttp://www.bing.com/search?q=flash+text-to-speechform=QBLHqs=n%0A-jonathan


 On Tue, Aug 25, 2009 at 5:30 AM, juju jlee...@gmail.com wrote:

  HI All, I searched Google and the forums but could not find an answer,
 hope
  you actionscript sages can help. There's plenty of text to speech
  solutions,
  but how do you do Speech-to-text with Flash? Can you do speech-to-text
 with
  ribbit http://www.ribbit.com/?
 
  Thanks, juju
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 



 --
 -jonathan howe
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] RE: Flash speech-to-text

2009-08-26 Thread juju
Thanks Chris, not even with Ribbit? That's what I really want to know: can
Ribbit + Flash provide speech to text capability. Thanks, juju

On Thu, Aug 27, 2009 at 12:32 PM, Chris Foster 
cfos...@catalystinteractive.com.au wrote:

 Hi Juju,

 You can't currently do speech-to-text in Actionscript. It's not that
 people are choosing not to answer you, there just aren't any useful
 solutions to your question.

 C:

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of juju
 Sent: Thursday, 27 August 2009 2:20 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] RE: Flash speech-to-text

 I wonder, if I offered $50 for an answer, how many replies with actual
 useful information would be posted to answer this question... :) Or
 $100?

 On Wed, Aug 26, 2009 at 12:02 PM, juju jlee...@gmail.com wrote:

  Hi Jonathan, I'm trying to do speech to text. AFAIK Flash API cannot
  record the microphone input. It can listen for the sound level of the
  microphone input, and you could create interactivity with this (like
  shooting a bullet by clapping your hands). But how do you record a
  person's voice and convert this to text when you can't record the
  microphone input with Flash? Has anyone tried Ribbit to create voice
  interactive applications, like speech to text and voice-recognition?
  Would like to get some guidance before going into Ribbit development.
 
  I've tried SpeechXML but this needs SAPI 5 and TMK it only works on a
  local machine. I'm looking for speech-to-text solution and
  voice-recording/analysis that can be done via a Flash RIA. Am hoping
  that there's some actionscript library out there that gives this
 functionality.
  Or hopefully, the next version of Flash/Actionscript will have this
  functionality.
 
  Thanks, juju
 
 
  On Tue, Aug 25, 2009 at 8:48 PM, jonathan howe
 jonathangh...@gmail.comwrote:
 
  Are you trying to do text-to-speech or speech-to-text? The latter is
  better searched for under 'voice recognition'.
  Seems like there are a bunch of results for the former:
  http://www.bing.com/search?q=flash+text-to-speechform=QBLHqs=n
  -jonathanhttp://www.bing.com/search?q=flash+text-to-speechform=QBLH
  qs=n%0A-jonathan
 
 
  On Tue, Aug 25, 2009 at 5:30 AM, juju jlee...@gmail.com wrote:
 
   HI All, I searched Google and the forums but could not find an
   answer,
  hope
   you actionscript sages can help. There's plenty of text to speech
   solutions, but how do you do Speech-to-text with Flash? Can you do
   speech-to-text
  with
   ribbit http://www.ribbit.com/?
  
   Thanks, juju
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
 
 
 
  --
  -jonathan howe
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 This e-mail, including any attached files, may contain confidential and
 privileged information for the sole use of the intended recipient.  Any
 review, use, distribution, or disclosure by others is strictly prohibited.
  If you are not the intended recipient (or authorized to receive information
 for the intended recipient), please contact the sender by reply e-mail and
 delete all copies of this message.

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] RE: Flash speech-to-text

2009-08-26 Thread Chris Foster
Dunno for sure Juju, but while you wait for any other answers on this
list... 

http://developer.ribbit.com/download

Sign up, download the SDK, view the samples, and join the forums... I
imagine it wouldn't take more than a couple of hours to find the right
people to answer in detail.

C: 

-Original Message-
From: flashcoders-boun...@chattyfig.figleaf.com
[mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of juju
Sent: Thursday, 27 August 2009 3:01 PM
To: Flash Coders List
Subject: Re: [Flashcoders] RE: Flash speech-to-text

Thanks Chris, not even with Ribbit? That's what I really want to know:
can Ribbit + Flash provide speech to text capability. Thanks, juju

On Thu, Aug 27, 2009 at 12:32 PM, Chris Foster 
cfos...@catalystinteractive.com.au wrote:

 Hi Juju,

 You can't currently do speech-to-text in Actionscript. It's not that 
 people are choosing not to answer you, there just aren't any useful 
 solutions to your question.

 C:

 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of juju
 Sent: Thursday, 27 August 2009 2:20 PM
 To: Flash Coders List
 Subject: Re: [Flashcoders] RE: Flash speech-to-text

 I wonder, if I offered $50 for an answer, how many replies with actual

 useful information would be posted to answer this question... :) Or 
 $100?

 On Wed, Aug 26, 2009 at 12:02 PM, juju jlee...@gmail.com wrote:

  Hi Jonathan, I'm trying to do speech to text. AFAIK Flash API cannot

  record the microphone input. It can listen for the sound level of 
  the microphone input, and you could create interactivity with this 
  (like shooting a bullet by clapping your hands). But how do you 
  record a person's voice and convert this to text when you can't 
  record the microphone input with Flash? Has anyone tried Ribbit to 
  create voice interactive applications, like speech to text and
voice-recognition?
  Would like to get some guidance before going into Ribbit
development.
 
  I've tried SpeechXML but this needs SAPI 5 and TMK it only works on 
  a local machine. I'm looking for speech-to-text solution and 
  voice-recording/analysis that can be done via a Flash RIA. Am hoping

  that there's some actionscript library out there that gives this
 functionality.
  Or hopefully, the next version of Flash/Actionscript will have this 
  functionality.
 
  Thanks, juju
 
 
  On Tue, Aug 25, 2009 at 8:48 PM, jonathan howe
 jonathangh...@gmail.comwrote:
 
  Are you trying to do text-to-speech or speech-to-text? The latter 
  is better searched for under 'voice recognition'.
  Seems like there are a bunch of results for the former:
  http://www.bing.com/search?q=flash+text-to-speechform=QBLHqs=n
  -jonathanhttp://www.bing.com/search?q=flash+text-to-speechform=QB
  LH
  qs=n%0A-jonathan
 
 
  On Tue, Aug 25, 2009 at 5:30 AM, juju jlee...@gmail.com wrote:
 
   HI All, I searched Google and the forums but could not find an 
   answer,
  hope
   you actionscript sages can help. There's plenty of text to speech

   solutions, but how do you do Speech-to-text with Flash? Can you 
   do speech-to-text
  with
   ribbit http://www.ribbit.com/?
  
   Thanks, juju
   ___
   Flashcoders mailing list
   Flashcoders@chattyfig.figleaf.com 
   http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
 
 
 
  --
  -jonathan howe
  ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
 
 
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 This e-mail, including any attached files, may contain confidential 
 and privileged information for the sole use of the intended recipient.

 Any review, use, distribution, or disclosure by others is strictly
prohibited.
  If you are not the intended recipient (or authorized to receive 
 information for the intended recipient), please contact the sender by 
 reply e-mail and delete all copies of this message.

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] RE: Flash speech-to-text

2009-08-26 Thread Steven Sacks

This is how you record sound:
http://www.getmicrophone.com/?p=69

If you're asking how to convert sound waves into speech, dude, what?  Do you 
realize how challenging speech recognition is?  Wait, why am I asking you this? 
 If you did, you wouldn't be asking people on a Flash list how to do it, as if 
it's some piece of code somebody can copy and paste or a few links that will 
tell you the secret formula.


Most speech to text programs are based on the Hidden Markov models. In speech 
recognition, the hidden Markov model would output a sequence of n-dimensional 
real-valued vectors (with n being a small integer, such as 10), outputting one 
of these every 10 milliseconds. The vectors would consist of cepstral 
coefficients, which are obtained by taking a Fourier transform of a short time 
window of speech and decorrelating the spectrum using a cosine transform, then 
taking the first (most significant) coefficients. The hidden Markov model will 
tend to have in each state a statistical distribution that is a mixture of 
diagonal covariance Gaussians which will give a likelihood for each observed 
vector. Each word, or (for more general speech recognition systems), each 
phoneme, will have a different output distribution; a hidden Markov model for a 
sequence of words or phonemes is made by concatenating the individual trained 
hidden Markov models for the separate words and phonemes.


There you have it. That's a high level overview of speech to text. Do you 
understand anything in that paragraph?  Probably not.


Unless you're willing to study and put in the time to figure out how to do this, 
you're not going to figure it out.  Nobody is going to point you in the right 
direction because this is a very niche knowledge area and none of these people 
are on Flashcoders.  They're at universities working on their doctorates or 
working for the military or government, or some private company and they're not 
sharing this information.  This is the stuff patents are made of.


So either give up now (because what you want is some easy solution and there 
isn't one) or start doing real research, learn some serious Calculus, become an 
expert on on sound, speech, waveforms, and then figure out how to port all of 
this into Flash, which, in all likelihood, lacks the performance to actually 
achieve this.


You'll probably have to do it on the server, passing the sound to the server as 
an mp3 file, and then pass the text back. That's the only thing I can think of 
that would possibly be able to do this.


Prove me wrong.  If you pull this off, you could probably build an entire 
company around your technology.

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders