AS 3.0 - passing Array problem


I am trying to pass two arrays to a function in an external class, which will take the array data and show gifs/play audio, take user input and store in an array to pass back to main movie.  I have checked and the arrays do contain data in the main movie, but I am doing something wrong when trying to access the array data in the external function.  My comments are in the code snippet below.

I hope someone can help me!!

Thanks and cheers!
//in main FLA, where mySectionTest is an instance of my external class and playSect is the //function in my class:
//function below is the one it calls but the trace statement in onTimer shows the array length //questions.length to be 0, when it should be 4.
public function playSect(sectIn:int,gifArrayIn:Array,questionsIn:Array):Array {
		var gifArray:Array=gifArrayIn;
		var questions:Array=questionsIn;
			return myData;
		public function playMe():void {
			var timer:Timer=new Timer(questionDelay,1);
		public function onTimer(evt:TimerEvent):void {
			var d:int=arraycounter-1;
			trace("testcounter Timer:"+ questions.length);

Open in new window

Who is Participating?
1CougarConnect With a Mentor Author Commented:
Hi and thanks for commenting.  I actually solved the problem.  I had to declare gifArray:* and it works.

Whats the name of the array: gifArray?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.