14 Replies Latest reply on Apr 27, 2006 6:16 AM by schnizZzla

    Access a component from within own class

    schnizZzla
      Hello guys,

      I have the problem to access all methods of a DataGrid instance within my own class.

      System: Flash 8, AS2

      I have two files:

      mp3Player.as
      mp3Player.fla

      The scene is simple:

      Library consists of the DataGrid component and one movie clip. In the movie clip is an instance of the DataGrid component with instance name playList. An instance of the movie clip is placed in the scene and the movie clip has been linked to the mp3Player class in the as file.

      The mp3Player class is very simple. It contains a DataGrid variable playList and a constructor to initialize the DataGrid playList in the scene.

      What the constructor can do is e.g. playList._visible=false or playList.setStyle(...). But as soon as i start with playList.addColumn or playList.addItem it does not work..

      What am I doing wrong?

      schnizZzla