Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-22-2009, 02:38 PM   PM User | #1
b6a6r6n
New to the CF scene

 
Join Date: Apr 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
b6a6r6n is an unknown quantity at this point
'embedding' externally hosted flashmovies IN A flash movie ?!?!!?

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,
Code:
<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:
Code:
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?
b6a6r6n is offline   Reply With Quote
Old 04-22-2009, 07:25 PM   PM User | #2
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
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

Code:
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.
__________________
jeremy - gnomeontherun
Educated questions often get educated answers, and simple questions often get simple answers.
gnomeontherun is offline   Reply With Quote
Old 04-22-2009, 08:47 PM   PM User | #3
b6a6r6n
New to the CF scene

 
Join Date: Apr 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
b6a6r6n is an unknown quantity at this point
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 ??
b6a6r6n is offline   Reply With Quote
Old 04-22-2009, 09:07 PM   PM User | #4
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
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.

http://www.box.net/crossdomain.xml

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.
__________________
jeremy - gnomeontherun
Educated questions often get educated answers, and simple questions often get simple answers.
gnomeontherun is offline   Reply With Quote
Reply

Bookmarks

Tags
flash, html, mp3, player

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:02 PM.


Advertisement
Log in to turn off these ads.