Away3d 3.6 - Accessing the MovieMaterial’s MovieClip

Software: Away3D 3.x

kz, Newbie
Posted: 17 November 2011 07:26 PM   Total Posts: 30

Hi, I need to access methods and properties of a movieclip material, I made some researches (http://blog.alladvanced.net/?p=156) but I still can’t solve the issue.

package  planets.basePlanet

 import away3d
.containers.ObjectContainer3D;
 
import away3d.materials.MovieMaterial;
 
import away3d.primitives.Sphere
 
import flash.display.MovieClip;
 
import away3d.materials.WireColorMaterial;

 public class 
PlanetBase extends ObjectContainer3D
 {
  [Embed
(source "cubeTexture.swf")
  
private var objectTexture:Class; 
  
  private var 
objectMesh:Cubec4d = new Cubec4d (); //as3 exported cube from cinema4d
  
private var movieMaterial:MovieMaterial//swf movie material 
  
private var textureMovieclip:MovieClip//reference to the movie material
  
  
public function PlanetBase() 
  
{

   movieMaterial
= new MovieMaterial(new objectTexture());;
   
movieMaterial.interactive true;
   
movieMaterial.smooth true;
   
objectMesh.material movieMaterial;
   
addChild(objectMesh);
   
   
textureMovieclip movieMaterial.movie as MovieClip;

   
off();

  
}
  
  
public function on ():void {
   
   textureMovieclip
.gotoAndStop(2);
    
  
}
  
  
public function off ():void {

   textureMovieclip
.gotoAndStop(1);
   
  
}
  
 }

Do you have any hint on this subject?

Thanks in advance <3
kz

 

   

Avatar
SasMaster, Sr. Member
Posted: 20 November 2011 08:35 AM   Total Posts: 127   [ # 1 ]

I don’t get you,the solutions you have seen on my blog has not worked?
For me it works fine.Make sure your MovieClip is MovieClip and not Sprite.Sprites have no timeline.

 Signature 

This looks like a job for superman
http://blog.alladvanced.net

   

kz, Newbie
Posted: 20 November 2011 04:40 PM   Total Posts: 30   [ # 2 ]

I’m using a movieclip exported from flash (cs5), just a normal swf. It reflects in size an uvmap exported from C4d, in witch I have 6 interactive squares.

Could be related to the way I embed the swf? Do you embed your swf in other ways? 

This is the way I embed the swf:

[Embed(source "cubeTexture.swf")
private var objectTexture:Class; 

Shall I export my swf with some particular options?

(sorry if I ask stupidities, I’m not really a pro…)

Thanks for your reply (:

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X