[SIZE=3][FONT=Times New Roman]So I’m having problems with my flash site.
On my pictures tab ([COLOR=#0000ff]http://ericandcarmelita.com/test/sunshine.html[/COLOR]) I’m trying to load a swf inside a swf. Problem is, I keep on getting an output error report saying I have 60 errors in my xml files.
This is how I’m trying to load them:
Main swf → pic swf → action script → pic xml
So this may be a crazy idea, but I’m guessing that there is a problem with the fact that I’m stretching the original (Main) swf to call for the pic xml. I say this because of the output error says something about the action script and xml, so I put 2 and 2 together.
Also, because it includes directory info on the error log, so i wasn’t sure if it was directory problems, but i couldn’t see it really being the problem.
Hi- I haven’t looked at your code yet, but judging by the error output, it looks like you are trying to create an ‘as’ file in ActionScript 2.0 that doesn’t define a class or interface. All .as files in AS2.0 must define a class (or interface) with the ‘class’ construct:
class ClassName
{
}
If you don’t need to define a class, try switching to AS version 1.0 in the Publish settings dialog.
Looking at your code I think the quickest way to solve your problems will be to go:
File > Publish Settings > Flash > ActionScript - select ActionScript 1.0
ok i published it AS1 but now i’m not getting anything in the pic tabs to come up now… all the errors are gone, but now i have a different problem. It’s almost like going to AS1 puts me back or behind. I even published all my pic swfs in AS1 aswell.
Ok if you got rid of the errors I’d say that’s progress- I checked out your code and it’s definitely in AS1. Are you seeing anything in the output panel at all? Let’s try to break down the problem a little bit.
Hey- I just opened your fla ‘fall05gallery.fla’ exported the movie and I received no errors and all and it appears to run perfectly… I didn’t have to change it to AS1 either. Could you point me to the fla that isn’t working?
the problem now is in the main swf (sunshine). There are no errors when publishing it in AS1 but when i go to the pic tab, nothing (none of the pic swf’s) shows up when click on the buttons.
the problem is with the directory structure… I’m guessing that when flash exports for AS2, it looks at each ActionScript file in the current directory and treats them like a class- that’s what gave you the errors originally. So if you set it back to use AS2 and move all the as files like ‘fall05gallery.as’ into their subdirectories, the errors go away. You need to use AS2 again because you’re using objects like MovieClipLoader which is AS2 compliant.
If you move all the pic loader files into the subdirectories you need to change the path code in your main fla to this to kick off a load:
After all that, it turns out there is a bug in your image gallery code that causes images not to be displayed when they are inside child movie clips, so you have on line 52 of fall05gallery.as:
delete this._parent.onEnterFrame;
Needs to be changed to:
delete this.onEnterFrame;
And of course you need to make these changes for all your image galleries.
still the same errors…
this is how i have the directories…
the main swf and the pic swfs are in the main directory
the pics xml’s and as’s are in the main directory also
the actual pics are in the folders that i are named that i given you
i’ve checked and rechecked everyone of the as’s and xml’s and republished everything AS2 and replaced all the as’s error with the line you gave me.
what if i zip up all my stuff for this site and post it so you can see the directories i have, would that help?
well i did that im not getting error’s once it’s published, but once i go and click on the buttons i get a directory error… but i’ve the pic swf, xml, pics, and AS in the corresponding directories
Error example
Error opening URL "file:///C|/Documents%20and%20Settings/HoSs%209009/My%20Documents/EricandCarmelita/engagegallery.xml"
this really doesn’t make sense for me cause im getting this from the main swf when i click on the engagegallery button… why the hell is the xml file involved in this one?!!
the path to documents that you load from flash is always relative to the root swf (the main swf), so flash is currently looking in your main directory for the xml files instead of the subdirectories. Just because it loads an swf in a subdirectory doesn’t mean the loaded swf looks for files in the subdirectory.
I notice in the gallery .as files like ‘engagegallery.as’ it has the xml file as a variable like this:
You could do that, but you have to keep the gallery fla’s and as code in their subdirectories… you could export the gallery swf’s to be up in the main folder.
I have a feeling you’re close though as is, I was able to get it working with your files, but it’s too cumbersome to send it back… what is the error you’re getting now?
click on each button from top to bottom as i publish the swf is this…
Error opening URL “[file:///C|/Documents%20and%20Settings/HoSs%209009/My%20Documents/EricandCarmelita/fall04gallery/fall04gallery.swf](file:///C|/Documents%20and%20Settings/HoSs%209009/My%20Documents/EricandCarmelita/fall04gallery/fall04gallery.swf)”
Error opening URL “[file:///C|/Documents%20and%20Settings/HoSs%209009/My%20Documents/EricandCarmelita/engagegallery.xml](file:///C|/Documents%20and%20Settings/HoSs%209009/My%20Documents/EricandCarmelita/engagegallery.xml)”
Error opening URL “[file:///C|/Documents%20and%20Settings/HoSs%209009/My%20Documents/EricandCarmelita/winter0405gallery.xml](file:///C|/Documents%20and%20Settings/HoSs%209009/My%20Documents/EricandCarmelita/winter0405gallery.xml)”
Error opening URL “[file:///C|/Documents%20and%20Settings/HoSs%209009/My%20Documents/EricandCarmelita/fall05gallery.xml](file:///C|/Documents%20and%20Settings/HoSs%209009/My%20Documents/EricandCarmelita/fall05gallery.xml)”
non of these make sense to me… the last 3, the swf comes up but doesn’t size, show the pic or anything, just like a dead swf… the first one nothing comes up