3 Replies - 1083 Views - Last Post: 07 July 2017 - 09:07 PM

#1 eesdras   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 06-July 17

Access of undefined property myLoader.

Posted 06 July 2017 - 09:03 PM

Hi, i downloaded a tutorial file with the intention to make a banner that loads text from an external text file, but i get the Access of undefined property myLoader. error, here is a link to the example file named orignal and mytest thet one with the error, can please point me to where my error is?

This are the files
Is This A Good Question/Topic? 0
  • +

Replies To: Access of undefined property myLoader.

#2 eesdras   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 06-July 17

Re: Access of undefined property myLoader.

Posted 07 July 2017 - 01:16 PM

here i post the code and the part wher i'm getting the error
// THIS IS FRAME 1 of 3 OF THE MAIN TIMELINE

stop();

var msg_array = new Array();
var msg_duration_array = new Array();

var duration:Number;
var default_duration:Number = 15;
var default_msg:String = "This is the default message. Either no text file was found, or, no message content within it.";

myLoader = new LoadVars(); // the error apear in this line
myLoader.load("movies/external_content/messages.txt");
myLoader.onload = function(success) {	
	if(success) { 
	   msg_array[0] = this.msg1;
	   msg_array[1] = this.msg2;	
	   msg_array[2] = this.msg3;	
	   msg_array[3] = this.msg4;		   	   
	   msg_duration_array[0] = this.msg1_duration;
	   msg_duration_array[1] = this.msg2_duration;	  
	   msg_duration_array[2] = this.msg3_duration;	  
	   msg_duration_array[3] = this.msg4_duration;
	   gotoAndStop(2);	   
	   }
	else { 
	   msg_array[0] = default_msg;
	   msg_duration_array[0] = default_duration;
	   gotoAndStop(2);
	   }   
}

Was This Post Helpful? 0
  • +
  • -

#3 ArtificialSoldier   User is offline

  • D.I.C Lover
  • member icon

Reputation: 2365
  • View blog
  • Posts: 7,219
  • Joined: 15-January 14

Re: Access of undefined property myLoader.

Posted 07 July 2017 - 03:34 PM

Maybe it wants you to declare myLoader like the other variables.
Was This Post Helpful? 0
  • +
  • -

#4 eesdras   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 06-July 17

Re: Access of undefined property myLoader.

Posted 07 July 2017 - 09:07 PM

Thanks, afther checking my project was set to actionscript 3 this only works on actionscript 2, changing the verions solved the problem
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1