Re: [Flashcoders] Determining sound sample rate?

2008-04-22 Thread ben gomez farrell
Thanks!  That should get me on my way.  This, in combination with the 
last reply about getting raw ID3, should help me out.

So thanks to both of ya.
ben

Juan Pablo Califano wrote:

Hi, as far as I know, the info you're looking for is not in the ID3 tags
(which are not mandatory by the way).

An mp3 file is a formed by an arbitrary number of "frames", which carry
information about "chunks" of the sound stream; each one contains a header
and the actual audio data. There's no "global" file header, but if you're
looking for the sample rate, I think it's fair to assume that the sample
rate stored in the header of the first frame is the sample rate of the whole
file (that might not be true if you were looking for, say, the bitrate).

So, I think you can get that data if you read the file directly in binary
format, look for the first frame, and read the bits indicating the sample
rate.

A good reference for the format spec:
http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html

And this graphic may help to "visualize" the meaning of each bit in a frame
header:
http://upload.wikimedia.org/wikipedia/commons/0/01/Mp3filestructure.svg

By the way, if you want to inspect the raw file, you should use an
hexadecimal editor, you won't get far with a text editor. There are many
available, some of them are free, like Hexplorer, which is what I've been
using for a while.
( you can find it here: http://artemis.wszib.edu.pl/~mdudek/ )

I don't know much about the mp3 format specifically, but I have worked a bit
with raw files, so if you want to give it a try and need some help, maybe I
can lend you a hand.


Cheers
Juan Pablo Califano


2008/4/21, Steven Sacks <[EMAIL PROTECTED]>:
  

Ben has an open source project on Google code that is the evolution of his
old classes called Metaphile.

http://code.google.com/p/metaphile/

___
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] Determining sound sample rate?

2008-04-22 Thread Juan Pablo Califano
Hi, as far as I know, the info you're looking for is not in the ID3 tags
(which are not mandatory by the way).

An mp3 file is a formed by an arbitrary number of "frames", which carry
information about "chunks" of the sound stream; each one contains a header
and the actual audio data. There's no "global" file header, but if you're
looking for the sample rate, I think it's fair to assume that the sample
rate stored in the header of the first frame is the sample rate of the whole
file (that might not be true if you were looking for, say, the bitrate).

So, I think you can get that data if you read the file directly in binary
format, look for the first frame, and read the bits indicating the sample
rate.

A good reference for the format spec:
http://mpgedit.org/mpgedit/mpeg_format/MP3Format.html

And this graphic may help to "visualize" the meaning of each bit in a frame
header:
http://upload.wikimedia.org/wikipedia/commons/0/01/Mp3filestructure.svg

By the way, if you want to inspect the raw file, you should use an
hexadecimal editor, you won't get far with a text editor. There are many
available, some of them are free, like Hexplorer, which is what I've been
using for a while.
( you can find it here: http://artemis.wszib.edu.pl/~mdudek/ )

I don't know much about the mp3 format specifically, but I have worked a bit
with raw files, so if you want to give it a try and need some help, maybe I
can lend you a hand.


Cheers
Juan Pablo Califano


2008/4/21, Steven Sacks <[EMAIL PROTECTED]>:
>
> Ben has an open source project on Google code that is the evolution of his
> old classes called Metaphile.
>
> http://code.google.com/p/metaphile/
>
> ___
> 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] Using insertBefore to insert nodes into an extant XML document

2008-04-22 Thread matt stuehler
All,

Sorry in advance - this is probably a trivial question, but I'm trying
to figure out how to create an XML node, and insert it into a specific
location in an XML document.

It looks like the insertBefore method is what I need.

However, the problem is that it only seems to work if I create the XML
structure one node at a time (using createElement). For example, this
works:

my_xml = new XML("");
my_xml.firstChild.appendChild(my_xml.createElement("FIRSTBASE"));
my_xml.firstChild.appendChild(my_xml.createElement("THIRDBASE"));
my_xml.firstChild.insertBefore(my_xml.createElement("SECONDBASE"),my_xml.firstChild.firstChild.nextSibling);
trace(my_xml.toString());

this produces:

""


However, this doesn't:

var my_xml = new XML();
my_xml.parseXML("");
my_xml.insertBefore(my_xml.createElement("SECONDBASE"),my_xml.firstChild.firstChild.nextSibling);
trace(my_xml.toString());

As far as I can tell, these two code samples are identical.

The practical application - I'm loading a large document received from
a webservice (In other words, I haven't created each node using
createElement).
I'd then like to locate a specific node deep in the hierarchy, and try
to insert a new node before it.

I can confirm that the node I'm using for the second parameter of
insertBefore exists (using trace()), so I don't think that's the cause
of the problem.

Many thanks in advance for any help or insight!

Cheers,
Matt Stuehler
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] MouseOver Scaling of elements in Tile List

2008-04-22 Thread Glen Pike

Hi,

   You can also adjust the x & y properties of the event.target to 
compensate for the scaling down - e.g.  work out the scaled width & 
height then offset x & y to suit...


   For Flex the Total Training Advanced Visual Programming DVD / online 
course covers this, although I am not sure it's in the free preview.


   http://totaltraining.com/prod/adobe/flex.asp

   They do Flash courses as well, but I have not done these.

   For Flash - I have not done it to be honest, but the Devnet site has 
some promising stuff:


   http://www.adobe.com/devnet/flash/quickstart/tilelist_component_as3/

   You could also make a custom CellRenderer to handle this - each 
thing in the tilelist will be rendered by your custom class - look at 
the example above.


   HTH

   Glen

anuj sharma wrote:

Hi Glen
Thanks for the reply. Your solution worked great but in my case it is not
fulfilling because my video thumbnails are in the tileList container and it
is scaling towards downward direction. As you said they are scaling, I might
need to look for different way. If you know any good resource for scaling in
the container please let me know
Thanks

On Tue, Apr 22, 2008 at 2:13 AM, Glen Pike <[EMAIL PROTECTED]>
wrote:

  

the "target" property of the MouseEvent is the thing that you are hovering
over so:

e.target.scaleX = 1.5;
e.target.scaleY = 1.5;

The target is a property of the Event class so I think most events work
like this...

Glen

anuj sharma wrote:



Hi Guys
Can anyone help me in scaling TileList elements on mouse hover. Below is
my
code. What I did is I put 16 SWfs in Tile List uisng XML and it is
working
fine. On Double click of thumbnails I would be able to load videos too.
I am
successful in getting the index of selected item  for click and double
click
events by  using selectedIndex property. My problem is that I want
thumbnails to expand and contract with the mouse over and mouse out. I
am
not successful in getting the index of hovered thumbnail and I am
messing up
things because when i used my logic(which is not right :-)) for scale X
and
scale Y it is going to scale the whole tileList component but not the
hovered thumbnail. i am not sure how to target to get the index of
hovered
thumbnail in the tileList.
Please help me out
Thanks for your help.
Anuj


//Defining Metadata for loading external thumbnails
var picsXML:XML = 
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   ;


var myTileList:TileList=new TileList();
var TileListLength:Number;
myTileList.dataProvider = new DataProvider(picsXML);
myTileList.direction = ScrollBarDirection.HORIZONTAL;
myTileList.rowHeight = 115;
myTileList.columnWidth = 200;
myTileList.width = 800;
myTileList.height = 135;
TileListLength=myTileList.length;
myTileList.move(52,500);
addChild(myTileList);

//Getting the index of the thumbnails
myTileList.doubleClickEnabled=true;
myTileList.addEventListener(MouseEvent.MOUSE_OVER,scale);
myTileList.addEventListener(MouseEvent.MOUSE_OUT,scaleBack);


function scale(e:MouseEvent):void
{
myTileList.scaleX=1.5;
cmyTileList.scaleY=1.5;
}

function scaleBack(e:MouseEvent):void
{
myTileList.scaleX=1;
cmyTileList.scaleY=1;
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders




  

--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
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


  


--

Glen Pike
01326 218440
www.glenpike.co.uk 

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


Re: [Flashcoders] MouseOver Scaling of elements in Tile List

2008-04-22 Thread Bob Wohl
So you're looking to scale 1.5 and move the math -x and -y to scale upwards
uniformed? You may want to look at creating a thumbnail class that is
completely separate from the tile list and do your scaling and positioning
via event.target properties (thumbnail, x/y etc).


B.

On Tue, Apr 22, 2008 at 10:10 AM, anuj sharma <[EMAIL PROTECTED]> wrote:

> Hi Glen
> Thanks for the reply. Your solution worked great but in my case it is not
> fulfilling because my video thumbnails are in the tileList container and
> it
> is scaling towards downward direction. As you said they are scaling, I
> might
> need to look for different way. If you know any good resource for scaling
> in
> the container please let me know
> Thanks
>
> On Tue, Apr 22, 2008 at 2:13 AM, Glen Pike <[EMAIL PROTECTED]>
> wrote:
>
> > the "target" property of the MouseEvent is the thing that you are
> hovering
> > over so:
> >
> > e.target.scaleX = 1.5;
> > e.target.scaleY = 1.5;
> >
> > The target is a property of the Event class so I think most events work
> > like this...
> >
> > Glen
> >
> > anuj sharma wrote:
> >
> > > Hi Guys
> > > Can anyone help me in scaling TileList elements on mouse hover. Below
> is
> > > my
> > > code. What I did is I put 16 SWfs in Tile List uisng XML and it is
> > > working
> > > fine. On Double click of thumbnails I would be able to load videos
> too.
> > > I am
> > > successful in getting the index of selected item  for click and double
> > > click
> > > events by  using selectedIndex property. My problem is that I want
> > > thumbnails to expand and contract with the mouse over and mouse out. I
> > > am
> > > not successful in getting the index of hovered thumbnail and I am
> > > messing up
> > > things because when i used my logic(which is not right :-)) for scale
> X
> > > and
> > > scale Y it is going to scale the whole tileList component but not the
> > > hovered thumbnail. i am not sure how to target to get the index of
> > > hovered
> > > thumbnail in the tileList.
> > > Please help me out
> > > Thanks for your help.
> > > Anuj
> > >
> > >
> > > //Defining Metadata for loading external thumbnails
> > > var picsXML:XML = 
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >;
> > >
> > >
> > > var myTileList:TileList=new TileList();
> > > var TileListLength:Number;
> > > myTileList.dataProvider = new DataProvider(picsXML);
> > > myTileList.direction = ScrollBarDirection.HORIZONTAL;
> > > myTileList.rowHeight = 115;
> > > myTileList.columnWidth = 200;
> > > myTileList.width = 800;
> > > myTileList.height = 135;
> > > TileListLength=myTileList.length;
> > > myTileList.move(52,500);
> > > addChild(myTileList);
> > >
> > > //Getting the index of the thumbnails
> > > myTileList.doubleClickEnabled=true;
> > > myTileList.addEventListener(MouseEvent.MOUSE_OVER,scale);
> > > myTileList.addEventListener(MouseEvent.MOUSE_OUT,scaleBack);
> > >
> > >
> > > function scale(e:MouseEvent):void
> > > {
> > > myTileList.scaleX=1.5;
> > > cmyTileList.scaleY=1.5;
> > > }
> > >
> > > function scaleBack(e:MouseEvent):void
> > > {
> > > myTileList.scaleX=1;
> > > cmyTileList.scaleY=1;
> > > }
> > > ___
> > > Flashcoders mailing list
> > > Flashcoders@chattyfig.figleaf.com
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > >
> > >
> > >
> >
> > --
> >
> > Glen Pike
> > 01326 218440
> > www.glenpike.co.uk 
> >
> > ___
> > 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] MouseOver Scaling of elements in Tile List

2008-04-22 Thread anuj sharma
Hi Glen
Thanks for the reply. Your solution worked great but in my case it is not
fulfilling because my video thumbnails are in the tileList container and it
is scaling towards downward direction. As you said they are scaling, I might
need to look for different way. If you know any good resource for scaling in
the container please let me know
Thanks

On Tue, Apr 22, 2008 at 2:13 AM, Glen Pike <[EMAIL PROTECTED]>
wrote:

> the "target" property of the MouseEvent is the thing that you are hovering
> over so:
>
> e.target.scaleX = 1.5;
> e.target.scaleY = 1.5;
>
> The target is a property of the Event class so I think most events work
> like this...
>
> Glen
>
> anuj sharma wrote:
>
> > Hi Guys
> > Can anyone help me in scaling TileList elements on mouse hover. Below is
> > my
> > code. What I did is I put 16 SWfs in Tile List uisng XML and it is
> > working
> > fine. On Double click of thumbnails I would be able to load videos too.
> > I am
> > successful in getting the index of selected item  for click and double
> > click
> > events by  using selectedIndex property. My problem is that I want
> > thumbnails to expand and contract with the mouse over and mouse out. I
> > am
> > not successful in getting the index of hovered thumbnail and I am
> > messing up
> > things because when i used my logic(which is not right :-)) for scale X
> > and
> > scale Y it is going to scale the whole tileList component but not the
> > hovered thumbnail. i am not sure how to target to get the index of
> > hovered
> > thumbnail in the tileList.
> > Please help me out
> > Thanks for your help.
> > Anuj
> >
> >
> > //Defining Metadata for loading external thumbnails
> > var picsXML:XML = 
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >;
> >
> >
> > var myTileList:TileList=new TileList();
> > var TileListLength:Number;
> > myTileList.dataProvider = new DataProvider(picsXML);
> > myTileList.direction = ScrollBarDirection.HORIZONTAL;
> > myTileList.rowHeight = 115;
> > myTileList.columnWidth = 200;
> > myTileList.width = 800;
> > myTileList.height = 135;
> > TileListLength=myTileList.length;
> > myTileList.move(52,500);
> > addChild(myTileList);
> >
> > //Getting the index of the thumbnails
> > myTileList.doubleClickEnabled=true;
> > myTileList.addEventListener(MouseEvent.MOUSE_OVER,scale);
> > myTileList.addEventListener(MouseEvent.MOUSE_OUT,scaleBack);
> >
> >
> > function scale(e:MouseEvent):void
> > {
> > myTileList.scaleX=1.5;
> > cmyTileList.scaleY=1.5;
> > }
> >
> > function scaleBack(e:MouseEvent):void
> > {
> > myTileList.scaleX=1;
> > cmyTileList.scaleY=1;
> > }
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> >
> >
> >
>
> --
>
> Glen Pike
> 01326 218440
> www.glenpike.co.uk 
>
> ___
> 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] RegEx on a String (uppercase / lowercase)

2008-04-22 Thread Juan Pablo Califano
Great link, thanks!

2008/4/22, Glen Pike <[EMAIL PROTECTED]>:
>
> Check out Grant Skinner's RegExr application - it's perfect for testing
> out RegExp's and has helpful hints on different Regex params, etc.
>
> You can use it online here & there is a download link on the page too...
>
> http://gskinner.com/RegExr/
>
> Glen
>
> Sidney de Koning wrote:
>
> > Hi Wagner and Juan Pablo,
> >
> > Thanks for the response! I also tried this:
> >
> > var regObj:RegExp = new RegExp( "ˆ" + searchField_txt.text, "i" );
> > var filteredList:XMLList = landen.country.( regObj.test(
> > countryname.toLowerCase() ) );
> >
> > And that worked aswell. However the sollution provided by both of you is
> > the way it should.
> >
> > Thanks!
> >
> > Sidney
> >
> >
> > On Apr 22, 2008, at 3:35 PM, Wagner Amaral wrote:
> >
> > If you pass a second parameter of "i" to the RegExp constructor, it will
> > > match insensitively:
> > >
> > > var regObj:RegExp = new RegExp( "ˆ" + searchField_txt.text, "i" );
> > >
> > > Look here for the description of all the flags a RegExp can take in
> > > AS3:
> > >
> > > http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/RegExp.html#RegExp()
> > >
> > >
> > >
> > > On Tue, Apr 22, 2008 at 9:13 AM, Sidney de Koning <
> > > [EMAIL PROTECTED]>
> > > wrote:
> > >
> > > Hi List,
> > > >
> > > > I'm filtering my loaded XML with RegEx (regular expressions). The
> > > > input i
> > > > filter on is in a textfield. So I have a textfield on the stage and
> > > > match
> > > > that to the text in my XML.
> > > > Right now i have a pattern the allows me to search only lowercase,
> > > > but
> > > > since all the names in my xml start with a capital i have a problem.
> > > > This is
> > > > my pattern:
> > > >
> > > > var regObj:RegExp = new RegExp( "^.*[[:upper:]a-z].*"+
> > > > searchField_txt.text +".*" );
> > > >
> > > > My xml consist of country names, Andorra, Angola, Anguilla, Cuba,
> > > > Cyprus,
> > > > Denmark etc.
> > > >
> > > > What I want to do is this; when i type: an it returns a list of
> > > > Andorra,
> > > > Angola, Anguilla. But when i type in an extra g, so now the word in
> > > > my
> > > > textfield becomes: "ang" it should return the list Angola, Anguilla.
> > > > The
> > > > pattern i have works a bit, but not quite. And my knowledge of RegEx
> > > > is only
> > > > exsisting since this morning. So what i want the RegEx to do is
> > > > allow me to
> > > > search the text, no matter if i type in lower-/uppercase and in the
> > > > correct
> > > > order.
> > > >
> > > > Is there a RegEx rockstar who can help me on this?
> > > >
> > > > Thanks in advance,
> > > >
> > > > Sidney de Koning
> > > > ___
> > > > 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
> >
> >
> >
> --
>
> Glen Pike
> 01326 218440
> www.glenpike.co.uk 
>
> ___
> 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] Updating V2 components

2008-04-22 Thread Mendelsohn, Michael
Never mind -- it's the Parameters are locked in instances checkbox.  I
guess I'm just not clear on what the advantages of that are.


> I've made a custom component and added a param to it.  Is there a way
to
update instances on the stage? The new var doesn't show up in the
parameters palette or in the component inspector. (CS3/AS2)

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


Re: [Flashcoders] RegEx on a String (uppercase / lowercase)

2008-04-22 Thread Glen Pike
Check out Grant Skinner's RegExr application - it's perfect for testing 
out RegExp's and has helpful hints on different Regex params, etc.


You can use it online here & there is a download link on the page too...

http://gskinner.com/RegExr/

Glen

Sidney de Koning wrote:

Hi Wagner and Juan Pablo,

Thanks for the response! I also tried this:

var regObj:RegExp = new RegExp( "ˆ" + searchField_txt.text, "i" );
var filteredList:XMLList = landen.country.( regObj.test( 
countryname.toLowerCase() ) );


And that worked aswell. However the sollution provided by both of you 
is the way it should.


Thanks!

Sidney


On Apr 22, 2008, at 3:35 PM, Wagner Amaral wrote:


If you pass a second parameter of "i" to the RegExp constructor, it will
match insensitively:

var regObj:RegExp = new RegExp( "ˆ" + searchField_txt.text, "i" );

Look here for the description of all the flags a RegExp can take in AS3:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/RegExp.html#RegExp() 





On Tue, Apr 22, 2008 at 9:13 AM, Sidney de Koning 
<[EMAIL PROTECTED]>

wrote:


Hi List,

I'm filtering my loaded XML with RegEx (regular expressions). The 
input i
filter on is in a textfield. So I have a textfield on the stage and 
match

that to the text in my XML.
Right now i have a pattern the allows me to search only lowercase, but
since all the names in my xml start with a capital i have a problem. 
This is

my pattern:

var regObj:RegExp = new RegExp( "^.*[[:upper:]a-z].*"+
searchField_txt.text +".*" );

My xml consist of country names, Andorra, Angola, Anguilla, Cuba, 
Cyprus,

Denmark etc.

What I want to do is this; when i type: an it returns a list of 
Andorra,

Angola, Anguilla. But when i type in an extra g, so now the word in my
textfield becomes: "ang" it should return the list Angola, Anguilla. 
The
pattern i have works a bit, but not quite. And my knowledge of RegEx 
is only
exsisting since this morning. So what i want the RegEx to do is 
allow me to
search the text, no matter if i type in lower-/uppercase and in the 
correct

order.

Is there a RegEx rockstar who can help me on this?

Thanks in advance,

Sidney de Koning
___
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




--

Glen Pike
01326 218440
www.glenpike.co.uk 

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


Re: [Flashcoders] RegEx on a String (uppercase / lowercase)

2008-04-22 Thread Wagner Amaral
If you pass a second parameter of "i" to the RegExp constructor, it will
match insensitively:

var regObj:RegExp = new RegExp( "ˆ" + searchField_txt.text, "i" );

Look here for the description of all the flags a RegExp can take in AS3:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/RegExp.html#RegExp()



On Tue, Apr 22, 2008 at 9:13 AM, Sidney de Koning <[EMAIL PROTECTED]>
wrote:

> Hi List,
>
> I'm filtering my loaded XML with RegEx (regular expressions). The input i
> filter on is in a textfield. So I have a textfield on the stage and match
> that to the text in my XML.
> Right now i have a pattern the allows me to search only lowercase, but
> since all the names in my xml start with a capital i have a problem. This is
> my pattern:
>
> var regObj:RegExp = new RegExp( "^.*[[:upper:]a-z].*"+
> searchField_txt.text +".*" );
>
> My xml consist of country names, Andorra, Angola, Anguilla, Cuba, Cyprus,
> Denmark etc.
>
> What I want to do is this; when i type: an it returns a list of Andorra,
> Angola, Anguilla. But when i type in an extra g, so now the word in my
> textfield becomes: "ang" it should return the list Angola, Anguilla. The
> pattern i have works a bit, but not quite. And my knowledge of RegEx is only
> exsisting since this morning. So what i want the RegEx to do is allow me to
> search the text, no matter if i type in lower-/uppercase and in the correct
> order.
>
> Is there a RegEx rockstar who can help me on this?
>
> Thanks in advance,
>
> Sidney de Koning
> ___
> 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] Updating V2 components

2008-04-22 Thread Mendelsohn, Michael
Hi list...

I've made a custom component and added a param to it.  Is there a way to
update instances on the stage? The new var doesn't show up in the
parameters palette or in the component inspector. (CS3/AS2)

Thanks,
- MM

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


Re: [Flashcoders] RegEx on a String (uppercase / lowercase)

2008-04-22 Thread Sidney de Koning

Hi Wagner and Juan Pablo,

Thanks for the response! I also tried this:

var regObj:RegExp = new RegExp( "ˆ" + searchField_txt.text, "i" );
var filteredList:XMLList = landen.country. 
( regObj.test( countryname.toLowerCase() ) );


And that worked aswell. However the sollution provided by both of you  
is the way it should.


Thanks!

Sidney


On Apr 22, 2008, at 3:35 PM, Wagner Amaral wrote:

If you pass a second parameter of "i" to the RegExp constructor, it  
will

match insensitively:

var regObj:RegExp = new RegExp( "ˆ" + searchField_txt.text, "i" );

Look here for the description of all the flags a RegExp can take in  
AS3:

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/RegExp.html#RegExp()



On Tue, Apr 22, 2008 at 9:13 AM, Sidney de Koning <[EMAIL PROTECTED] 
>

wrote:


Hi List,

I'm filtering my loaded XML with RegEx (regular expressions). The  
input i
filter on is in a textfield. So I have a textfield on the stage and  
match

that to the text in my XML.
Right now i have a pattern the allows me to search only lowercase,  
but
since all the names in my xml start with a capital i have a  
problem. This is

my pattern:

var regObj:RegExp = new RegExp( "^.*[[:upper:]a-z].*"+
searchField_txt.text +".*" );

My xml consist of country names, Andorra, Angola, Anguilla, Cuba,  
Cyprus,

Denmark etc.

What I want to do is this; when i type: an it returns a list of  
Andorra,
Angola, Anguilla. But when i type in an extra g, so now the word in  
my
textfield becomes: "ang" it should return the list Angola,  
Anguilla. The
pattern i have works a bit, but not quite. And my knowledge of  
RegEx is only
exsisting since this morning. So what i want the RegEx to do is  
allow me to
search the text, no matter if i type in lower-/uppercase and in the  
correct

order.

Is there a RegEx rockstar who can help me on this?

Thanks in advance,

Sidney de Koning
___
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] RegEx on a String (uppercase / lowercase)

2008-04-22 Thread Juan Pablo Califano
Hi, you can use the "i" flag in the second constructor parameter if you want
a case insensitive regexp.

Check the info about the constructor here for an explanation of that and
other flags:
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/RegExp.html#RegExp
()


Cheers
Juan Pablo Califano

2008/4/22, Sidney de Koning <[EMAIL PROTECTED]>:
>
> Hi List,
>
> I'm filtering my loaded XML with RegEx (regular expressions). The input i
> filter on is in a textfield. So I have a textfield on the stage and match
> that to the text in my XML.
> Right now i have a pattern the allows me to search only lowercase, but
> since all the names in my xml start with a capital i have a problem. This is
> my pattern:
>
> var regObj:RegExp = new RegExp( "^.*[[:upper:]a-z].*"+
> searchField_txt.text +".*" );
>
> My xml consist of country names, Andorra, Angola, Anguilla, Cuba, Cyprus,
> Denmark etc.
>
> What I want to do is this; when i type: an it returns a list of Andorra,
> Angola, Anguilla. But when i type in an extra g, so now the word in my
> textfield becomes: "ang" it should return the list Angola, Anguilla. The
> pattern i have works a bit, but not quite. And my knowledge of RegEx is only
> exsisting since this morning. So what i want the RegEx to do is allow me to
> search the text, no matter if i type in lower-/uppercase and in the correct
> order.
>
> Is there a RegEx rockstar who can help me on this?
>
> Thanks in advance,
>
> Sidney de Koning
> ___
> 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] RegEx on a String (uppercase / lowercase)

2008-04-22 Thread Sidney de Koning

Hi List,

I'm filtering my loaded XML with RegEx (regular expressions). The  
input i filter on is in a textfield. So I have a textfield on the  
stage and match that to the text in my XML.
Right now i have a pattern the allows me to search only lowercase, but  
since all the names in my xml start with a capital i have a problem.  
This is my pattern:


var regObj:RegExp = new RegExp( "^.*[[:upper:]a-z].*"+  
searchField_txt.text +".*" );


My xml consist of country names, Andorra, Angola, Anguilla, Cuba,  
Cyprus, Denmark etc.


What I want to do is this; when i type: an it returns a list of  
Andorra, Angola, Anguilla. But when i type in an extra g, so now the  
word in my textfield becomes: "ang" it should return the list Angola,  
Anguilla. The pattern i have works a bit, but not quite. And my  
knowledge of RegEx is only exsisting since this morning. So what i  
want the RegEx to do is allow me to search the text, no matter if i  
type in lower-/uppercase and in the correct order.


Is there a RegEx rockstar who can help me on this?

Thanks in advance,

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


Re: [Flashcoders] Sending messages to FMS from a PHP server

2008-04-22 Thread Meinte van't Kruis
maybe the whole trick to this is to fake a netconnection in php, building
the right packets in amf, sending it and then doing a call like you would
from a swf... Seems a bit messy, but can't really think of something else.

On Tue, Apr 22, 2008 at 11:41 AM, Meinte van't Kruis <[EMAIL PROTECTED]>
wrote:

> thanks for the pointer, I'm looking into it. Meanwhile I'm wondering how
> this looks like at the FMS side of things, any ideas? It almost looks like
> I'd have to fake a netconnection call response, but I'm sure thats not the
> way to go(I certainly wouldn't want it to be).
>
>
> On Tue, Apr 22, 2008 at 11:23 AM, Glen Pike <[EMAIL PROTECTED]>
> wrote:
>
> > Hi,
> >
> >   I have not done this, but I would look at using the AMFPHP
> > serialization classes to format my data then use something like Curl or
> > fwrite (if "wrappers" are enabled and allowed on your server) for HTTP type
> > messaging.
> >
> >   HTH
> >
> >   Glen
> >
> >
> > Meinte van't Kruis wrote:
> >
> > > Hi Folks,
> > >
> > > I'm not sure if this is the right list for these kinds of questions,
> > > but
> > > I'll give it a shot anyway.
> > >
> > > What I want to do is push data from PHP to Flash Media Server. I
> > > haven't
> > > seen it elsewhere,
> > > and can't really find any people who did such a thing, but maybe I'm
> > > overlooking the obvious.
> > > I can't imagine it's totally impossible, and I kinda thought AMFPHP or
> > > WebOrb would provide
> > > methods for this, but alas, WebOrb only has messaging support on their
> > > j2ee
> > > and .net version,
> > > no such thing for PHP and blazeDS and all these kinds of technologies
> > > all
> > > run on j2ee or
> > > different, I haven't seen any PHP implementation to provide an API for
> > > sending AMF directly
> > > from PHP (push, instead of pull).
> > >
> > > So if anyone has any clues or experience with this, it would be
> > > greatly
> > > appreciated!
> > >
> > >
> > >
> >
> > --
> >
> > Glen Pike
> > 01326 218440
> > www.glenpike.co.uk 
> >
> > ___
> > Flashcoders mailing list
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
>
>
> --
> M.A. van't Kruis
> http://www.malatze.nl/
>



-- 
M.A. van't Kruis
http://www.malatze.nl/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] amfphp 1.9 not working on web host

2008-04-22 Thread chas warn
Cool!  Thanks for responding Ashvin.   My little restaurant project is
working with amfphp1.2 on the remote server but I can only get version 1.9
to work locally.   There is no error message - it's just not connecting to
the database on the remote server.  I uploaded the 1.9 directory and I kept
the same crossdomain.xml  in the root directory but I just can't get it to
kick in.  In the morning, I'll check again for dumb mistakes.

You can see how I'm using amfphp on my website...
http://www.carlosinla.com/go/page5/page5.php

When I hooked this up to amfphp 1.9. it doesn't connect to the database. It
doesn't light up.

This thing will run smooth with 1.9.   My other pages on my site are using
1.2  until I get this figured out.  It's 2:40 a.m. - so I better go to bed.

Salute

Charley










On Mon, Apr 21, 2008 at 9:44 PM, Ashvin Savani <[EMAIL PROTECTED]> wrote:

> What exact error you are getting?
>
> Regards,
>
> Ashvin Savani
> CEO & Chief Architect,
> FlashBrain - Division of Avinashi
>
> We never give up!
>
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of chas
> warn
> Sent: 22 April 2008 6:39 AM
> To: flashcoders@chattyfig.figleaf.com
> Subject: [Flashcoders] amfphp 1.9 not working on web host
>
> Please help me on this issue.
>
> I just moved from amfphp 1.2 to 1.9.  I can get 1.9 working locally but
> not
> on the remote web host.  I think this maybe a a cross domain issue.
> ___
> 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] Sending messages to FMS from a PHP server

2008-04-22 Thread Meinte van't Kruis
thanks for the pointer, I'm looking into it. Meanwhile I'm wondering how
this looks like at the FMS side of things, any ideas? It almost looks like
I'd have to fake a netconnection call response, but I'm sure thats not the
way to go(I certainly wouldn't want it to be).

On Tue, Apr 22, 2008 at 11:23 AM, Glen Pike <[EMAIL PROTECTED]>
wrote:

> Hi,
>
>   I have not done this, but I would look at using the AMFPHP serialization
> classes to format my data then use something like Curl or fwrite (if
> "wrappers" are enabled and allowed on your server) for HTTP type messaging.
>
>   HTH
>
>   Glen
>
>
> Meinte van't Kruis wrote:
>
> > Hi Folks,
> >
> > I'm not sure if this is the right list for these kinds of questions, but
> > I'll give it a shot anyway.
> >
> > What I want to do is push data from PHP to Flash Media Server. I haven't
> > seen it elsewhere,
> > and can't really find any people who did such a thing, but maybe I'm
> > overlooking the obvious.
> > I can't imagine it's totally impossible, and I kinda thought AMFPHP or
> > WebOrb would provide
> > methods for this, but alas, WebOrb only has messaging support on their
> > j2ee
> > and .net version,
> > no such thing for PHP and blazeDS and all these kinds of technologies
> > all
> > run on j2ee or
> > different, I haven't seen any PHP implementation to provide an API for
> > sending AMF directly
> > from PHP (push, instead of pull).
> >
> > So if anyone has any clues or experience with this, it would be greatly
> > appreciated!
> >
> >
> >
>
> --
>
> Glen Pike
> 01326 218440
> www.glenpike.co.uk 
>
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
M.A. van't Kruis
http://www.malatze.nl/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Sending messages to FMS from a PHP server

2008-04-22 Thread Glen Pike

Hi,

   I have not done this, but I would look at using the AMFPHP 
serialization classes to format my data then use something like Curl or 
fwrite (if "wrappers" are enabled and allowed on your server) for HTTP 
type messaging.


   HTH

   Glen

Meinte van't Kruis wrote:

Hi Folks,

I'm not sure if this is the right list for these kinds of questions, but
I'll give it a shot anyway.

What I want to do is push data from PHP to Flash Media Server. I haven't
seen it elsewhere,
and can't really find any people who did such a thing, but maybe I'm
overlooking the obvious.
I can't imagine it's totally impossible, and I kinda thought AMFPHP or
WebOrb would provide
methods for this, but alas, WebOrb only has messaging support on their j2ee
and .net version,
no such thing for PHP and blazeDS and all these kinds of technologies all
run on j2ee or
different, I haven't seen any PHP implementation to provide an API for
sending AMF directly
from PHP (push, instead of pull).

So if anyone has any clues or experience with this, it would be greatly
appreciated!

  


--

Glen Pike
01326 218440
www.glenpike.co.uk 

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


Re: [Flashcoders] MouseOver Scaling of elements in Tile List

2008-04-22 Thread Glen Pike
the "target" property of the MouseEvent is the thing that you are 
hovering over so:


e.target.scaleX = 1.5;
e.target.scaleY = 1.5;

The target is a property of the Event class so I think most events work 
like this...


Glen

anuj sharma wrote:

Hi Guys
Can anyone help me in scaling TileList elements on mouse hover. Below is my
code. What I did is I put 16 SWfs in Tile List uisng XML and it is working
fine. On Double click of thumbnails I would be able to load videos too. I am
successful in getting the index of selected item  for click and double click
events by  using selectedIndex property. My problem is that I want
thumbnails to expand and contract with the mouse over and mouse out. I am
not successful in getting the index of hovered thumbnail and I am messing up
things because when i used my logic(which is not right :-)) for scale X and
scale Y it is going to scale the whole tileList component but not the
hovered thumbnail. i am not sure how to target to get the index of hovered
thumbnail in the tileList.
Please help me out
Thanks for your help.
Anuj


//Defining Metadata for loading external thumbnails
var picsXML:XML = 
















;


var myTileList:TileList=new TileList();
var TileListLength:Number;
myTileList.dataProvider = new DataProvider(picsXML);
myTileList.direction = ScrollBarDirection.HORIZONTAL;
myTileList.rowHeight = 115;
myTileList.columnWidth = 200;
myTileList.width = 800;
myTileList.height = 135;
TileListLength=myTileList.length;
myTileList.move(52,500);
addChild(myTileList);

//Getting the index of the thumbnails
myTileList.doubleClickEnabled=true;
myTileList.addEventListener(MouseEvent.MOUSE_OVER,scale);
myTileList.addEventListener(MouseEvent.MOUSE_OUT,scaleBack);


function scale(e:MouseEvent):void
{
myTileList.scaleX=1.5;
cmyTileList.scaleY=1.5;
}

function scaleBack(e:MouseEvent):void
{
myTileList.scaleX=1;
cmyTileList.scaleY=1;
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


  


--

Glen Pike
01326 218440
www.glenpike.co.uk 

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


[Flashcoders] Sending messages to FMS from a PHP server

2008-04-22 Thread Meinte van't Kruis
Hi Folks,

I'm not sure if this is the right list for these kinds of questions, but
I'll give it a shot anyway.

What I want to do is push data from PHP to Flash Media Server. I haven't
seen it elsewhere,
and can't really find any people who did such a thing, but maybe I'm
overlooking the obvious.
I can't imagine it's totally impossible, and I kinda thought AMFPHP or
WebOrb would provide
methods for this, but alas, WebOrb only has messaging support on their j2ee
and .net version,
no such thing for PHP and blazeDS and all these kinds of technologies all
run on j2ee or
different, I haven't seen any PHP implementation to provide an API for
sending AMF directly
from PHP (push, instead of pull).

So if anyone has any clues or experience with this, it would be greatly
appreciated!

-- 
M.A. van't Kruis
http://www.malatze.nl/
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders