RE: [Flashcoders] SMIL xml parsing weirdness.

2006-09-20 Thread Merrill, Jason
It could be.  Can you get to root-layout width=480 ?

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 

-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Ryan Potter
Sent: Wednesday, September 20, 2006 6:06 PM
To: Flashcoders mailing list
Subject: [Flashcoders] SMIL xml parsing weirdness.

Hello list.

I have been working on parsing a smil xml file so that I can detect
bandwidth for an flv player.  I am getting the xml output from a PHP
script and I am using xml.sendAndLoad().  That all works just fine.  I
can get the xml object back and I can parse through it and get the
data
out with one strange exception.

When I try to parse the video node system-bitrate attribute I can't
get the value.  I have tried to turn it into a number, or a string
(which it is).  The weird thing is that if I trace it out it says it
is
NaN.  If I look at the type it is string.  Then why won't it let
me
read it???

The weird part is that if I change the name of the attribute to
bitrate or just about any other name it works.  Is it the dash in
the
attribute name?

Has anyone seen this behavior??

Thanks,
Ryan

Here is my smil file:

smil
  head
  meta base=rtmp://myflvserver/blahblah/flash/1/ /
  layout
  root-layout width=480 height=360 /
  /layout
  /head
  body
  switch
  video src=rl512k.flv
system-bitrate=512000/
  ref src=rl256k.flv/
  /switch
  /body
/smil

SMIL xml parsing weirdness.





___
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] SMIL xml parsing weirdness.

2006-09-20 Thread Claus Wahlers

Works for me:

var self:MovieClip = this;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function(ok:Boolean) { self.doStuff(ok); }
xml.load(soap.xml);
stop();

function doStuff(ok:Boolean):Void {
  var bitrate:String = 
xml.firstChild.firstChild.nextSibling.firstChild.firstChild.attributes[system-bitrate];

  trace(parseInt(bitrate));
}

Cheers,
Claus.

Ryan Potter wrote:


Hello list.

I have been working on parsing a smil xml file so that I can detect
bandwidth for an flv player.  I am getting the xml output from a PHP
script and I am using xml.sendAndLoad().  That all works just fine.  I
can get the xml object back and I can parse through it and get the data
out with one strange exception.  


When I try to parse the video node system-bitrate attribute I can't
get the value.  I have tried to turn it into a number, or a string
(which it is).  The weird thing is that if I trace it out it says it is
NaN.  If I look at the type it is string.  Then why won't it let me
read it???

The weird part is that if I change the name of the attribute to
bitrate or just about any other name it works.  Is it the dash in the
attribute name?

Has anyone seen this behavior??

Thanks, 
Ryan 


Here is my smil file:

smil
head
meta base=rtmp://myflvserver/blahblah/flash/1/ /
layout
root-layout width=480 height=360 /
/layout
/head
body
switch
video src=rl512k.flv
system-bitrate=512000/
ref src=rl256k.flv/
/switch
/body
/smil

SMIL xml parsing weirdness.


--
claus wahlers
côdeazur brasil
http://codeazur.com.br
___
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] SMIL xml parsing weirdness.

2006-09-20 Thread Ryan Potter
Yep.  That is one if the weird parts.  Everything comes across fine but that 
one attrubute. 

-Original Message- 
From: [EMAIL PROTECTED] on behalf of Merrill, Jason 
Sent: Wed 9/20/2006 4:17 PM 
To: Flashcoders mailing list 
Cc: 
Subject: RE: [Flashcoders] SMIL xml parsing weirdness.



It could be.  Can you get to root-layout width=480 ?

Jason Merrill
Bank of America
Learning  Organization Effectiveness - Technology Solutions






-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Ryan Potter
Sent: Wednesday, September 20, 2006 6:06 PM
To: Flashcoders mailing list
Subject: [Flashcoders] SMIL xml parsing weirdness.

Hello list.

I have been working on parsing a smil xml file so that I can detect
bandwidth for an flv player.  I am getting the xml output from a PHP
script and I am using xml.sendAndLoad().  That all works just fine.  I
can get the xml object back and I can parse through it and get the
data
out with one strange exception.

When I try to parse the video node system-bitrate attribute I can't
get the value.  I have tried to turn it into a number, or a string
(which it is).  The weird thing is that if I trace it out it says it
is
NaN.  If I look at the type it is string.  Then why won't it let
me
read it???

The weird part is that if I change the name of the attribute to
bitrate or just about any other name it works.  Is it the dash in
the
attribute name?

Has anyone seen this behavior??

Thanks,
Ryan

Here is my smil file:

smil
  head
  meta base=rtmp://myflvserver/blahblah/flash/1/ /
  layout
  root-layout width=480 height=360 /
  /layout
  /head
  body
  switch
  video src=rl512k.flv
system-bitrate=512000/
  ref src=rl256k.flv/
  /switch
  /body
/smil

SMIL xml parsing weirdness.





___
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


___
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] SMIL xml parsing weirdness.

2006-09-20 Thread Ryan Potter
Thanks Claus.
 
I coppied your code and it worked.  Yet it is almost the same as mine.
 
Thanks again.
Ryan
 

-Original Message- 
From: [EMAIL PROTECTED] on behalf of Claus Wahlers 
Sent: Wed 9/20/2006 4:20 PM 
To: Flashcoders mailing list 
Cc: 
Subject: Re: [Flashcoders] SMIL xml parsing weirdness.



Works for me:

var self:MovieClip = this;
var xml:XML = new XML();
xml.ignoreWhite = true;
xml.onLoad = function(ok:Boolean) { self.doStuff(ok); }
xml.load(soap.xml);
stop();

function doStuff(ok:Boolean):Void {
   var bitrate:String =

xml.firstChild.firstChild.nextSibling.firstChild.firstChild.attributes[system-bitrate];
   trace(parseInt(bitrate));
}

Cheers,
Claus.

Ryan Potter wrote:

 Hello list.

 I have been working on parsing a smil xml file so that I can detect
 bandwidth for an flv player.  I am getting the xml output from a PHP
 script and I am using xml.sendAndLoad().  That all works just fine.  I
 can get the xml object back and I can parse through it and get the 
data
 out with one strange exception. 

 When I try to parse the video node system-bitrate attribute I can't
 get the value.  I have tried to turn it into a number, or a string
 (which it is).  The weird thing is that if I trace it out it says it 
is
 NaN.  If I look at the type it is string.  Then why won't it let 
me
 read it???

 The weird part is that if I change the name of the attribute to
 bitrate or just about any other name it works.  Is it the dash in 
the
 attribute name?

 Has anyone seen this behavior??

 Thanks,
 Ryan

 Here is my smil file:

 smil
   head
   meta base=rtmp://myflvserver/blahblah/flash/1/ /
   layout
   root-layout width=480 height=360 /
   /layout
   /head
   body
   switch
   video src=rl512k.flv
 system-bitrate=512000/
   ref src=rl256k.flv/
   /switch
   /body
 /smil

 SMIL xml parsing weirdness.

--
claus wahlers
côdeazur brasil
http://codeazur.com.br
___
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] SMIL xml parsing weirdness.

2006-09-20 Thread Claus Wahlers


Everything comes across fine but that one attrubute. 


You probably did .attributes.system-bitrate.
Both .attributes.system and bitrate are undefined.
The - then converts it into a Number, thus NaN.

Cheers,
Claus.

--
claus wahlers
côdeazur brasil
http://codeazur.com.br
___
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