2 Replies Latest reply on May 6, 2012 8:47 AM by pauland

    Can I pass a pointer to a class?

    stevemcl5 Level 1

      Is there a way to copy a pointer of a data class ?


      I have an event with a Student class (studentid, lastname, firstname) and I want to pass the address of the original student in the event, so that the eventListener can modify the original Student.


      How can this be done?


      The custom event  has a  var student:Student ;

      when I create a new event:


      var myEvent:StudentEvent = new StudentEvent('clicked');

      myEvent.student = clickedStudent;


      then myEvent.student is a copy of clickedStudent,

      I want them to be the same object.