Switch Layer Problem
Posted: Thu Aug 28, 2014 5:00 am
MY GOAL:
I would like the user to be able to draw on a switch layer and have whatever they draw get placed on frame 0 of the currently active sub-layer. This will allow users to easily do FBF animations in a form similar to flash and other FBF programs.
THE PROBLEM:
When the switch layer is selected, I first find the name of the active layer. Then I do a 'for loop' and look for a sub-layer that matches the name. This gives me the MohoLayer of my sub-layer. I executed the function MohoLayer:LayerType() and got 1, which means it's a vector layer. The problem is that when I try to access the mesh for this vector layer, the program always tells me that the Mesh() function is nil.
Now correct me if I'm wrong, but "Vector Layers" are the same as "MeshLayer", right? If you check the API for MeshLayer, you'll see the function "Mesh()", but the programs seems to be ignoring this ... any ideas?
LINK TO MESH LAYER API: http://aslua.com/index.php?show=class&name=MeshLayer
I would like the user to be able to draw on a switch layer and have whatever they draw get placed on frame 0 of the currently active sub-layer. This will allow users to easily do FBF animations in a form similar to flash and other FBF programs.
THE PROBLEM:
When the switch layer is selected, I first find the name of the active layer. Then I do a 'for loop' and look for a sub-layer that matches the name. This gives me the MohoLayer of my sub-layer. I executed the function MohoLayer:LayerType() and got 1, which means it's a vector layer. The problem is that when I try to access the mesh for this vector layer, the program always tells me that the Mesh() function is nil.
Now correct me if I'm wrong, but "Vector Layers" are the same as "MeshLayer", right? If you check the API for MeshLayer, you'll see the function "Mesh()", but the programs seems to be ignoring this ... any ideas?
LINK TO MESH LAYER API: http://aslua.com/index.php?show=class&name=MeshLayer