Skip navigation
Iglota
Currently Being Moderated

path inside an Array

Apr 16, 2013 12:18 PM

Tags: #array #listener #object

I was trying to put a 'path ' in an Array

 

  

// I Create the Array

var matrizFunc:Array=new Array();

 

 

// put What a need inside it

matrizFunc [0] = 'Tela.AreaInterativaLogin.entrar';

 

 

//I call the Array element to work with teh Listener

matrizFunc[0].addEventListener(MouseEvent.CLICK,TelaMenuInicial);

 

 

It doens't work. Any clue?

 

 

tks a lot!

 
Replies
  • Currently Being Moderated
    Apr 16, 2013 12:36 PM   in reply to Iglota

    You say that this string is a path. What do you mean by that? As far as the array is concerned, 'Tela.AreaInterativaLogin.entrar' is a string and doesn't really relate to much of anything.

     

    What is it that you intend to accomplish? Are you going to display this string on the stage somehow?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 16, 2013 4:39 PM   in reply to Iglota

    What is "Tela.AreaInterativaLogin.entrar"? You described it as a path earlier. If it is a path, what is it a path to? Is this a path to a movieClip that you want to attach an event listener to?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 17, 2013 5:41 AM   in reply to Iglota

    OK, If the movieClip "Tela" is at the same level as the code that you are writing, then you just need to remove the quotation marks from this line: matrizFunc [0] = 'Tela.AreaInterativaLogin.entrar';

     

    That path describes an object in Actionscript and so it is not a string.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points