# [Myspace] Adding a Flash .swf (advanced help)



## fiasst (Oct 11, 2005)

Hello. I was up until 7am after last night and tonight is going to be a late one too.

I have been trying to add a Flash element to my myspace page.
This is titled Advanced because this isnt as easy as it should be. ei upload the .swf, add the simple flash code and click submit..

Aparently Myspace.com has strict filters that dont allow iframes OR URLs ending in .swf and so when i try and display my 'main.swf' file it displays the message 'Movie not loaded'

Very fustrating..

So.. Can anyone please PLEASE! show me with confidence how to work around this myspace problem.

I understand you must use and tags and if nececary the URL can be changed to not have the file extention '/main.swf' using tinyURL.com

I hope this makes sense. And i hope someone knows the answer.
Ive seen myspace flash profiles but the people who own them have disabled all links to contact them and request the code..

Reguards,

Fiasst!


----------



## Shadow2531 (Apr 30, 2001)

If it's a personal myspace page, then I think they won't let you use the object tag and you have to use the embed tag, but the .swf extension is still allowed. The type attribute is super, super important.


```
<embed type="application/x-shockwave-flash" src="file.swf" width="300px" height="300px"></embed>
<noembed>Alternate content</noembed>
```
Try an absolute path to the swf file if a relative one does not work.

Now if it's a music.myspace page, they alllow the swf extension and the object tag. (Just look at the source of some band's page.)

Now for those pages where you can use the object tag and you want it to work for as many browsers as possible, you can do it like this:


```
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" data="file.swf" type="application/x-shockwave-flash" width="300px" height="300px">
    <param name="src" value="file.swf" valuetype="ref" type="application/x-shockwave-flash" />
    <embed type="application/x-shockwave-flash" src="file.swf" width="300px" height="300px"></embed>
    <noembed>Alternate content</noembed>
</object>
```
_Do not use the codebase attribute for the object tag to put stuff like http://download.macromedia.com
/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 in it. The codebase attribute is to specify a base path for resolving relative URIs for the data, classid, src param, and moview param values. It is not for specifying version requirements and if you do this, you violate the W3C spec for the object tag and you also cause problems with browsers that honor that spec, (Opera for example). Also note though that the embed tag is not valid either, but don't worry about that._

Another way to do it if you want to be completely valid and still have things work across browsers, you can do the following for example.


```
<div id="flash_holder">
    <object class="flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" data="file.swf" type="application/x-shockwave-flash" width="300px" height="300px">
        <param name="src" value="file.swf" valuetype="ref" type="application/x-shockwave-flash" />
        <!--[if !IE]> <-->
        <object class="flash" data="file.swf" type="application/x-shockwave-flash" width="300px" height="300px">
            <param name="src" value="file.swf" valuetype="ref" type="application/x-shockwave-flash" />
            <span id="pluginerror">Alternate Content</span>
        </object>
        <!--> <![endif]-->
        <!--[if IE]>
        <span id="pluginerror">Alternate Content for IE</span>
        <![endif]-->
    </object>
</div>
```
To add, the correct way to embed flash is :


```
<object id="flash" type="application/x-shockwave-flash" data="file.swf" width="300px" height="300px">
    <span id="pluginerror">Alternate Content</span>
</object>
```
That's all you should need, but unfortunately, browsers are a pain, (usually IE), which is why I posted a bunch of different methods above.


----------



## fiasst (Oct 11, 2005)

Thank you so much for replying!

It looks like it took awhile to give me all that code. Its very clear.

I will try this fully tonight.
(my profile is a personal space yes)

For now i have added the first code and added the full URL inc. http:// And .swf and it has worked. BUT! it has worked before and stoped after afew minutes/refreshes. I hope it still works in a few clicks.

Ill test it fully and reply later.

Thanks so much!
This forum post will receive alot of clicks for being so clear. And hopefully more advanced users will start using flash on their myspace overlays 

Reguards!
xx


----------



## fiasst (Oct 11, 2005)

ok.. I add this to my 'Id like to meet' section. Its the complete code for my space. I then click preview and it displays perfectly in the display window which, is a complete releaf!! But when i click my manually made Submit button (saved into my favorites)

javascript:document.forms[1].submit()

It displays the message: 'You must be someones friend to leave a message about them'

Very dis-heartening! I hope you could take the time to browse thought my code and see if you can find a reason. I hope something stands out.


```
<DIV class="Main"> <table style="width:800px; height:600px; cellpadding:0px; cellspacing:0px; border:1px ..000000; background-color:000000;}"> <tr> <td valign="top">.<table width="752" border="0" align="center">
  <tr>
    <td width="17"><span class="style48"><a name="label1" id="label1"></a></span></td>
    <td width="725">
<embed allowScriptAccess="never"type="application/x-shockwave-flash" src="http://www.unicomweb.co.uk/iso/main.swf" width="752px" height="452px"></embed>
<noembed>Alternate content</noembed></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td height="154" valign="top" background="file:///C|/Documents and Settings/any user/My Documents/sites/templates/myspak/base.gif"><table width="752" height="117" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="25%" height="40"><div align="right"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image1','','send2friend_dwn.gif',1)"><img src="http://counter.250free.com/send2friend_up.gif" name="Image1" width="96" height="23" border="0"></a> </div></td>
        <td width="75%" rowspan="2" valign="top"><div align="center">
            <FORM onsubmit="return lengthCheck(this);" 
      action=index.cfm?fuseaction=user.ConfirmComment method=post>
              <table width="100%"  border="0">
                <tr>
                  <td height="39" valign="middle"><table width="100%"  border="0">
                      <tr>
                        <td width="80%" valign="bottom"><div align="right">
                            <input 
      type=hidden value=22279231 name=friendID>
                            <input type=hidden 
      value=0F7007D6-1CE8-4129-91D091333BCB3E6627682718 name=Mytoken>
                            <input name="f_comments" type="text" value="" size="60">
                        </div></td>
                        <td width="20%" valign="middle"><div align="left"><img src="http://counter.250free.com/spam_up.gif" alt="Submit" width="39" height="25"></div></td>
                      </tr>
                  </table></td>
                </tr>
              </table>
            </FORM>
        </div></td>
      </tr>
      <tr>
        <td height="77" valign="top"><div align="right"><a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image2','','recentspams_dwn.gif',1)"><img src="http://counter.250free.com/recentspams_up.gif" name="Image2" width="96" height="23" border="0"></a></div></td>
      </tr>
    </table></td>
  </tr>
</table>.</td> </tr> </table> </DIV>
```
Thanks Shadow 

Reguards!

Fiaast!


----------



## fiasst (Oct 11, 2005)

sorry. nevermind i have sorted it out. My profile is working perfectly 

Ill finish off my flash content and give a link if you would like to see what your helped create.

THANKS!


----------



## fiasst (Oct 11, 2005)

Thanks again!

www.myspace.com/mahspak


----------



## Shadow2531 (Apr 30, 2001)

You're welcome.

It looks like myspace is having a problem atm.


----------



## Eitan (Nov 4, 2005)

Searching through google i found this site, I appriciate the time you guys put into helping and answering questions.

I tried to follow the first set of code to use on my About me section to redicret to an swf on my server, but all i get is a big white box. Not sure what im doing wrong.

Thanks


----------



## fiasst (Oct 11, 2005)

Hmm and it says 'Movie Not Loaded'?

Atm Myspace has added a filter to block all new tags being added to profiles. This is because of a virus or whatever.. thats spreading thought myspace using flash games or music players im not sure) The script stores itself in your 'Books' Section and changes your display picture to a photo of ali G (Aparently)

My /MahSpak profile is still there sitting with no updates because as soon as i make changes the filter will block out my flash content.

And so.. we wait..

The filter should beremoved when Ali G goes away lol, and the code you have probably is correct but isnt allowed for the moment


----------



## Eitan (Nov 4, 2005)

ok, thanks for the great info, I had an idea how to circumvent this. My HTML knowledge is somewhat limited, just wondering is there anyway to load or reference the html file on my server that plays the swf file on my server. So im not accessing the swf, but rather accessing the HTML..

Thanks for the help


----------



## Shadow2531 (Apr 30, 2001)

There are a few ways.

iframe element
object element
XMLHTTPRequest

Head on over to google and look these up to see how to use them.


----------



## fiasst (Oct 11, 2005)

i think as well as javascript, Myspace blocks iframes.
I read it somewhere when i was trying to do womething.
Im not sure. Its just what i recall seeing.


----------



## thevision (Jun 21, 2007)

I've got some problems. I think at least one person here can help.

So I'm a designer and do flash stuff but am an idiot when it comes to putting my stuff up onto the web. Im using a Mac and usually use FireFox for my Internet Browser and when I am changing my myspace.

Ive designed a SWF which would take over my Myspace by using Overlay coding. 
So I've got the SWF uploaded onto my Photobucket account and when I look at it through there everything seems to be perfectly fine. Even when I had the file on my hosting site everything worked. So I'm guessing it's something with Myspace.

I want is for my Myspace profile to have nothing but my SWF movie. I have links to everything else that people would like to access.

<First Problem>
So now I do all the coding in myspace and then view my profile and everything LOOKS fine but none of my links work. When you go to click on a link nothing happens. This problem only happens when I'm viewing my myspace profile. It works fine on my computer and also works in Photobucket but not when you are viewing my profile.

*Side Note: In my FLA file All of my links are set to "_blank" because I want a new page to open up so people dont have to go through the "Intro" of the SWF movie again and again. Instead they can just click close and my page will still be up.

*Actionscript code used for my links:
on (release) {
getURL("http://home.myspace.com/etc...", "_blank");
}

--------------------------------------------------------------------

<Second Problem>
This should be easy for someone who knows the web.

So even though I'm having the "Link" problems described above everything looks great when I few my profile in FireFox. As soon as I go to IE I dont see my SWF movie and the overlay coding is all messed up.

--------------------------------------------------------------------

<Solutions I have tried>

I have changed the Actionscript from "_blank" to "_self" but nothing worked.
I have uploaded the file to numerous hosting sites still nothing.

I honestly do not know whats going on. All I need is a code and possibly someone to explain it just a bit. I can usually figure out this stuff but this embed is confusing me. haha

--------------------------------------------------------------------

My myspace is www.myspace.com/therekees and I have the SWF up there now. So depending on what you are using as a browser and what not you might be able to see the problems I am having.

My movie:
I have it up on Photobucket but plan on buying hosting space.
http://i18.photobucket.com/albums/b124/reformclothing/theseeker.swf

Specs: 800x600

Thanks so much.


----------



## bigmax209 (Feb 4, 2008)

hey people , i had been tryin to add some swf banners to my myspace page for a while now , but , i have finally found a way , i placed my swf file in a html script meant to display a flash mp3 player on my myspace page , replaced the mp3 player url the url of my swf file . Also i found a listing with all the filehosting sites that myspace blocks , i had been uploading my swf files to ripway.com, but i found that they were on this list of banned servers. Once i changed my swf files location to fileden.com , i had no problem at all, the flash banners are up and running, if youd like the html i have been using please e-mail me at [email protected]
or if you dont believe me www.myspace.com/bigmax209
hope this has helped 
max


----------

