I have a Director project with 3 scripts (2 behaviors and 1 movie script). I have the following code in my movie script:
on startRecording ()
--do stuff
_movie.script["script2"].passGrade(75, 3, 4)
end
and in one of my behavior scripts, I have the following:
on passGrade (acc, dur, tim)
member("Assessment", "Assessment").displayGrade(acc, dur, tim)
end passGrade
where the name of the second behavior script is script2
and there is a Flash object on the stage called Assessment
which has an ActionScript method called displayGrade
which takes 3 numbers as input.
I have 2 questions. First, the call -movie.script["script2"].passGrade(75, 3, 4)
does not work, and I can't figure out why. Am I not allowed to call from a movie script to a behavior? Or am I not doing this correctly? The second question is how do I call the ActionScript method? The script is defined as a behavior for the Flash object, which is called Assessment
, but Director doesn't seem to be able to locate the method.
I am using Director 11 with HotFix 3, and the Flash object was compiled for ActionScript 2.