[Flashcoders] reading a very simple XML file

2011-06-08 Thread ACE Flash
Hi guys, I am pulling out my hair :(, my code can retrieve the xml file
without any problem. But I was not able to retrieve each node in the follow
case.

Would you please help me to take a look my code? am I mising somehing?

Cheers

= XML FILE

?xml version=1.0 encoding=UTF-8?
root
asset type=IMAGE url=www.google.com filename=googlefilename
size=1000/
asset type=IMAGE url=www.yahoo.com filename=yahoofilename
size=1200/
asset type=IMAGE url=www.bing.com filename=bingfilename size=1100/
/root


= AS3 

import flash.events.Event;
var loader:URLLoader = new URLLoader();var request:URLRequest = new
URLRequest(test.xml);var xmlData:XML;var childLength:uint;
loader.addEventListener(Event.COMPLETE, completeHandler);loader.load(request);
function completeHandler(e:Event):void{
xmlData = XML(e.target.data);
childLength = xmlData.children().length();

//trace(xmlData.children()); // == I can retrieve the data here

for (var i:uint = 0; i  childLength; i++)
{
trace(xmlData.children()[i]); // === but I can;t get each 
node here...
}
}


=== code online =

http://www.privatepaste.com/89e38a7292
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] reading a very simple XML file

2011-06-08 Thread ACE Flash
thanks Cor, I have already tried this and it returned nothing as well. It's
very weird!.

I was able to retrieve the length by this, it returned 3.

trace(xmlData.asset.length());



On Wed, Jun 8, 2011 at 11:17 AM, Cor c...@chello.nl wrote:

 Try this:

 trace(xmlData.asset[i]);


 instead of trace(xmlData.children()[i]); // === but I can;t get each node
 here...

 Groeten,
 Cor van Dooren
 www.codobyte.com
 --
  There are only 10 types of people in the world:
   Those who understand binary and those who don't.


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ACE Flash
 Sent: woensdag 8 juni 2011 17:10
 To: Flash Coders List
 Subject: [Flashcoders] reading a very simple XML file

 Hi guys, I am pulling out my hair :(, my code can retrieve the xml file
 without any problem. But I was not able to retrieve each node in the follow
 case.

 Would you please help me to take a look my code? am I mising somehing?

 Cheers

 = XML FILE

 ?xml version=1.0 encoding=UTF-8?
 root
 asset type=IMAGE url=www.google.com filename=googlefilename
 size=1000/
 asset type=IMAGE url=www.yahoo.com filename=yahoofilename
 size=1200/
 asset type=IMAGE url=www.bing.com filename=bingfilename
 size=1100/
 /root


 = AS3 

 import flash.events.Event;
 var loader:URLLoader = new URLLoader();var request:URLRequest = new
 URLRequest(test.xml);var xmlData:XML;var childLength:uint;
 loader.addEventListener(Event.COMPLETE,
 completeHandler);loader.load(request);
 function completeHandler(e:Event):void{
xmlData = XML(e.target.data);
childLength = xmlData.children().length();

//trace(xmlData.children()); // == I can retrieve the data here

for (var i:uint = 0; i  childLength; i++)
{
trace(xmlData.children()[i]); // === but I can;t get each
 node here...
}
}


 === code online =

 http://www.privatepaste.com/89e38a7292
 ___
 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] reading a very simple XML file

2011-06-08 Thread ACE Flash
right you could retrieve the attributes by doing that, but what I am going
to get is the node like this==  asset type=IMAGE url=www.google.com
filename=googlefilename size=1000/

The reason I am asking this is because I need to merger two xml files, is
that possible to retrieve the entire node not just attributes?

Thanks

On Wed, Jun 8, 2011 at 11:38 AM, Cor c...@chello.nl wrote:

 Aahh, I understand.

 Your children are in fact empty!!
 You use only attributes.

 Try this: trace(xmlData.asset[i].@size)

 Groeten,
 Cor van Dooren
 www.codobyte.com
 --
  There are only 10 types of people in the world:
   Those who understand binary and those who don't.


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ACE Flash
 Sent: woensdag 8 juni 2011 17:29
 To: Flash Coders List
 Subject: Re: [Flashcoders] reading a very simple XML file

 thanks Cor, I have already tried this and it returned nothing as well. It's
 very weird!.

 I was able to retrieve the length by this, it returned 3.

 trace(xmlData.asset.length());



 On Wed, Jun 8, 2011 at 11:17 AM, Cor c...@chello.nl wrote:

  Try this:
 
  trace(xmlData.asset[i]);
 
 
  instead of trace(xmlData.children()[i]); // === but I can;t get each
  node here...
 
  Groeten,
  Cor van Dooren
  www.codobyte.com
  --
   There are only 10 types of people in the world:
Those who understand binary and those who don't.
 
 
  -Original Message-
  From: flashcoders-boun...@chattyfig.figleaf.com
  [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ACE
  Flash
  Sent: woensdag 8 juni 2011 17:10
  To: Flash Coders List
  Subject: [Flashcoders] reading a very simple XML file
 
  Hi guys, I am pulling out my hair :(, my code can retrieve the xml
  file without any problem. But I was not able to retrieve each node in
  the follow case.
 
  Would you please help me to take a look my code? am I mising somehing?
 
  Cheers
 
  = XML FILE
 
  ?xml version=1.0 encoding=UTF-8? root asset type=IMAGE
  url=www.google.com filename=googlefilename
  size=1000/
  asset type=IMAGE url=www.yahoo.com filename=yahoofilename
  size=1200/
  asset type=IMAGE url=www.bing.com filename=bingfilename
  size=1100/
  /root
 
 
  = AS3 
 
  import flash.events.Event;
  var loader:URLLoader = new URLLoader();var request:URLRequest = new
  URLRequest(test.xml);var xmlData:XML;var childLength:uint;
  loader.addEventListener(Event.COMPLETE,
  completeHandler);loader.load(request);
  function completeHandler(e:Event):void{
 xmlData = XML(e.target.data);
 childLength = xmlData.children().length();
 
 //trace(xmlData.children()); // == I can retrieve the data
  here
 
 for (var i:uint = 0; i  childLength; i++)
 {
 trace(xmlData.children()[i]); // === but I can;t get
  each node here...
 }
 }
 
 
  === code online =
 
  http://www.privatepaste.com/89e38a7292
  ___
  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 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] reading a very simple XML file

2011-06-08 Thread ACE Flash
Hi Cor, I appreciate your help on this. :)


On Wed, Jun 8, 2011 at 11:43 AM, Glen Pike g...@engineeredarts.co.ukwrote:

 Hi,

You should be able to do:

var children:XMLList = xmlData.children();
foreach(var child:XML in children) {
trace(child.toXMLString());
}

 make sure you use toXMLString for tracing XML elements - otherwise you end
 up with blanks sometimes.

 Glen


 On 08/06/2011 16:28, ACE Flash wrote:

 thanks Cor, I have already tried this and it returned nothing as well.
 It's
 very weird!.

 I was able to retrieve the length by this, it returned 3.

 trace(xmlData.asset.length());



 On Wed, Jun 8, 2011 at 11:17 AM, Corc...@chello.nl  wrote:

  Try this:

 trace(xmlData.asset[i]);


 instead of trace(xmlData.children()[i]); //=== but I can;t get each
 node
 here...

 Groeten,
 Cor van Dooren
 www.codobyte.com
 --
  There are only 10 types of people in the world:
   Those who understand binary and those who don't.


 -Original Message-
 From: flashcoders-boun...@chattyfig.figleaf.com
 [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of ACE
 Flash
 Sent: woensdag 8 juni 2011 17:10
 To: Flash Coders List
 Subject: [Flashcoders] reading a very simple XML file

 Hi guys, I am pulling out my hair :(, my code can retrieve the xml file
 without any problem. But I was not able to retrieve each node in the
 follow
 case.

 Would you please help me to take a look my code? am I mising somehing?

 Cheers

 = XML FILE

 ?xml version=1.0 encoding=UTF-8?
 root
 asset type=IMAGE url=www.google.com filename=googlefilename
 size=1000/
 asset type=IMAGE url=www.yahoo.com filename=yahoofilename
 size=1200/
 asset type=IMAGE url=www.bing.com filename=bingfilename
 size=1100/
 /root


 = AS3 

 import flash.events.Event;
 var loader:URLLoader = new URLLoader();var request:URLRequest = new
 URLRequest(test.xml);var xmlData:XML;var childLength:uint;
 loader.addEventListener(Event.COMPLETE,
 completeHandler);loader.load(request);
 function completeHandler(e:Event):void{
xmlData = XML(e.target.data);
childLength = xmlData.children().length();

//trace(xmlData.children()); //== I can retrieve the data here

for (var i:uint = 0; i  childLength; i++)
{
trace(xmlData.children()[i]); //=== but I can;t get each
 node here...
}
}


 === code online =

 http://www.privatepaste.com/89e38a7292
 ___
 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 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] Getting bitmap data after successfully loading a swf file

2010-11-30 Thread ACE Flash
hi there,

I am pulling my hair off :), i was able to use any PNG or JPG file in my
code, the SWF file just didn't work. Would you please take a look for me? Is
there anything I am missing??

I am using flash 9 and all files are on the same domain. Thanks



import flash.net.URLRequest;import flash.display.Loader;

// I am able to use the PNG/JPG files

var fileURL:String = http://www.google.com/images/logos/ps_logo2.png;

// BUT!!!  the SWF just doesn't work, it always return null!

//var fileURL:String = x.swf

var request:URLRequest = new URLRequest(fileURL);
var loader:Loader = new
Loader();loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
dataCompleteHandler);loader.load(request);
function dataCompleteHandler(e:Event):void{
var image:Bitmap = new Bitmap(e.currentTarget.content.bitmapData);
addChild(image);}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Get video played time

2009-12-04 Thread ACE Flash
I am loading an FLV dynamically using the NetConnection and NetStream
classes and display the video in a Video object, my question is shall I use
the Enter_Frame event to get the video played time?

If so, I need to remove the event after the video completed by checking
NetStream.Play.Complete?

thank you

 code snippets ==

videoHolder.addEventListener(Event.ENTER_FRAME, videoPlayTime );

function videoPlayTime(e:Event):void
{
 videoPlayTime+/+totalVideoDuration;
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] How many weeks remaining from a given fixed date?

2009-10-30 Thread ACE Flash
Hi there,

I was trying to deal with the script in my application, it should display
how many weeks left...

Say: for instance, I set 1st May 2010 in my application and it should
compare the local time.

The following code seems doesn't work correctly, am I missing something?
would you mind to have a look?

Thank you

--

oneDay = 1000*60*60*24;
oneWeek = oneDay * 7;

localDate = new Date();
targetDate = new Date ( 2010 , 5 , 1 );


date1Ms=targetDate.getTime();
date2Ms=localDate.getTime();

differenceMs = date1Ms - date2Ms;

weeks = ( differenceMs/oneWeek );


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


[Flashcoders] Compare two date ( how many days left )

2009-10-13 Thread ACE Flash
Hi there, I am using the date class in flash as3, I was wondering how to
compare two date and return how may days left.


for instance: my target date is 10/18/2009(mm/dd/), I would like to
compare with the current date 10/13/2009, the script returns 5.

something like

var localDate:Date = new Date();
var day:Number = localDate.getDay();
var month:Number = localDate.getMonth();
var year:Number = localDate.getFullYear();


var currentDate:Date = new Date ( year, month , day )
var targetDate:Date = new Date ( 2009 , 10 ,18 );


trace(currentDate - targetDate)


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


Re: [Flashcoders] How to add a DisplayObject into a container without using addChild() method.

2009-08-17 Thread ACE Flash
ekameleon, you are the man! so sweet.

Thanks

On Mon, Aug 17, 2009 at 1:54 PM, ekameleon ekamel...@gmail.com wrote:

 Hello :)
 Use an argument in the constructor of you class to passed-in the parent
 reference of your display

 public function MyDisplay( target:DisplayObjectContainer = null )
 {
if ( target != null )
{
 target.addChild( this ) ;
}
 }

 PS : your code isn't valid in the constructor of a DisplayObject the
 stage
 and parent properties are null ! Only in the main class of your
 application this two attributes are not null.

 EKA+ :)

 2009/8/17 ACE Flash acefl...@gmail.com

  Hi guys,
 
  I am curious about if am able to add the DisplayObject into a container
  without using addChild() method, this class is very simple...
 
 
 
1. package
2. {
3. import flash.display.Sprite;
4. import flash.events.Event;
5.
6. public class MyClass extends Sprite
7. {
8.
9. public function MyClass ()
10. {
11. //addEventListener( Event.ADDED_TO_STAGE , addedHandler );
12. parent.addChild(this);
13. }
14. /*
15. private function addedHandler( e:Event ):void
16. {
17. removeEventListener( Event.ADDED_TO_STAGE , addedHandler );
18.
19. parent.addChild(this); // how could I retrieve the instance name of
this?
20. }
21. */
22. }
23. }
 
 
 
  I'd like to do something like
 
 
  var do:MyClass = new MyClass();
  //addChild(do) // added it into displayobject without using this method
  here
 
 
  Is that possible? any suggestions are welcome  :)
 
  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

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


[Flashcoders] Adding metadata by using as3 in Flash CS4?

2009-07-11 Thread ACE Flash
Hi There,

I am curious that if there is a way to add the metadata by using as3? You
are able to see the metadata window by click File = File info.

Is that possible?

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


[Flashcoders] dispatch a custom Event in a simple class file

2009-07-09 Thread ACE Flash
Hi there,

I was working on my class file, but the event didn't get called
successfully. Anyting I am missing something?

Thank you




var mc:MyClass = new MyClass();
mc.addEventListener ( testInitialize , onINIT );


function onINIT ( e:Event )
{
   trace(INIT was called);
}





   1. package
   2. {
   3.   import flash.events.Event;
   4.   import flash.events.EventDispatcher;
   5.
   6.   [Event(name=testInitialize, type=flash.events.Event)]
   7.   public class MyClass extends EventDispatcher
   8.   {
   9.   
   10.  private const TEST_INITIALIZE   :String = 
testInitialize;
   11.  
   12.  public function MyClass ()
   13.  {
   14.  initialize();
   15.  }
   16.  
   17.  private function initialize():void
   18.  {
   19.  ..
   20.  dispatchEvent ( new Event( TEST_INITIALIZE ) );
   21.  }
   22.  }
   23. }
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] How to dynamically create Object ’s trough for loop and target them someway?

2009-05-14 Thread ACE Flash
hi there, I am trying to dynamically create objects and target them
later

Thanks

var myObject:Object;

for(var i:Number = 0; i10; i++)
{
myObject = new Object();
myObject.id = myObject+i
trace(myObject.id)
}

// how do I target them here?

// myObject[0]?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] How to embed assets in pure as3?

2009-05-13 Thread ACE Flash
hi there, I'd like to use pure  actionscript 3 to embed my assets in flash.
and use addChild() to add them on the stage.

The code seem doesn't work for me, any suggestions?

thanks


[Embed(source=/assets/img1.gif , mimeType=image/gif)]
public var newImage:Class;

[Embed(source=/assets/img2.gif , mimeType=image/gif)]
public var oldImage:Class;


var img1:Shape= new newImage() as Shape;;
addChild( img1 );
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] Try... catch......

2009-05-09 Thread ACE Flash
Hi Hans,

Thanks for the code :) I have one more question for the script below

1. if catch the TypeError, does the last line = return ball will execute?

Thanks a lot


public function myBall( value:int ):Ball
  {
   var ball:Ball = null;

  try{

 //my code goes here.
  } catch (e:TypeError ){

  }
  return ball;
 }



On Sat, May 9, 2009 at 2:21 AM, Hans Wichman j.c.wich...@objectpainters.com
 wrote:

 Hi,
 yup

 either
 public function myBall( value:int ):Ball
   {
   var ball:Ball

   try{

  //my code goes here.
  return ball;
  } catch (e:TypeError ){
   trace(Whoops);
   }
   return null;
   }

 or

 public function myBall( value:int ):Ball
   {
var ball:Ball = null;

   try{

  //my code goes here.
   } catch (e:TypeError ){

   }
   return ball;
  }
 There are more possibilities, some of which are better practice than
 others,
 but in such a small method, I wouldn't make to much of a fuss about it.

 regards,
 JC


 On Sat, May 9, 2009 at 3:22 AM, ACE Flash acefl...@gmail.com wrote:

  Hi there,
 
  I am trying to add try block in my code, how can I deal it with return
  function?
 
  If the code without any problems, I'd like to return ball , otherwise
 I'd
  like to EXIT or return null.
 
  Thanks
 
  -
 
   public function myBall( value:int ):Ball
 {
 var ball:Ball
 
 try{
 
//my code goes here.
return ball;
} catch (e:TypeError ){
 
 }
 
// shall I add = return null here?
 }
  ___
  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] Try... catch......

2009-05-08 Thread ACE Flash
Hi there,

I am trying to add try block in my code, how can I deal it with return
function?

If the code without any problems, I'd like to return ball , otherwise I'd
like to EXIT or return null.

Thanks

-

  public function myBall( value:int ):Ball
{
var ball:Ball

try{

   //my code goes here.
   return ball;
   } catch (e:TypeError ){

}

   // shall I add = return null here?
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Removing a key and value in an object

2009-03-24 Thread ACE Flash
Hey there,

I was trying to remove the first key and value ( a:foo ) from the oject.

var obj:Object = {a:foo, b:bar}

Is there a way to remove it?

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


[Flashcoders] Re: Removing a key and value in an object

2009-03-24 Thread ACE Flash
I am able to use this.delete obj[k];

thanks all



On Tue, Mar 24, 2009 at 12:35 PM, ACE Flash acefl...@gmail.com wrote:

 Hey there,

 I was trying to remove the first key and value ( a:foo ) from the oject.

 var obj:Object = {a:foo, b:bar}

 Is there a way to remove it?

 Thank you


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


[Flashcoders] A very simply question of XML toString()

2009-03-19 Thread ACE Flash
Hey there,

I was trying to parse the XML to get all value of title and store them
into array at once. Do I have to use loop to push them into an Array or
there is a shortcut for doing this?

I'd like to get something like this...

var arr:Array = new Array();

// to trace arr
arr[0] = Dictionary 1
arr[1] = Dictionary 2

Thank you



   1. var myXML:XML =
   2.   order
   3.   book
   4.   titleDictionary 1/title
   5.   /book
   6.   book
   7.   titleDictionary 2/title
   8.   /book
   9.   /order;
   10. trace( myXML.book.title.toString() )
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: A very simply question of XML toString()

2009-03-19 Thread ACE Flash
I was using this script, is there any short way to push them into an array?

Thank you.

var myXML:XML =
order
book

titleDictionary 1/title
/book
book
titleDictionary 2/title

/book
/order;

var arr:Array = new Array();
var childLength:uint = myXML.children().length();


for ( var k:uint = 0 ; k  childLength ; k++ )
{
arr.push( myXML.children()[k].title.toString() );

trace( myXML.children()[k].title.toString() )
}




On Thu, Mar 19, 2009 at 1:11 PM, ACE Flash acefl...@gmail.com wrote:

 Hey there,

 I was trying to parse the XML to get all value of title and store them
 into array at once. Do I have to use loop to push them into an Array or
 there is a shortcut for doing this?

 I'd like to get something like this...

 var arr:Array = new Array();

 // to trace arr
 arr[0] = Dictionary 1
 arr[1] = Dictionary 2

 Thank you



1.
var myXML:XML =

2.
   order
3.
   book
4.
   titleDictionary 1/title
5.
   /book
6.
   book
7.
   titleDictionary 2/title
8.
   /book
9.
   /order;
10.
trace( myXML.book.title.toString() )




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


Re: [Flashcoders] Re: A very simply question of XML toString()

2009-03-19 Thread ACE Flash
coool, thanks all!




On Thu, Mar 19, 2009 at 1:42 PM, Kenneth Kawamoto kennethkawam...@gmail.com
 wrote:

 Shorter:

 for each(var item:XML in myXML.book.title){
   arr.push(item.toString());
 }

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

 ACE Flash wrote:

 I was using this script, is there any short way to push them into an
 array?

 Thank you.

 var myXML:XML =
order
book

titleDictionary 1/title
/book
book
titleDictionary 2/title

/book
/order;

 var arr:Array = new Array();
 var childLength:uint = myXML.children().length();


 for ( var k:uint = 0 ; k  childLength ; k++ )
 {
arr.push( myXML.children()[k].title.toString() );

trace( myXML.children()[k].title.toString() )
 }

 ___
 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] Flash Lite

2009-02-09 Thread ACE Flash
Hey There,
Does anybody use the Flash Lite? I'd like to know what's difference for
Flash Lite 1 , 2, 3 ? or run data-driven application with Flash Lite 3?

Is there any articles I can find about Flash Lite?

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


Re: [Flashcoders] How to turn off the DEBUG mode with Google Analytics

2009-02-05 Thread ACE Flash
I appreciate your input. thank u so much!!
it works great~


On Wed, Feb 4, 2009 at 6:12 PM, ekameleon ekamel...@gmail.com wrote:

 Hello :)

 ?? use the value false in the last argument of the constructor ? Read the
 documentation of the class :

 http://code.google.com/p/gaforflash/wiki/API

 search the GATracker class reference ;)

 The full signature of the constructor is :

 GATracker
 http://gaforflash.googlecode.com/svn/documentation/com/google/analytics/GATracker.html#GATracker%28%29
 (display:DisplayObject,
 account:String, mode:String = AS3, visualDebug:Boolean = false, config:
 Configuration
 http://gaforflash.googlecode.com/svn/documentation/com/google/analytics/v4/Configuration.html
 =
 null, debug:
 DebugConfiguration
 http://gaforflash.googlecode.com/svn/documentation/com/google/analytics/debug/DebugConfiguration.html
 =
 null)

 You can disable the visual debug with the parameter visualDebug :

 var tracker:AnalyticsTracker = new GATracker( this, UA-111-222, AS3,
 false );

 or not use the last arguments :

 var tracker:AnalyticsTracker = new GATracker( this, UA-111-222, AS3 ) ;

 PS : you can use the constructor with only two arguments if you want use
 the
 default AS3 mode :

 var tracker:AnalyticsTracker = new GATracker( this, UA-111-222 ) ;

 EKA + :)

 2009/2/4 ACE Flash acefl...@gmail.com

  Hey there,
 
  How can I turn off the debug mode by as3? so I am able to run it on the
  production server.  thanks
 
  ===
 
  import com.google.analytics.AnalyticsTracker;
  import com.google.analytics.GATracker;
  import com.google.analytics.debug.*;
 
  var tracker:AnalyticsTracker = new GATracker( this, UA-111-222, AS3,
  true );
  playGame.addEventListener( MouseEvent.CLICK, onButtonClick );
  function onButtonClick( event:Event ):void {
   trace(test);
   tracker.trackPageview(/myGame1);
  }
  ___
  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] How to turn off the DEBUG mode with Google Analytics

2009-02-04 Thread ACE Flash
Hey there,

How can I turn off the debug mode by as3? so I am able to run it on the
production server.  thanks

===

import com.google.analytics.AnalyticsTracker;
import com.google.analytics.GATracker;
import com.google.analytics.debug.*;

var tracker:AnalyticsTracker = new GATracker( this, UA-111-222, AS3,
true );
playGame.addEventListener( MouseEvent.CLICK, onButtonClick );
function onButtonClick( event:Event ):void {
 trace(test);
 tracker.trackPageview(/myGame1);
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] apply gradient map effec

2008-11-10 Thread ACE Flash
Hey there, I am going to apply the gradient map effect on a image ( the name
called in photoshop = image = ajustments = gradient map ) . do you know
how to deal with it in action script 3?
*http://yarra.ath.cx/zmzm/upload/Picture_1.png*http://yarra.ath.cx/upload/Picture_1.png


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


[Flashcoders] Re: apply gradient map effec

2008-11-10 Thread ACE Flash
any suggestions? please...

On Mon, Nov 10, 2008 at 11:36 AM, ACE Flash [EMAIL PROTECTED] wrote:

 Hey there, I am going to apply the gradient map effect on a image ( the
 name called in photoshop = image = ajustments = gradient map ) . do you
 know how to deal with it in action script 3?
 *http://yarra.ath.cx/zmzm/upload/Picture_1.png*http://yarra.ath.cx/upload/Picture_1.png


 Thank you

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


[Flashcoders] Retrieving URL params from embedded code.

2008-07-11 Thread ACE Flash
hey there,

I was try to retrieve the URL params by using _level0.url in flash


I knew the flashvars, but I was curious about to retrieve the params from
embedded url directly. is that possible?

sample embedded code=


embed src=myflash.swf?url=http://www.msn.com; quality=high
bgcolor=#ff width=300 height=200 name=myflash align=middle
allowScriptAccess=always allowFullScreen=false
type=application/x-shockwave-flash pluginspage=
http://www.macromedia.com/go/getflashplayer; /

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


[Flashcoders] Converting simple XML data into Array

2008-06-19 Thread ACE Flash
hey there, I was using loop to push them into Array

Is there a way to convert this XML file into Array more easily?  like =
 xml as Array?

files
filefile name1/file
filefile name2/file
filefile name3/file
.
/files


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


[Flashcoders] Is it possible to display in the xml file

2008-06-12 Thread ACE Flash
hey there,
Is it possible to display  in the xml file? I tried to convert it to %26,
but it won't display  in the flash

for example:

depFin  IT /dep


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


[Flashcoders] Re: Is it possible to display in the xml file

2008-06-12 Thread ACE Flash
i got it,
uses... = amp;

On Thu, Jun 12, 2008 at 9:14 AM, ACE Flash [EMAIL PROTECTED] wrote:

 hey there,
 Is it possible to display  in the xml file? I tried to convert it to
 %26, but it won't display  in the flash

 for example:

 depFin  IT /dep


 thanks

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


Re: [Flashcoders] Is it possible to display in the xml file

2008-06-12 Thread ACE Flash
thanks for all of your input...it's awesome!

On Thu, Jun 12, 2008 at 1:38 PM, Steven Sacks [EMAIL PROTECTED]
wrote:

 If you put ampersands in attributes, the XML will not parse correctly in
 any browser.

 Ampersands (and other special characters) should go inside CDATA tags to
 maintain valid XML.  :)


 Cedric Muller wrote:

 or you could set an attribute instead of a node

 dep value=Fin  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] Close current browser from flash without alert message.

2008-06-11 Thread ACE Flash
seems only work on IE and NS?? not sure, you may take a look by urself
http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=2844lngWId=2



On Mon, Jun 9, 2008 at 8:42 AM, natalia Vikhtinskaya [EMAIL PROTECTED]
wrote:

 Hi
 I want to close my current(main) browser from flash when a new pop up
 browser appears(first page I use for choosing language).
 I use this code for new window:
 getURL (javascript:window.open('main_eng.html','mainPage','fullscreen=yes,
 scrollbars=no, status=no, menubar=no, titlebar=no, toolbar=no,
 location=no');void(0););
 As I know it is not possible without alert message if I try to close
 current page. But maybe there is a solution?
 ___
 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] Retrieving URL params gets truncate in ActionScript2

2008-05-21 Thread ACE Flash
nice. one more question.
can I convert the string back in Flash? I need to use getURL to launch the
link and want to see the real web address :)

thanks

On Tue, May 20, 2008 at 3:54 PM, Juan Pablo Califano 
[EMAIL PROTECTED] wrote:

 The problem seems to be in what Javascript is sending to the swf.

 Try url encoding the link with the escape function in JS.

 Something like:

 'flashvars':escape('link=
 http://www.google.com?test=1test2=2test3=3test4=4')


 Cheers
 Juan Pablo Califano

 2008/5/20, ACE Flash [EMAIL PROTECTED]:
 
  Hey there,
  I was trying to figure out how to handle this in Action Script 2, the url
  link string gets truncate and stops at test=1. It's weird, is there any
  limitation for handle this in AS2?
 
  Thanks
 
  === action script in test.swf ==
  // reads url links from FlashVars in HTML code
  var theLink:String = _root.link;
 
  // now I get http://www.google.com?test=1
  http://www.google.com/?test=1test2=2test3=3test4=4
  ONLY
  getURL(theLink, _blank);
 
 
  = embedding code in HTML=
 
 var FO = {
  movie:'http://www.google.com/test.swf,
  width:'100',
  height:'200',
  majorversion:'8',
  build:'0',
  name:'sidebarFlash',
  id:'sidebarFlash',
  'flashvars':'link=
 http://www.google.com?test=1test2=2test3=3test4=4
  http://www.google.com/?test=1test2=2test3=3test4=4
  '
 };
 UFO.create(FO, 'sidebar');
  ===
  ___
  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] does most browsers support e4x?

2008-05-21 Thread ACE Flash
hey there,
I heard about some browsers doesn't support e4x? is that true? if so, is
there any info to show me the list?

I would like to get the confirmation before coding them in e4x. :)


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


[Flashcoders] Retrieving URL params gets truncate in ActionScript2

2008-05-20 Thread ACE Flash
Hey there,
I was trying to figure out how to handle this in Action Script 2, the url
link string gets truncate and stops at test=1. It's weird, is there any
limitation for handle this in AS2?

Thanks

=== action script in test.swf ==
// reads url links from FlashVars in HTML code
var theLink:String = _root.link;

// now I get 
http://www.google.com?test=1http://www.google.com/?test=1test2=2test3=3test4=4
 ONLY
getURL(theLink, _blank);


= embedding code in HTML=

var FO = {
 movie:'http://www.google.com/test.swf,
 width:'100',
 height:'200',
 majorversion:'8',
 build:'0',
 name:'sidebarFlash',
 id:'sidebarFlash',
 
'flashvars':'link=http://www.google.com?test=1test2=2test3=3test4=4http://www.google.com/?test=1test2=2test3=3test4=4
'
};
UFO.create(FO, 'sidebar');
===
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Re: Retrieving URL params gets truncate in ActionScript2

2008-05-20 Thread ACE Flash
humm I have tried to put the string in [ ]
'flashvars':'link=[http://www.google.com?test=1test2=2test3=3test4=4]http://www.google.com/?test=1test2=2test3=3test4=4
'


it still search from link= and stop on the frist params which is test=1
in this case. Is there any way to handle this in AS2?

Cheers




On Tue, May 20, 2008 at 3:28 PM, ACE Flash [EMAIL PROTECTED] wrote:

 Hey there,
 I was trying to figure out how to handle this in Action Script 2, the url
 link string gets truncate and stops at test=1. It's weird, is there any
 limitation for handle this in AS2?

 Thanks

 === action script in test.swf ==
 // reads url links from FlashVars in HTML code
 var theLink:String = _root.link;

 // now I get 
 http://www.google.com?test=1http://www.google.com/?test=1test2=2test3=3test4=4
  ONLY
 getURL(theLink, _blank);


 = embedding code in HTML=

 var FO = {
  movie:'http://www.google.com/test.swf,
  width:'100',
  height:'200',
  majorversion:'8',
  build:'0',
  name:'sidebarFlash',
  id:'sidebarFlash',
  'flashvars':'link=
 http://www.google.com?test=1test2=2test3=3test4=4http://www.google.com/?test=1test2=2test3=3test4=4
 '
 };
 UFO.create(FO, 'sidebar');
 ===


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


[Flashcoders] Is there anyway can share user login status between .aspx and flash?

2008-05-16 Thread ACE Flash
Hi guys, I was trying to figure out how to get this done in flash.
for example;

I had 2 pages on .net platform, the first page was regular aspx login page
that allows user to enter user name and password, they could click Login
button to login the system.

After login, use could see page 2 which embedded flash application. how can
flash detect user has already been logged in status ( yes or no ) ?

Can I save user login information in cookie locally once user login in the
system? ( this should be handled by .aspx )

Can I retrieve cookie information which created by .aspx in Flash? Is that
possible?

Is there anyway can share user login status between .aspx and flash?

* I know flash can create/retrieve SharedOject,
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] Retrieve The Web Link

2008-05-08 Thread ACE Flash
Hi there,

I embedded my SWF into HTML page, when I have launched the page on web, I
would like to retrieve the URL.

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


[Flashcoders] Re: Retrieve The Web Link

2008-05-08 Thread ACE Flash
I am using AS2, thanks

On Thu, May 8, 2008 at 9:47 AM, ACE Flash [EMAIL PROTECTED] wrote:

 Hi there,

 I embedded my SWF into HTML page, when I have launched the page on web, I
 would like to retrieve the URL.

 Any suggestion?

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


Re: [Flashcoders] Re: Retrieve The Web Link

2008-05-08 Thread ACE Flash
I got it, we could use this._url to retrieve the path.

thanks

On Thu, May 8, 2008 at 10:36 AM, Dennis - I Sioux [EMAIL PROTECTED] wrote:

 Emm..  _url?


 - Original Message - From: ACE Flash [EMAIL PROTECTED]
 To: flashcoders@chattyfig.figleaf.com
 Sent: Thursday, May 08, 2008 3:48 PM
 Subject: [Flashcoders] Re: Retrieve The Web Link


   I am using AS2, thanks
 
  On Thu, May 8, 2008 at 9:47 AM, ACE Flash [EMAIL PROTECTED] wrote:
 
  Hi there,
  
   I embedded my SWF into HTML page, when I have launched the page on
   web, I
   would like to retrieve the URL.
  
   Any suggestion?
  
   ___
  Flashcoders mailing list
  Flashcoders@chattyfig.figleaf.com
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  __ NOD32 3086 (20080508) Informatie __
 
  Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem.
  http://www.nod32.nl
 
 
 
 ___
 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 Function to Create Objects

2008-05-05 Thread ACE Flash
 Hi there, I am reading ActionScript 3 Essential,  there is an example code
shows on page 290. When I tried to run the code, I got an error msg = 
1048: Method cannot be used as a constructor.


http://www.privatepaste.com/dagJFB6kD5

Any Suggestions?

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


Re: [Flashcoders] Using Function to Create Objects

2008-05-05 Thread ACE Flash
thank you guys :)

On Mon, May 5, 2008 at 11:39 AM, Wagner Amaral [EMAIL PROTECTED]
wrote:

 Well, that is AS3 indeed (have the book beside me)

 The topic is about closures, and that sort of constructor only works
 inside
 a method in an existing class, or in a frame in a timeline (it says so in
 the
 book in the same page, the full code is omitted for the sake of brevity,
 so
 just finish reading before trying the code ;)


 On Monday 05 May 2008 11:54:47 McVirusS wrote:
  Hi,
 
  Are you sure you are not reading Essential Actionscript 1.0? ;)
 
  Because the code you link to is AS 1.0 and not AS 3.0. You can test the
  code by changing the Actionscript version to 2.0 or 1.0 in the Publish
  Settings dialog.
 
  Regards,
  Meinaart
 
  - Original Message -
  From: ACE Flash [EMAIL PROTECTED]
  To: flashcoders@chattyfig.figleaf.com
  Sent: Monday, May 05, 2008 4:22 PM
  Subject: [Flashcoders] Using Function to Create Objects
 
   Hi there, I am reading ActionScript 3 Essential,  there is an example
   code shows on page 290. When I tried to run the code, I got an error
 msg
   =  1048: Method cannot be used as a constructor.
  
  
   http://www.privatepaste.com/dagJFB6kD5
  
   Any Suggestions?
  
   Thanks
   ___
   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 mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] A simple question for getting Object info.

2008-05-04 Thread ACE Flash
Robert, it's awesome. Thank you!

On Fri, May 2, 2008 at 5:52 PM, Robert Leisle [EMAIL PROTECTED] wrote:

 Hi ACE,

 This works:

 var bookList:Object = {
  BOOK1:{isbn:155209328X,Price:$19.95.,Title:This is Book1 Title},
  BOOK2:{isbn:0072231726,Price:$24.95.,Title:This is Book2 Title} };

 for (var book:* in bookList) {
trace(book);
for (var i:* in bookList[book]) {
trace(\t+i+: +bookList[book][i]);
}
 }
 /*Output:
 BOOK1
Price: $19.95.
isbn: 155209328X
Title: This is Book1 Title
 BOOK2
Price: $24.95.
isbn: 0072231726
Title: This is Book2 Title
 */

 Hth,
 Bob

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of ACE Flash
 Sent: Friday, May 02, 2008 2:12 PM
 To: flashcoders@chattyfig.figleaf.com
 Subject: [Flashcoders] A simple question for getting Object info.

 Hi there,

 I could use for... in script to retrieve BOOK1, BOOK2 as below. Do you
 know
 how can I retrieve all data inside of {} for BOOK1, BOOK2?

 I tried to use for..each..in script... but I could only get the OBJECT.

 Thank you

 var bookList:Object = {
  BOOK1:{isbn:155209328X,Price:$19.95.,Title:This is Book1 Title},
  BOOK2:{isbn:0072231726,Price:$24.95.,Title:This is Book2 Title}
 };

 for (var bok:* in bookList) {
 trace(bok);
 }

 //for each (var bok:* in bookList) {
  //trace(bok);
 //}
 ___
 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] How to create Radio Buttons with Grouping

2008-04-30 Thread ACE Flash
I dragged 2 radio buttons on the Stage ( from Components panel ). I would
like to group them so when I click one of them, I could get radio 1 or 2
selected.

Does anyone know how to do this?

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


[Flashcoders] How to compare 2 dynamic Arrays

2008-04-27 Thread ACE Flash
Hi there,

I have 2 dynamic Arrays, t1Array and  t2Array, both of them need
compare with sArray(standard array).

I have to call Line 26 for each t2Array[n] = onCompare(sArray, t2Array[0]);

is there any simply way  to achieve this? so it could be looping for
comparing all dynamic arrays?


http://www.privatepaste.com/901OpAMhtn

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


[Flashcoders] How to check Recursive Function is finished

2008-04-25 Thread ACE Flash
Hi there,
Is there a way to check if my recursive function is finished and exited? so
I could call another function once it finished. As an example below, it
could be any number instead of 5 in my program,

I am wondering there is a listener can be use for monitoring a Recursive
Function.  Is that possible?

Thank You

function traceMe(n) { if (n=5) { trace(This is the +n+th time that the
function is run.); traceMe(n+1); trace(End of the +n+th function.); } }
traceMe(1);
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] How to check Recursive Function is finished

2008-04-25 Thread ACE Flash
great! tones of solutions.
Thanks dudes!

On Fri, Apr 25, 2008 at 2:10 PM, Paul Andrews [EMAIL PROTECTED] wrote:

 - Original Message - From: Jason Lutes [EMAIL PROTECTED]
 To: Flash Coders List flashcoders@chattyfig.figleaf.com
 Sent: Friday, April 25, 2008 6:09 PM
 Subject: Re: [Flashcoders] How to check Recursive Function is finished


  I occasionally place code at the end of the function to detect when it's
 not being invoked by itself.


 Then you are just avoiding creating two functions by adding special
 conditions to one function.

 You are essentially doing the following kind of thing but inside one
 function :

 function A(somevalue:Number):void {
   B(somevalue);
   // do something else here
 }

 function B(somevalue::Number):void {
   if (somevalue  0){
   B(--somevalue);
 }

 A(10);

 To my mind it would be better not to complicate the recursive function just
 for the sake of avoiding writing what's really going on.

 Paul


 ___
 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] Removing a displayObject by using removeChild()

2008-04-24 Thread ACE Flash
Hi there,

I would like to define a variable, so I could pass any name to
createNavigatorButton and using removeNavigatorButton to remove it.

I wrote a simple code here  http://www.privatepaste.com/e8tI4OgtHg, but I
got an error msg = TypeError: Error #1034: Type Coercion failed: cannot
convert _Flash to flash.display.DisplayObject.


Any suggestion?

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


Re: [Flashcoders] Removing a displayObject by using removeChild()

2008-04-24 Thread ACE Flash
buddy,
It works. :) removeChildAt(getChildIndex( targetToRemove )); should be
removeChild @v@

I appreciate that all of your posts in the topic .

Thanks ALL! :))



On Thu, Apr 24, 2008 at 10:00 AM, Sidney de Koning [EMAIL PROTECTED]
wrote:

 try doing this, it should work:

 import flash.text.TextField;
 var _pValue:TextField;

 function createNavigatorButton( txt:String ) {
_pValue = new TextField();
_pValue.text = txt;
_pValue.backgroundColor = 0x00;
_pValue.x = 60;
_pValue.y = 400;
addChild( _pValue );
 }

 function removeNavigatorButton( txt:String ) {
//_pValue = _+pValue;
_pValue.name = txt;
var targetToRemove:DisplayObject =
 this.getChildByName(_pValue.name);

trace(getChildIndex( targetToRemove ) )
removeChildAt(getChildIndex( targetToRemove ));

 }

 createNavigatorButton( Flash );
 removeNavigatorButton( Flash );



 On Apr 24, 2008, at 3:48 PM, Andres Garcia wrote:

  this line:
 
  _pValue = DisplayObject(_+pValue);
 
  has the problem you are casting from string to displayObject...
 
  you can try something like:
 
  createnavigatorButton(pValue:String){
 ...
 _pValue.name = pValue;
 ...
 
  }
 
  function removeNavigatorButton( pValue:String ) {
  ...
 _pValue = DisplayObject(this.getChildByName(_ + pValue));
 this.removeChild(_pValue);
  ...
  }
  On Apr 24, 2008, at 8:30 AM, ACE Flash wrote:
 
   Hi there,
  
   I would like to define a variable, so I could pass any name to
   createNavigatorButton and using removeNavigatorButton to remove it.
  
   I wrote a simple code here  http://www.privatepaste.com/e8tI4OgtHg,
   but I
   got an error msg = TypeError: Error #1034: Type Coercion failed:
   cannot
   convert _Flash to flash.display.DisplayObject.
  
  
   Any suggestion?
  
   Thanks 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
 
 
 ___
 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] How to retrieve all itmes in RSS

2008-03-19 Thread ACE Flash
Hi there,

I am going to build an RSS reader by using Flash action scrip, I was
wondering how to retrieve all items in Media  Advertising RSS. ( all items
means, I wanna get all data feed, you could see only couple of pages in
Media  Advertising RSS link below at the moment)

Possibly, I could pass some parameters into URL? for example: *
MediaandAdvertising.xml?RetrieveAll* , so I could read all data in my RSS
reader.

 for example: http://www.nytimes.com/services/xml/rss/index.html

Media  Advertising RSS :
http://www.nytimes.com/services/xml/rss/nyt/MediaandAdvertising.xml

Any suggestions?

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