gh5150
asked on
Flash AS3 1120 Error - Access array data from document class
I have two public arrays held within a class PK called _recordedNotes and _recordedPauses.
I have two arrays generated in a movieclip (codewindo) called notes and pauses
No idea with OOP and document classes so I am hoping someone can tell me how I do the following
Transfer the array data from notes into the _recordedNotes array so essentially
var _recordedNotes:Array = new Array();
_recordedNotes = notes;
var _recordedPauses:Array = new Array();
_recordedPauses = pauses;
yet _recordedNotes is in the PK.as file
or PK.recordedNotes = notes; ?????????????
PK.recordedPauses = pauses; ???????????
I get
1120: Access of undefined property PK
Whenever I try and send/ copy the array data to the document class PK
CAN ANYONE HELP ???????????
I have two arrays generated in a movieclip (codewindo) called notes and pauses
No idea with OOP and document classes so I am hoping someone can tell me how I do the following
Transfer the array data from notes into the _recordedNotes array so essentially
var _recordedNotes:Array = new Array();
_recordedNotes = notes;
var _recordedPauses:Array = new Array();
_recordedPauses = pauses;
yet _recordedNotes is in the PK.as file
or PK.recordedNotes = notes; ?????????????
PK.recordedPauses = pauses; ???????????
I get
1120: Access of undefined property PK
Whenever I try and send/ copy the array data to the document class PK
CAN ANYONE HELP ???????????
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Um. Does my comment above make amy sense to you?
CyanBlue
CyanBlue
ASKER
I must have been reading that late, yeah it does make sense now .... I will try your solution shortly thanks.
gh
gh
ASKER
Actually - doesn't look like it makes any sense to me
I tried this
var PianoKeyboard:PianoKeyboar d = new PianoKeyboard();
for pkInstance:PK = new PK();
and
PianoKeyboard.recordedNote s = notes;
for
pkInstance.recordedNotes = notes;
The class appears imported (found in the main.as)
package
{
import piano.PianoKeyboard;
I tried this
var PianoKeyboard:PianoKeyboar
for pkInstance:PK = new PK();
and
PianoKeyboard.recordedNote
for
pkInstance.recordedNotes = notes;
The class appears imported (found in the main.as)
package
{
import piano.PianoKeyboard;
You shouldn't be using the instance name the same as the class name.
What error message do you get? Can you copy and paste along with the offending line that your debugger tells where the problem is?
CyanBlue
var pianoKeyboard:PianoKeyboard = new PianoKeyboard();
Is that recordedNote a public array that you can access?What error message do you get? Can you copy and paste along with the offending line that your debugger tells where the problem is?
CyanBlue
Any update?
CyanBlue
CyanBlue
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
ASKER
I need to "write" to both the
_recordedNotes:Array;
_recordedPauses:Array;
either from the stage or preferably from within a movieclip called ghwindo
I tried this
var _recordedNotes:Array = new Array();
_recordedNotes == notes;
var _recordedPauses:Array = new Array();
_recordedPauses == arr;