Re: [Flashcoders] It exists in director but in flash ?

2006-03-22 Thread Weyert de Boer

Did you try eval() ?
___
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] It exists in director but in flash ?

2006-03-22 Thread Merrill, Jason
Yes, you can. Example:

//the function:
function myFunction (inputname){
trace(hello +inputname+ from myFunction);
}

//the string:
theStringOfFunction = myFunction;

//run it with a parameter too:
this[theStringOfFunction](Patrick) ;
//or:
eval(theStringOfFunction)(Patrick) ;


Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Patrick Jean
Sent: Wednesday, March 22, 2006 10:58 AM
To: [EMAIL PROTECTED] Figleaf. Com
Subject: [Flashcoders] It exists in director but in flash ?

Is there any way in Flash 8 to tell the compiler to run a string as if
it
was a method ? See the exemple below :



var tempString:String;

tempString = anObject.doSomething()



and having the string being interpreted as a command ? I thought I
could do
that with eval but it doesn't seem to work.



I remember that with Director you could use the do command using a
string,
what was pretty convenient.



Thanks



Patrick Jean

Directeur de projets internet

Monac'OH Data Mercantour

http://www.monacoh.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
NOTICE:
This message is for the designated recipient only and may contain privileged or 
confidential information. If you have received it in error, please notify the 
sender immediately and delete the original. Any other use of this e-mail by you 
is prohibited.
___
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] It exists in director but in flash ?

2006-03-22 Thread Bernard Visscher
I think this will work:

function test(){
trace(test);
}

var str:String;
str = eval(test);
Function(str).apply();

Greetz,

Bernard

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Patrick Jean
Verzonden: woensdag 22 maart 2006 16:58
Aan: [EMAIL PROTECTED] Figleaf. Com
Onderwerp: [Flashcoders] It exists in director but in flash ?

Is there any way in Flash 8 to tell the compiler to run a string as if it
was a method ? See the exemple below :

 

var tempString:String;

tempString = anObject.doSomething()

 

and having the string being interpreted as a command ? I thought I could do
that with eval but it doesn't seem to work.

 

I remember that with Director you could use the do command using a string,
what was pretty convenient.

 

Thanks

 

Patrick Jean

Directeur de projets internet

Monac'OH Data Mercantour

http://www.monacoh.com

 

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

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

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

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


RE: [Flashcoders] It exists in director but in flash ?

2006-03-22 Thread Patrick Jean
Yes and it doesn't work :(

I tested with an array with :
aTempArray=[trace(\TEST1\),trace(\TEST2\),trace(\TEST3\)];

If I trace my array element it outputs properly the ' trace(test1) but
when I do an eval on it nothing happens. It doesn't give me an error, it
just doesn't run the trace.

I can always do a work-around, so it's not critical in my project, but I
wanted to use that concept in a sequencing class, because my project
requires a lot of calls to the server, and to avoid having to update all the
time the chain of sequences, I wanted to put the different methods I will
need in an array of strings, and run them automatically. I guess I'll have
to go with a giant switch instead.


Patrick Jean
Directeur de projets internet
Monac'OH Data Mercantour
http://www.monacoh.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Weyert de
Boer
Sent: Wednesday, March 22, 2006 11:06 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] It exists in director but in flash ?

Did you try eval() ?
___
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] It exists in director but in flash ?

2006-03-22 Thread Patrick Jean
oooh, yes, that will definitely do the job !  Thanks a lot. 

Like I mentioned earlier, the trace in my example was just to see if I
could use eval that way, but the whole idea is to call methods  functions,
and I didn't know the apply() , so thanks a lot !

Patrick Jean
Directeur de projets internet
Monac'OH Data Mercantour
http://www.monacoh.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bernard
Visscher
Sent: Wednesday, March 22, 2006 11:15 AM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] It exists in director but in flash ?

I think this will work:

function test(){
trace(test);
}

var str:String;
str = eval(test);
Function(str).apply();

Greetz,

Bernard

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Patrick Jean
Verzonden: woensdag 22 maart 2006 16:58
Aan: [EMAIL PROTECTED] Figleaf. Com
Onderwerp: [Flashcoders] It exists in director but in flash ?

Is there any way in Flash 8 to tell the compiler to run a string as if it
was a method ? See the exemple below :

 

var tempString:String;

tempString = anObject.doSomething()

 

and having the string being interpreted as a command ? I thought I could do
that with eval but it doesn't seem to work.

 

I remember that with Director you could use the do command using a string,
what was pretty convenient.

 

Thanks

 

Patrick Jean

Directeur de projets internet

Monac'OH Data Mercantour

http://www.monacoh.com

 

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

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

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

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

___
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] It exists in director but in flash ?

2006-03-22 Thread Merrill, Jason
and I didn't know the apply() , so thanks a lot !

You don't need to use apply() on a separate line - just add () after the
eval, as in my example:

this[myFunctionString]();



Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Patrick Jean
Sent: Wednesday, March 22, 2006 11:19 AM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] It exists in director but in flash ?

oooh, yes, that will definitely do the job !  Thanks a lot.

Like I mentioned earlier, the trace in my example was just to see if
I
could use eval that way, but the whole idea is to call methods 
functions,
and I didn't know the apply() , so thanks a lot !

Patrick Jean
Directeur de projets internet
Monac'OH Data Mercantour
http://www.monacoh.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Bernard
Visscher
Sent: Wednesday, March 22, 2006 11:15 AM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] It exists in director but in flash ?

I think this will work:

function test(){
  trace(test);
}

var str:String;
str = eval(test);
Function(str).apply();

Greetz,

Bernard

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Patrick Jean
Verzonden: woensdag 22 maart 2006 16:58
Aan: [EMAIL PROTECTED] Figleaf. Com
Onderwerp: [Flashcoders] It exists in director but in flash ?

Is there any way in Flash 8 to tell the compiler to run a string as if
it
was a method ? See the exemple below :



var tempString:String;

tempString = anObject.doSomething()



and having the string being interpreted as a command ? I thought I
could do
that with eval but it doesn't seem to work.



I remember that with Director you could use the do command using a
string,
what was pretty convenient.



Thanks



Patrick Jean

Directeur de projets internet

Monac'OH Data Mercantour

http://www.monacoh.com



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

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

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

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

___
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
NOTICE:
This message is for the designated recipient only and may contain privileged or 
confidential information. If you have received it in error, please notify the 
sender immediately and delete the original. Any other use of this e-mail by you 
is prohibited.
___
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] It exists in director but in flash ?

2006-03-22 Thread Bernard Visscher
You're right.. I never use this ;)

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Merrill, Jason
Verzonden: woensdag 22 maart 2006 17:22
Aan: Flashcoders mailing list
Onderwerp: RE: [Flashcoders] It exists in director but in flash ?

and I didn't know the apply() , so thanks a lot !

You don't need to use apply() on a separate line - just add () after the
eval, as in my example:

this[myFunctionString]();



Jason Merrill   |   E-Learning Solutions   |  icfconsulting.com










-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Patrick Jean
Sent: Wednesday, March 22, 2006 11:19 AM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] It exists in director but in flash ?

oooh, yes, that will definitely do the job !  Thanks a lot.

Like I mentioned earlier, the trace in my example was just to see if
I
could use eval that way, but the whole idea is to call methods 
functions,
and I didn't know the apply() , so thanks a lot !

Patrick Jean
Directeur de projets internet
Monac'OH Data Mercantour
http://www.monacoh.com

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Bernard
Visscher
Sent: Wednesday, March 22, 2006 11:15 AM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] It exists in director but in flash ?

I think this will work:

function test(){
  trace(test);
}

var str:String;
str = eval(test);
Function(str).apply();

Greetz,

Bernard

-Oorspronkelijk bericht-
Van: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Namens Patrick Jean
Verzonden: woensdag 22 maart 2006 16:58
Aan: [EMAIL PROTECTED] Figleaf. Com
Onderwerp: [Flashcoders] It exists in director but in flash ?

Is there any way in Flash 8 to tell the compiler to run a string as if
it
was a method ? See the exemple below :



var tempString:String;

tempString = anObject.doSomething()



and having the string being interpreted as a command ? I thought I
could do
that with eval but it doesn't seem to work.



I remember that with Director you could use the do command using a
string,
what was pretty convenient.



Thanks



Patrick Jean

Directeur de projets internet

Monac'OH Data Mercantour

http://www.monacoh.com



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

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

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

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

___
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
NOTICE:
This message is for the designated recipient only and may contain privileged
or confidential information. If you have received it in error, please notify
the sender immediately and delete the original. Any other use of this e-mail
by you is prohibited.
___
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