View Full Version : 'embedding' externally hosted flashmovies IN A flash movie ?!?!!?

04-22-2009, 02:38 PM
hi there
i use box.net for free hosting of mp3/4 files.
they provide the html code to link to a free flash-based player that you can embed in your html page - ie,
<embed src="http://www.box.net/static/flash/box_explorer.swf?widget_hash=4t0ntqx6d6&v=0&cl=0" width="460" height="345" wmode="transparent" type="application/x-shockwave-flash"></embed>
i'm trying to host this within a flash-based page of my own - you know, just a player to the top left (or whatever) of my flash movie website.
i've tried using dynamic text with html activated, for example, where the dynamic text box is instance 'box_text', i've put this in a frame so it should appear on load:

box_text.htmlText="<embed src="http://www.box.net/static/flash/box_explorer.swf?widget_hash=4t0ntqx6d6&v=0&cl=0" width="460" height="345" wmode="transparent" type="application/x-shockwave-flash"></embed>";
- but just keep getting syntax errors.
...any ideas?

04-22-2009, 07:25 PM
Well there are a few things. First you are using " quotes without escaping them in the string. So each " Flash sees, it thinks it hsould be the end unless its escaped. Better yet, use a ' single quote on the outside and " double quote on the inside, or vice versa.

Now the other issue is that you should not try to embed the swf like you would in HTML, you should use

loadMovie("http://www.box.net/static/flash/box_explorer.swf?widget_hash=4t0ntqx6d6&v=0&cl=0", "movieClipToLoadInto");
and have a blank movieClip (or create one with AS) called movieClipToLoadInto or whatever you want.

04-22-2009, 08:47 PM
thanks very much,
however it still doesn't work.
have you tried it ?
i create a movieclip symbol, name it and it's instance movieClipToLoadInto, and paste your code in the frame. perhaps i must do something else to the moveclip?

i read that flash is designed to not embed externally supported flashmovies, but i can't believe it - is this true do you think ??

04-22-2009, 09:07 PM
I have not tried it, but it is true sorta. You can load external content and swfs from the same domain, but pulling it from another site can cause problems. However if a site is offering it out like that it could, it depends on if the site has a crossdomain.xml policy file. It gets complicated, but box.net has one it appears.


The only thing I can think of besides logical coding errors is that when you embed it like that in Flash, it doesn't like the query strings at the end (?...stuff). Try it without, and double check the code is doing what you think, or post it all here again with changes.