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?
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.
I tried that but I keep getting this error message:
VerifyError: Error #1053: Illegal override of createGeometry in flashx.textLayout.elements.FlowGroupElement.
ReferenceError: Error #1065: Variable _11f1d66f38eb234da07a684678bb07c1e6cff9d15441f91af33073b7534701e8_fla sh_display_Sprite is not defined.
North America
Europe, Middle East and Africa
Asia Pacific