Hey Guys,
I have created a movieclip in the library and added a class to it. I want to access a function and set an Array in that class from the document class…
Heres what im doing now which is not working… it says startnow function is undefined.
package com {
import flash.display.*;
import flash.events.*;
import com.NavMC
public class Capability extends MovieClip {
// Constants:
// Public Properties:
public var navMC:NavMC
public var listMovies:Array = new Array("page1.swf","page1.swf","page1.swf")
// Private Properties:
// UI Elements:
// Initialization:
public function Capability() {
navMC:NavMC= new NavMC()
navMC.setArray = listMovies
navMC.StartNow()
}
}
}
Here is the class for the movieclip in the Library, the movieclip is already on the stage.
package com {
import flash.display.*;
import flash.events.*;
public class NavMC extends MovieClip {
// Constants:
// Public Properties:
public var listMovies:Array = new Array();
// Private Properties:
// UI Elements:
// Initialization:
public function NavMC() {
}
public function set setArray(_listMovies:Array) {
listMovies = _listMovies;
trace ("setArray"+listMovies); // Does not trace
}
public function set StartNow() {
//Start the code. // This does not work.
}
}
}
Im just a bit confused :puzzled: