Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    '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?

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    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.

  • #3
    New to the CF scene
    Join Date
    Apr 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 ??

  • #4
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    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.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •