Holomatix

Log In / Register


Purchase
I cannot seem to get the eval() function working
Question

We are trying to make an instance of a scene object by stating:
myObject = (“renderWindow.” + obj)
where ‘obj’ is the name of the object – but this will not work. 

Solution

The reason this fails is not eval(), but rather due to the Flash 4 style 'dot slash' syntax (using a '.' in a variable name stored in a string or a text field variable).

Blaze 3D currently has not implemented this style yet, so rather use square brackets for the same effect:

myObject = renderWindow[obj]; 

 
< Prev   Next >


© Copyright 2000-2011 Holomatix Ltd. All rights reserved.