Adobe Connect User Community
Menu

#1 2008-06-17 18:58:31

**_Aaron_L_**

Problem loading external swf's into container file.

Hi there. I'm stuck on something in Connect Pro and was wondering if anyone had a solution or suggestion.

I have a container file created in Flash, exported as a swf, that loads external swfs and plays them inside itself. This works fine when I upload it all to the web on my own, but when I try to add the files to Connect, the container cannot find the other swfs.

Is this simply a limitation of Connect or is there something I'm missing? Thanks for your help.

Aaron

Last edited by **_Aaron_L_** (2008-06-17 18:58:47)

Offline

#2 2008-06-30 08:39:17

alistairlee

Re: Problem loading external swf's into container file.

Hey Aaron,

Are the SWF's that you're trying to load in in the same directory or out on the web somewhere (ie. you're loading in a URL).

This custom SWF you've written should work as long as you're not using global variables or referring to _root (since that would refer to the Connect meeting room itself).

If you have copies of the SWF's you are trying to load into your custom wrapper, the easiest way to do it would be to:
1)  rename your custom wrapper index.swf
2)  zip all of the SWF's (including your wrapper) into a ZIP file
3)  upload the ZIP file to the content library and load it into a pod.

If your SWF's are on external sites, there's a chance you may need a cross domain policy (basically a crossdomain.xml file) on each of the sites you are trying to load content from.  Flash player has security built in that restricts loading content from other sites without this policy in place.

Offline

#3 2008-08-04 11:53:14

**_mark2741_**

Re: Problem loading external swf's into container file.

I'm amazed (well, maybe not) that Adobe still hasn't fixed this issue if in fact it's still not working. I ran into it back during Breeze v4, the first version that my company licensed. I haven't tried it in a couple of years, but back then what you had to do was publish the wrapper swf along with an html file that called the wrapper swf in:

1. Publish the wrapper swf from the Flash IDE, along with a wrapper html file to load it in.
2. Rename wrapper.html to index.html
3. ZIP up all of the associated project files (ie, the wrapper swf, index.html, and all runtime loaded assets)
4. Upload the ZIP archive to Connect.

It'll work. Adobe's documentation was incorrect before on this. Not sure if they updated it. I know the LiveDocs, after I had posted the workaround, had an admission from their Tech Writers that the doc was wrong.

mark
www.elearninglive.com

P.S. There is one other workaround but it's never been worth the time for me to try it - my hunch is that, upon de-archiving the ZIP containing all the swf's, is that Connect breaks the relative pathing of the child swf's. So you could try using something along the lines of this.name (or is it 'this._name'?) in the child swf's to get the absolute path maybe?

Offline

#4 2008-09-30 16:07:49

**_philip.kania_**

Re: Problem loading external swf's into container file.

I've run into the same problem. Adding the index.html and AC_RunActiveContent.js files to the zip files enables my swf to work properly when run from the content URL.

The problem with this approach is that the share pod doesn't recognize the zip file with html as a valid format.

I tried adding a crossdomain.xml file to the zip archive but that doesn't fix the problem either.

I noticed that the html file sets allowScriptAccess to sameDomain but I thought that was to allow JS access.

I've also tried playing around with System.security.allowDomain (even though this shouldn't be necessary because all my files are being loaded from the same domain) but that doesn't seem to help either.

Any ideas about what I need to do to get this working from in the share pod?

Offline

#5 2009-05-20 11:06:18

**_mh_**

Re: Problem loading external swf's into container file.

This thread was started 8 months ago.  Has anyone found an answer?  I'm having the same problem.

- I have a SWF that's using loadMovie() to load a jpg that lives in the same directory as the SWF
- I've followed the rules on zipping all the necessary files up and naming the SWF "index.swf"
- My Zip uploads and opens properly in Connect but it doesn't load the image

I'm not crossing any domains. I'm not asking Flash or Connect to do anything crazy.  Just load an Image.  My project involves many brands and many SWFs and XML... all needing to be loaded into a master SWF.

Can anyone point me to a tutorial or some sort of Documentation on how to make this happen?

Thanks,

Mike

Offline

#6 2009-05-20 12:56:35

**_mark2741_**

Re: Problem loading external swf's into container file.

mh,

Did you need to use this in a share pod, or just as a content piece? If just as a content piece (ie, using Connect as a webserver), then you'll need to wrap the index.swf in an index.html file then zip them up and upload.

Connect is full of bugs, bad documentation, and limitations, even with the basic stuff....I'm no longer a fan of it for anything other than regular synchronous meetings. And the competitors have gotten just as good at that over the past couple of years...

mark

Offline

#7 2009-05-20 12:59:18

**_mh_**

Re: Problem loading external swf's into container file.

mark2741 wrote:

Did you need to use this in a share pod, or just as a content piece?

What's the difference?  The Flash is the content but there isn't another way to share it in synchronously in real-time between multiple users without a share pod is there?

Thanks for the advice I'll try using an HTML page in the zip.

Mike

EDIT: I created a new ZIP using the index.html file structure and Connect doesn't even see it with in the Content Library to load it.  Any other advice?

Last edited by **_mh_** (2009-05-20 13:09:29)

Offline

#8 2009-05-20 16:29:06

**_mh_**

Re: Problem loading external swf's into container file.

Created ZIP with index.swf & external SWFs - Connect allows it but it wouldn't load external swfs
Created ZIP with index.html, master SWF and external SWFs - Connect doesn't allow conversion of this type of ZIP format
Uploaded all files individually into the same Shared Content Directory - Connect see's and loads all the files but again, doesn't load the external SWFs into the master SWF.

None of the ways suggested here or ANYWHERE within the Adobe Documentation for Connect answers this issue.

But I was able to figure out a way to load external assets on my own.

I'd already figured out the crossdomain.xml workaround so that I could communicate with domains outside of Connect for Metric Tracking (in response to Flash's cross domain security, a small XML script needs to sit on both the Connect Server and the domain you're calling to) so I tested loading external SWFs from that domain and it works perfectly.  So that's what I suggest doing.  Keep your external SWFs on another domain. Make sure to address/fix Flash's cross domain security issues. Keep your master SWF that loads the externals in Connect and viola it works like you'd expect it to.

There were almost 1,800 views to this thread that's almost a year old and only 6 responses, two of which were my own.  I know I'm not the 1st person to want to do this so either people are figuring out a solution and just not sharing it (which is totally uncool for the community) or no one has been able to figure out a solution (which can't be right cause i'm relatively stupid and i figured it out)... at any rate, i hope my solution helps others find their own solutions.

Last edited by **_mh_** (2009-05-20 16:31:36)

Offline

#9 2009-06-18 10:52:42

**_brianblocker_**

Re: Problem loading external swf's into container file.

MH -

Do you have a copy of your crossdomain.xml files?  I just found out it existed today. Where exactly are you uploading them to on the connect server?

I am actually trying to connect to a PHP script via sendAndLoad(), but getting nothing. There is definitely a lack of support for this...

Offline

#10 2009-06-18 11:39:59

**_mh_**

Re: Problem loading external swf's into container file.

brianblocker wrote:

MH -

Do you have a copy of your crossdomain.xml files?  I just found out it existed today. Where exactly are you uploading them to on the connect server?

I am actually trying to connect to a PHP script via sendAndLoad(), but getting nothing. There is definitely a lack of support for this...

We're still ironing out all of our cross domain issues but here is the way we're setting up the XML.  Do your own test cases but we've found that it works ok on the web with the XML only living on the domain that the external files (to be loaded) are living. You'll have to test from inside Connect as well.

XML CODE: (named crossdomain.xml)

<?xml version="1.0"?>
<cross-domain-policy>
    <allow-access-from domain="*"/>
</cross-domain-policy>


PLUS IN YOUR FLASH FILE YOU NEED:

System.security.allowDomain("*");
System.security.allowInsecureDomain("*");
System.security.loadPolicyFile("URL FOR LOCAL CROSSDOMAIN.XML");

Take it all with a grain of salt tho.  As you said there's a complete lack of support and documentation on ANY of this.  There is the SDK but that is seriously lacking as well.  No support for AS3, Tween Packages of ANY kind, tracking on a granular level is a nightmare... it's all such a hassle and we're still learning and testing ourselves.

Good Luck

Offline

#11 2009-06-18 12:17:47

**_brianblocker_**

Re: Problem loading external swf's into container file.

MH -

THANK YOU.  It worked.  Like you said, I'm still testing everything to make sure it's going to work the way I want it to, but I was able to accomplish 2 things today:

1) Take input from a user and send it to a PHP script on an external server via HTTP GET
2) Based on the data received from the user, pass data back to Connect and display it to that user only

Technologies used: PHP, HTTP GET, sendAndLoad, crossdomain.xml, System.security

Here is the next goal:

- When data is passed to my external webservice, the user ID needs to be passed as well
- Based on that user ID, if the user is a guest, call the Connect API to pull data about that user such as e-mail address, phone number, etc
- Store all of that into the database for use later
- E-mail that user the results of everything I just captured

Potential uses for this:

- "I want more info"
- Quizzes / Tests
- Coupon/promo code based on successfully answering a question

Exciting things to note:

I got this working even on a recorded presentation.  That means if you record your presentation, and later somebody watches, everything is still fully functional

Offline

Board footer