?
Solved

eval in AS3

Posted on 2010-04-01
2
Medium Priority
?
706 Views
Last Modified: 2013-11-11
Hey can somebody help me please !!!

I am migrating from AS2 to AS3 and i used a lot eval, here I put the way that I used and now I would like to know how to replace it in AS3, thanks in advance.

function blabla(){
    instanceNameFromMc = this._name;
    var tempVar = eval(instanceNameFromMc);
    instanceNameFromMc._x = 34;
    instanceNameFromMc._y = 34;
    trace (instanceNameFromMc)//[instance name as MC Object]
}
function blabla(){
instanceNameFromMc = this._name;
var tempVar = eval(instanceNameFromMc);
instanceNameFromMc._x = 34;
instanceNameFromMc._y = 34;
trace (instanceNameFromMc)//[instance name as MC Object]
}

Open in new window

0
Comment
Question by:offrenbaruna
2 Comments
 
LVL 37

Accepted Solution

by:
CyanBlue earned 1000 total points
ID: 29375871
You could use getChildByName() function like this...

   var tempVar = getChildByName(instanceNameFromMc);

CyanBlue
0
 

Author Closing Comment

by:offrenbaruna
ID: 31710078
Cool thanks it worked !
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The goal of the tutorial is to teach the user how to how to record live broadcast.
Suggested Courses

593 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question