Skip navigation
strittmater.rt
Currently Being Moderated

SWF works in CS5, but not CS5.5

Apr 30, 2012 1:53 PM

Tags: #3.0 #actionscript #flash_cs5 #flash_cs5.5 #loading #external_swf

I built a simple portfolio interface with button instances in Flash CS5, using ActionScript3.0, designed to load and unload external SWFs. In CS5, everything functions properly and there are no errors. However, when I open the file in CS5.5, nothing works. Here is my ActionScript:

 

var myLoader:Loader=new Loader ();

myLoader.x=0;

myLoader.y=235;

button1.addEventListener(MouseEvent.CLICK, button1content);

function button1content(myevent:MouseEvent):void {

          var myURL:URLRequest=new URLRequest("button1.swf");

          myLoader.load(myURL);

          addChild(myLoader);

}

button2.addEventListener(MouseEvent.CLICK, button2content);

function button2content(myevent:MouseEvent):void {

          var myURL:URLRequest=new URLRequest("button2.swf");

          myLoader.load(myURL);

          addChild(myLoader);

}

button3.addEventListener(MouseEvent.CLICK, button3content);

function button3content(myevent:MouseEvent):void {

          var myURL:URLRequest=new URLRequest("button3.swf");

          myLoader.load(myURL);

          addChild(myLoader);

}

button4.addEventListener(MouseEvent.CLICK, button4content);

function button4content(myevent:MouseEvent):void {

          var myURL:URLRequest=new URLRequest("button4.swf");

          myLoader.load(myURL);

          addChild(myLoader);

}

button5.addEventListener(MouseEvent.CLICK, button5content);

function button5content(myevent:MouseEvent):void {

          var myURL:URLRequest=new URLRequest("button5.swf");

          myLoader.load(myURL);

          addChild(myLoader);

}

 

My professor said that my actionscript is correct. All external SWFs are located and properly named in the same folder as the interface file, with nothing else. Can anyone explain this problem?

 
Replies
  • kglad
    62,049 posts
    Jul 21, 2002
    Currently Being Moderated
    Apr 30, 2012 3:31 PM   in reply to strittmater.rt

    what doesn't work?

     
    |
    Mark as:
  • Currently Being Moderated
    May 1, 2012 8:47 AM   in reply to strittmater.rt

    Do note that even at CS5.5 your SWF output folder is probably not where you intend. Go in publish settings, click SWF on the left (and HTML if you need it) and where it states it will export please press the browse button. Navigate to the correct folder (because it's almost 99% guaranteed incorrect). Then export.

     
    |
    Mark as:
  • kglad
    62,049 posts
    Jul 21, 2002
    Currently Being Moderated
    May 1, 2012 10:33 AM   in reply to strittmater.rt

    all those swfs (button1.swf, button2.swf etc) should be in the same directory as your cs5.5 fla and swf.

     
    |
    Mark as:
  • kglad
    62,049 posts
    Jul 21, 2002
    Currently Being Moderated
    May 1, 2012 1:28 PM   in reply to strittmater.rt

    again, all those swfs (button1.swf, button2.swf etc) should be in the same directory as your cs5.5 fla and swf.  ie, move them or copy them to the correct directory.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points