Re: [Flashcoders] Selection.getFocus()

2006-10-19 Thread Michael Stuhr

Lieven Cardoen schrieb:
FlashCoders, 

 


Selection.getFocus() gives back a String. Is there a way to get the
Object?


eval()

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

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


Re: [Flashcoders] Selection.getFocus()

2006-10-19 Thread Zárate

Exactly. I was amazed too first time I saw it.

As micha said, you can do

getFocusObject():MovieClip{
  eval(Selection.getFocus());
}

Any ideas why is working that way?

Cheers

On 10/19/06, Michael Stuhr [EMAIL PROTECTED] wrote:

Lieven Cardoen schrieb:
 FlashCoders,



 Selection.getFocus() gives back a String. Is there a way to get the
 Object?

eval()

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

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




--
Juan Delgado - Zárate
http://www.zarate.tv
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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


Re: [Flashcoders] Selection.getFocus()

2006-10-19 Thread David Buff

Hi

I did something like this before... You can do a recursive method parsing 
the path like this:


function extractObject(aPath:String):Object {
   return extractObjectRecurs(this, aPath.split(.), 0);
} // end extractRunTime

function 
extractObjectRecurs(aRankObject:Object,aPathArray:Array,aIndex:Number):Object 
{

   if (aIndexaPathArray.length-1) {
   return 
extractObjectRecurs(aRankObject[aPathArray[aIndex]],aPathArray,aIndex+1);

   } else {
   return aRankObject[aPathArray[aIndex]];
   }
} // end extractRecursRunTime


onEnterFrame = function() {
   trace(--- NEW FRAME );
   var path:String = Selection.getFocus();
   trace(PATH: +path);
   var object:Object = extractObject(path);
   trace(TARGET POSITION: +object._x);
}

Put your object inside your object inside your object inside ... and on the 
stage... run the fla and select it.


David Buff
- Original Message - 
From: Lieven Cardoen [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, October 19, 2006 4:53 PM
Subject: [Flashcoders] Selection.getFocus()


FlashCoders,



Selection.getFocus() gives back a String. Is there a way to get the
Object?



Thx, Lieven Cardoen



Lieven Cardoen
Application developer

indiegroup
interactive digital experience
engelse wandeling 2 k18
b8500 kortrijk



Indie group zal op maandag 23 oktober uitzonderlijk gesloten zijn.

Indie group will be closed on Monday, October 23th.



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

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

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

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


Re: [Flashcoders] Selection.getFocus()

2006-10-19 Thread David Buff

Hi again...

eval works but it's a old fonction... I'm not sure it works good in AS 2.0

David Buff

- Original Message - 
From: Michael Stuhr [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, October 19, 2006 5:08 PM
Subject: Re: [Flashcoders] Selection.getFocus()



Lieven Cardoen schrieb:
FlashCoders, 

 


Selection.getFocus() gives back a String. Is there a way to get the
Object?


eval()

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

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


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

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


Re: [Flashcoders] Selection.getFocus()

2006-10-19 Thread Muzak
eval() is not deprecated.
It's usage has changed in different versions.

http://livedocs.macromedia.com/flash/8/main/1726.html

regards,
Muzak

- Original Message - 
From: David Buff [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Thursday, October 19, 2006 7:10 PM
Subject: Re: [Flashcoders] Selection.getFocus()


 Hi again...

 eval works but it's a old fonction... I'm not sure it works good in AS 2.0

 David Buff



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

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


RE: [Flashcoders] Selection.getFocus()

2006-10-19 Thread Steven Sacks | BLITZ
 eval() is not deprecated.

You're right.  It's more than deprecated.  It's been removed altogether
in the next version of Flash.


http://livedocs.macromedia.com/flex/2/langref/migration.html

Global Functions

eval()  Removed


No screen name said on Jul 22, 2006 at 7:59 AM :

Why was eval() removed?

djtechwriter said on Jul 25, 2006 at 5:31 PM :

eval() was removed because the implementation of it in AS2 was
limited and you can use other more efficient operations for obtaining
the same result. In the AS2 entry for eval():
http://livedocs.macromedia.com/flash/8/main/1726.html
You'll notice the description suggests some alternatives.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

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