So I've been having problems loading XML images into a flash image gallery. The lowdown is that while the gallery works perfectly when it is standalone, I can't seem to get the images to display at all when loading it into another swf (my flash site). I have searched for ages and I still cannot figure it out.
To keep this post short, everything is detailed in this thread:
I came across something called "LocalConnection" or "SwfBridge" that helps an AS3 file communicate with an AS2 file:
Because I am quite noob, I have no clue as to what I'm supposed to do. I tried just copying and pasting these codes into my swfs:
// in the AS2 SWF:
var myBridge:SWFBridgeAS2 = new SWFBridgeAS2("connectionID", clientObj);
// in the AS3 SWF:
var myBridge:SWFBridgeAS3 = new SWFBridgeAS3("connectionID", clientObj);
But it came back with this error when testing it out in the AS3 flash site file:
|Symbol 'gallery_mc', Layer 'Layer 1', Frame 1, Line 1||1046: Type was not found or was not a compile-time constant: SWFBridgeAS3.|
And this error in the AS2 XML gallery file:
|Scene=Scene 1, layer=actions layer, frame=1, Line 1||The class or interface 'SWFBridgeAS2' could not be loaded.|
I'm almost certain I'm doing this entirely wrong. How do I actually use the swfbridge and could it be a potential solution to my frustrating problem?
The compiler can`t find the class files for SWFBridge.
Easiest way to fix tihis:
1.Download SWFBridge here
2.extract the contents of the com-folder (with com) inside the zip file into the directory that contains your gallery source flas.
Thanks, moccamaximum, I believe this did open up a connection and now I have no errors.
However, my problem still persists.
Here is what it says in the output of my AS3 flash site:
SWFBridge (AS3) connected: host
SWFBridge (AS2) connected as client
I don't understand how its able to trace that it is getting the images in the path, yet there are no images to be seen in the gallery!
I found out that my gallery does work (with images and all) when loaded into a movieclip in a blank AS2 file instead of my AS3 site. Am I doomed since even localconnection will not help?
After going over your last thread (the one you linked above) I must honestly say, that I doubt your problems will be fixed soon. I don`t mean to be discouraging, but with your beginners knowledge trying some esoteric techniques like LocalConnection to get to work with a encapsulated solution you bought and have no knowledge of inner workings is pointless.
If you analyze your problem it lies here:
The lowdown is that while the gallery works perfectly when it is standalone, I can't seem to get the images to display at all when loading it into another swf (my flash site).
I used this AS3 "loader" to load the .swf into my flash site.
Just my 2 cents.