InheritanceSprite Inheritance FreeSpin3D
Language version: ActionScript 3.0
Player version: Flash Player 9.0.28.0

Documentation for FreeSpin3D™ classes includes syntax, usage information, and code samples. The classes are listed alphabetically.

Public Properties
 PropertyDefined by
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  RviAutoRun : Boolean
Sets the display of the FreeSpin3D Model to be automatic.
FreeSpin3D
  RviKeyInteractive : Boolean
Enables keyboard control on the FreeSpin3D Model.
FreeSpin3D
  RviMouseInteractive : Boolean
Enables mouse control on the FreeSpin3D Model.
FreeSpin3D
  RviViewMode : string
A string that defines the viewing mode.
FreeSpin3D
  RviGoToFrame : Number
Move the 3DModel to a specified frame.
FreeSpin3D
  RviAutoX : Number
Automatically rotates the FreeSpin3D Model along the X axis.
FreeSpin3D
  RviAutoY : Number
Automatically rotates the FreeSpin3D Model along the Y axis.
FreeSpin3D
  RviProgressMovieClip : String
Displays the Render progress of the 3DModel.
FreeSpin3D
  RviDoPreparation : Boolean
Sets/remove a learning mode while loading the FreeSpin3D Model.
FreeSpin3D
  RviSmoothTexture : Boolean
Sets/remove the FreeSpin3D Model texture to smooth.
FreeSpin3D
  RviModelId : String
Changes the FreSpin3D Model Id.
FreeSpin3D
Public Methods
Property Detail
RviAutoRun()Property
RviAutoRun:Boolean  [read-Write]

Language version: ActionScript 3.0
Player version: Flash Player 9

Determinate if the 3dModel will be automatic played or not.

Parameters

True:Boolean — The Component will be automatically played.

Implementation
public function RviAutoRun = true;
RviKeyInteractiveproperty 
RviKeyInteractive:Boolean  [read-Write]

Language version: ActionScript 3.0
Player version: Flash Player 9

Determinate if the 3dModel reacts to keyboard events,if true the 3dModel is controlled
by the user with the use of the keyboard arrows.


Implementation
    public function RviKeyInteractive = true;
RviMouseInteractiveproperty 
RviMouseInteractive:Boolean  [read-Write]

Language version: ActionScript 3.0
Player version: Flash Player 9

Determinate if the 3dModel reacts to keyboard events,if true the 3dModel is controlled
by the user with the use of the keyboard arrows.


Implementation
    public function RviMouseInteractive = true;
RviViewModeproperty 
RviViewMode:String  [read-Write]

Language version: ActionScript 3.0
Player version: Flash Player 9

Sets the view mode to Absolute or Smooth view.

Parameters
RviViewMode:Absolute  — View the model in the frames rotation view.
RviViewMode:Smooth   — View the model in the smooth rotation view.

Implementation

    public function RviViewMode = "Absolute"
    public function RviViewMode = "Smooth"

RviGoToFrameproperty 
RviGoToFrame:Number  [read-Write]

Language version: ActionScript 3.0
Player version: Flash Player 9

Moves the 3dModel to a specific frame.

Parameters
RviGoToFrame:Number  — View the model in the frames rotation view.

Implementation
    public function RviGoToFrame = 2;

RviAutoXproperty 
RviAutoX:Number  [read-Write]

Language version: ActionScript 3.0
Player version: Flash Player 9

Automatically rotates the 3dModel along the X axis.

Parameters
RviAutoX:Number

Implementation
    public function RviAutoX = 3;

RviAutoYproperty 
RviAutoY:Number  [read-Write]

Language version: ActionScript 3.0
Player version: Flash Player 9

Automatically rotates the 3dModel along the Y axis.

Parameters
RviAutoY:Number

Implementation
    public function RviAutoY = 2;

RviProgressMovieClipproperty 
RviProgressMovieClip:String  [read-Write]

Language version: ActionScript 3.0
Player version: Flash Player 9

Displays the Render progress of the 3DModel.

Parameters
RviProgressMovieClip:String

Implementation
    public function RviProgressMovieClip = "myPreloader";

RviDoPreparationproperty 
RviDoPreparation:Boolean  [read-Write]

Language version: ActionScript 3.0
Player version: Flash Player 9

Determinate if the preparation mode is turned on or off.

Parameters
RviDoPreparation:Boolean

Implementation
    public function RviDoPreparation = true;

RviSmoothTextureproperty 
RviSmoothTexture:Boolean  [read-Write]

Language version: ActionScript 3.0
Player version: Flash Player 9

Determinate whether the 3dModel texture is smooth or not.

Parameters
RviSmoothTexture:Boolean

Implementation
    public function RviSmoothTexture = true;

RviModelIdproperty 
RviModelId:String  [read-Write]

Language version: ActionScript 3.0
Player version: Flash Player 9

change the Model id.

Parameters
RviModelId:String

Implementation
    public function RviModelId = "My3dModel";

Constructor Detail
FreeSpin3D()Constructor
public function FreeSpin3D()

Language version: ActionScript 3.0
Player version: Flash Player 9

Creates a new FreeSpin3D instance.After you create the FreeSpin3D instance, call the RviInit Method in order to intialize the 3dModel.

Method Detail
RviAutoRotate()method
public function RviAutoRotate(DeltaX:Number,DeltaY:Number)

Language version: ActionScript 3.0
Player version: Flash Player 9

Automatically rotates the 3D Model on the X and Y axis when calling 'RviRender()'

Parameters

DeltaX:Number — Number of frames to rotate on the X axis.
DeltaY:Number — Number of frames to rotate on the Y axis.

Example

The following example initializes the FreeSpin3D component instance called 'myFreeSpin' and rotates it.

    myFreeSpin.RviInit(Start);
    function Start(Successes:Boolean){
       myFreeSpin.RviAutoRotate(1,1); 
       this.addEventListener(Event.ENTER_FRAME, GameLoop);
    }
    function GameLoop(iEvent:Event) {
       myFreeSpin.RviRender(true);
    }
    
RviAttachData()method 
public function RviAttachData(iData:Object): void

Language version: ActionScript 3.0
Player version: Flash Player 9

Attach additional data to the 3Dmodel.

Example

The following example initializes the FreeSpin3D component instance called 'myFreeSpin' and Attached additional data to it.

    myFreeSpin.RviInit(Start);
    function Start(Successes:Boolean){
       myFreeSpin.RviAttachData("MyAttachedData"); 
       this.addEventListener(Event.ENTER_FRAME, GameLoop);
    }
    function GameLoop(iEvent:Event) {
       myFreeSpin.RviRender(true);
    }
    
RviCheckDisplayObjectCollision()method 
public function RviCheckDisplayObjectCollision(iMovieClip:DisplayObject): Boolean

Language version: ActionScript 3.0
Player version: Flash Player 9

Check for a collision between a 3dModel and a 2d object.

Example

The following example Checks for a collision between a 3dModel and a 2d object(

    myFreeSpin.RviInit(Start);
    function Start(Successes:Boolean){
       this.addEventListener(Event.ENTER_FRAME, GameLoop);
    }
    function GameLoop(iEvent:Event) {
     if(myFreeSpin.RviCheckDisplayObjectCollision(my2dObject))
	       {
		     trace("Collision Detected");
		   }
    }
    
RviCheckFreeSpin3DModelCollision()method 
public function RviCheckFreeSpin3DModelCollision(iFs3dMovieClip:CRvFreeSpin3D): Boolean

Language version: ActionScript 3.0
Player version: Flash Player 9

Check for a collision between 2 FreeSpin3D model's.if a collision occurs a boolean value 'true' is returned.

Example

The following example Checks for a collision between 2 3dModels (

    myFreeSpin.RviInit(Start);
    function Start(Successes:Boolean){
       this.addEventListener(Event.ENTER_FRAME, GameLoop);
    }
    function GameLoop(iEvent:Event) {
     if(myFreeSpin.RviCheckFreeSpin3DModelCollision(myFreeSpin2))
	       {
		     trace("Collision Detected");
		   }
    }
    
RviCheckPixelCollision()method 
public function RviCheckPixelCollision(iX:Number,iY:Number,iShapeFlag:Boolean): :void

Language version: ActionScript 3.0
Player version: Flash Player 9

Check for collision along the X and Y axis.

Example

The following example Checks for a pixel collision on the parameters (190,150)

    myFreeSpin.RviInit(Start);
    function Start(Successes:Boolean){
       this.addEventListener(Event.ENTER_FRAME, GameLoop);
    }
    function GameLoop(iEvent:Event) {
		
     if(myFreeSpin.RviCheckPixelCollision(190,150,true))
	       {
		     trace("Collision Detected");
		   }
    }
    
RviDuplicate()method 
public function RviDuplicate(iCloneTexture:Boolean=false): CRvFreeSpin3D

Language version: ActionScript 3.0
Player version: Flash Player 9

Duplicates the FreeSpin3D model.

Example

The following example duplicates a FreeSpin3D Model

     var  myFreeSpin2: CRvFreeSpin3D =  myFreeSpin.RviDuplicate();
			myFreeSpin2.RviRender();
			mPanel.addChild( myFreeSpin2);
	      
   
RviGetAttachedData()method 
public function RviGetAttachedData(): Object

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the attached data implemented by the RviAttachData() method.

RviGet2dHeight()method 
public function RviGet2dHeight(): Number

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the 2dHeight of the Model.

Example

The following example returns the 2 dimensional height of the 3d model

    trace(myFreeSpin.RviGet2dHeight());
	      
   

RviGet2dWidth()method 
public function RviGet2dWidth(): Number

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the 2dWidth of the Model.

RviGetBounds()method 
public function RviGetBounds(aBoundsObj:DisplayObject): void

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the bounds of the 3dModel.

Example

The following example return's the bounds of the 3D Object

   trace(myFreeSpin.RviGetBounds(this));
    
RviGetFrameX()method 
public function RviGetFrameX(): Number

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the current frame along the X axis.

RviGetFrameY()method 
public function RviGetFrameY(): Number

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the current frame along the Y axis.

RviGetMaxProgress()method 
public function RviGetMaxProgress(): Number

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the maximum Progress.

RviGetModelId()method 
public function RviGetModelId(): String

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the id of the current model.

RviGetObjectsCount()method 
public function RviGetObjectsCount(): Number

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the number of objects available.

RviGetProgress()method 
public function RviGetProgress(): Number

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the Progress.

RviGetRenderMode()method 
public function RviGetRenderMode(): String

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the current render mode.

RviGetResolutionX()method 
public function RviGetResolutionX(): Number

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the resolution along the X axis.

RviGetResolutionY()method 
public function RviGetResolutionY(): Number

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the resolution along the Y axis.

RviGetSmoothTexture()method 
public function RviGetSmoothTexture(): Boolean

Language version: ActionScript 3.0
Player version: Flash Player 9

currently under development.

RviGetTexture()method 
public function RviGetTexture(texture:Number): BitmapData

Language version: ActionScript 3.0
Player version: Flash Player 9

Returns the model's BitmapData.

RviGetDimensions()method 
public function RviGetDimensions(): Array

Language version: ActionScript 3.0
Player version: Flash Player 9

Return's an array of the model's dimensions.

RviGetPolygonNumber()method 
public function RviGetPolygonNumber(): Number

Language version: ActionScript 3.0
Player version: Flash Player 9

Return's the amount of polygon's on the current model.

RviInit()method 
public function RviInit(CallbackFunction:Function = null, ModelId:String = "",Precise:Boolean = false, RvlDataText:Object = null): :void

Language version: ActionScript 3.0
Player version: Flash Player 9

Initializes the 3dModel.

Example

The following example initializes the FreeSpin3D component instance called 'myFreeSpin' and rotates it.

    myFreeSpin.RviInit(Start);
    function Start(Successes:Boolean){
       myFreeSpin.RviAutoRotate(1,1); 
       this.addEventListener(Event.ENTER_FRAME, GameLoop);
    }
    function GameLoop(iEvent:Event) {
       myFreeSpin.RviRender(true);
    }
    
RviIsAbsoluteViewMode()method 
public function RviIsAbsoluteViewMode(): Boolean

Language version: ActionScript 3.0
Player version: Flash Player 9

Return's true if the view mode of the Model is Absolute ,if false the Model is at the Smooth view mode.

RviLoadTexture()method 
public function RviLoadTexture(iTexturePass:String = "", iObjectIndex:Number,iWidth:Number = 0,iHeight:Number = 0): void

Language version: ActionScript 3.0
Player version: Flash Player 9

Loads the FreeSpin3D model texture from an outside source, could also load from a domain or a web link.

RviRender()method 
public function RviRender(iEnableAutoAnimation:Boolean = false): Boolean

Language version: ActionScript 3.0
Player version: Flash Player 9

Render the 3dModel.

Example

The following example initializes the FreeSpin3D component instance called 'myFreeSpin' and rotates it.

    myFreeSpin.RviInit(Start);
    function Start(Successes:Boolean){
       myFreeSpin.RviAutoRotate(1,1); 
       this.addEventListener(Event.ENTER_FRAME, GameLoop);
    }
    function GameLoop(iEvent:Event) {
       myFreeSpin.RviRender(true);
    }
    
RviReplaceTextureData()method 
public function RviReplaceTextureData(iBitmap:BitmapData, iObjectIndex:Number): void

Language version: ActionScript 3.0
Player version: Flash Player 9

Replaces the 3dModel's texture.

Example

The following example replaces the texture data by assigning a new class containing the new bitmap linkage and the bitmap's size.

     myFreeSpin.RviReplaceTextureData(my_second_Texture(100,100),0);
    
RviReset()method 
public function RviReset(): :void

Language version: ActionScript 3.0
Player version: Flash Player 9

Reset the 3dModel to it's original state.

RviRotate()method 
*works on Absolute ViewMode only.
public function RviRotate(DeltaX:Number,DeltaY:Number): Number

Language version: ActionScript 3.0
Player version: Flash Player 9

Rotates the FreeSpin3D model along the X and Y axis (Absolute ViewMode only).

RviRotateX()method 
*works on Smooth ViewMode only.
public function RviRotateX(X:Number): Void

Language version: ActionScript 3.0
Player version: Flash Player 9

Receives degrees and Rotates the FreeSpin3D model along the X axis.

RviRotateY()method 
*works on Smooth ViewMode only.
public function RviRotateY(Y:Number): Void

Language version: ActionScript 3.0
Player version: Flash Player 9

Receives degrees and Rotates the FreeSpin3D model along the Y axis.

RviRotateZ()method 
*works on Smooth ViewMode only.
public function RviRotateZ(Z:Number): Void

Language version: ActionScript 3.0
Player version: Flash Player 9

Receives degrees and Rotates the FreeSpin3D model along the Z axis.

RviScaleModel()method 
public function RviScaleModel(): Number

Language version: ActionScript 3.0
Player version: Flash Player 9

Scale the current 3dModel.

RviSetColor()method 
public function RviSetColor(): Number

Language version: ActionScript 3.0
Player version: Flash Player 9

Changes the color of the 3dmodel.

Example

The following example colors the Model at a specific color on the object #0 of the model.

   myFreeSpin.RviSetColor(0XFF4455,0);