Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Evaluating a String!!!!!!!

Status
Not open for further replies.

kdunne

Programmer
Dec 12, 2002
4
US
Hi
I was wondering if there was a way to have a variable hold a string such as:
var="movieClipname._visible=false";

and then later run something that evaluated that whole string. What I am trying to do is some how capture what a user does (like dragging clips etc) by storing each action as a string and then evaluate the whole thing in order to "replay" what they did. I looked at using eval() but that seems to only evaluate the movieClip and not the entire string. Any thoughts???? I've totally hit a dead end.

thanks in advance :)
 
dont know if this will help or not but if you assigned a number to each possible user action and added that number to an array (push) then you could have a replay button which then then stepped through that array (for to array.length) and include a select case statement

something like

select (myarray){
case 1:
gotoAndStop(2);
break;
case 2;
//and so on

anyway i just thought that would that be easier to implemnt than trying to convert a string to an executable actionscript statement
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top