ActionScript 3.0 Coding for loading swf files
I'm a first year teacher. Teaching Adobe Flash CS6 to high school students. My students were creating a "final" portfolio project where they used ActionScript 3.0 code, code snippets, and buttons to create a home screen that you could interact with and when you click on each button, it would take you to the individual projects the students have completed throughout the semester. All project .fla and .swf files were saved under the same student folder as their portfolio project. The following code was used:
mgrb.addEventListener(MouseEvent.CLICK,openSwf);
function openSwf(event:MouseEvent):void
{
var request:URLRequest=new URLRequest("file name.swf")
navigateToURL(request);
}
When the students try to test using Flash Play (ctrl+enter) in their document, the buttons took them nowhere but their code was perfect. However, if I open their file from my computer, I could see their buttons worked and loaded the swf file they wanted the button to go to. The only difference I can come up with is that the student's computers are set to auto update and they are now using Flash Player 11.2. However, my computer is not set to auto update and I am using Flash Play 9.0. This was very discouraging for my students to think their code didn't work, when if fact, it did. Any help would be greatly apprecaited. There should be no reason for us to revert back to 9.0 just so their files will work. Something either needs to be fixed or my code needs to be updated so that 11.2 can read it?
By the way, to show my students that their files truly worked, I had them open their swf file using internet explorer and they worked just fine. It's just that they cannot test their file while working int he flash document through flash player. Not an acceptable solution but at least the students can see the code worked.
