1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to embed a distant swf in my index file? *thanks+rep

Discussion in 'Black Hat SEO' started by carlito, Apr 30, 2011.

  1. carlito

    carlito BANNED BANNED

    Joined:
    Aug 22, 2010
    Messages:
    1,153
    Likes Received:
    326
    Hi
    Hope you can help.

    I know how to embed a swf file in my index fille if the swf is in the same directory :

    swfobject.embedSWF("flashfile.swf", "my_flash", "520", "550", "8.0.0", "", flashvars, params, attributes);

    But let's imagine the swf is on another server, say http://www.abcd.com, when I put this code it does not work:

    swfobject.embedSWF("http://www.abcd.com/flashfile.swf", "my_flash", "520", "550", "8.0.0", "", flashvars, params, attributes);


    Someone could help please?
     
  2. eskimo

    eskimo Regular Member

    Joined:
    Dec 1, 2008
    Messages:
    474
    Likes Received:
    178
    Use this function:
    Code:
    function createAbsoluteURL(url:String):String {
        if ((url.indexOf("http") != 0) && (url.indexOf("file") != 0)) {
            var thisURL:String = this._url;
            var thisURLSplit:Array = thisURL.split("/");
            thisURLSplit.splice(thisURLSplit.length-1, 1, url);
            return thisURLSplit.join("/");
        } else {
            return url;
        }
    }
    
    and now call the URL to the external SWF using this function eg:

    Code:
    swfobject.embedSWF("<?php echo createAbsoluteURL('http://www.abcd.com/flashfile.swf'); ?>", "my_flash", "520", "550", "8.0.0", "", flashvars, params, attributes);
    Hope it works :)
     
    • Thanks Thanks x 1
    Last edited: Apr 30, 2011
  3. nirose

    nirose Senior Member

    Joined:
    Oct 24, 2008
    Messages:
    983
    Likes Received:
    436
    Location:
    somake.us
    didn't you try downloading the swf and keeping it in the same directory.

    that could work.
     
  4. carlito

    carlito BANNED BANNED

    Joined:
    Aug 22, 2010
    Messages:
    1,153
    Likes Received:
    326
    I'm going to try this and come back just after to give you your rep :)

    Yeah it is possible but I want to keep the swf on my server because it's a task for a customer and if he doesnt pay the monthy fees I just delete this file and his stuff wont work anymore, a security for me.
     
  5. carlito

    carlito BANNED BANNED

    Joined:
    Aug 22, 2010
    Messages:
    1,153
    Likes Received:
    326
    @eskimo

    It doesnt work unfortunately, I put the code you gave me in my index.html file here is a capture of it :


    Then when I display my site nothing's appear..
    Did I make something wrong?
     
  6. carlito

    carlito BANNED BANNED

    Joined:
    Aug 22, 2010
    Messages:
    1,153
    Likes Received:
    326
    bump thanks
     
  7. carlito

    carlito BANNED BANNED

    Joined:
    Aug 22, 2010
    Messages:
    1,153
    Likes Received:
    326
    I give a night with a nice chick to anyone who helps :)
     
  8. Bartman

    Bartman Power Member

    Joined:
    Apr 24, 2010
    Messages:
    569
    Likes Received:
    131
    i may be able to help. how big are her boobs?
     
  9. carlito

    carlito BANNED BANNED

    Joined:
    Aug 22, 2010
    Messages:
    1,153
    Likes Received:
    326
    dont worry mate, Dr. Ohana made them huge
     
  10. Choronzon

    Choronzon Power Member

    Joined:
    Apr 20, 2008
    Messages:
    559
    Likes Received:
    376
    Not sure if this will work but worth a try

    Code:
    <embed allowScriptAccess="never" allowNetworking="internal" enableJavaScript="false" src="http://www.yourwebsite.com/yourfile.swf" quality=high  wmode=Transparent  width="300" height="49"></embed>
    
     
    • Thanks Thanks x 1
  11. carlito

    carlito BANNED BANNED

    Joined:
    Aug 22, 2010
    Messages:
    1,153
    Likes Received:
    326
    I tried your solution but unfortunately with no result, I'm desesperate (the chick too)
     
  12. Ziloo

    Ziloo Junior Member

    Joined:
    Dec 14, 2010
    Messages:
    129
    Likes Received:
    79
    Location:
    Europe, sometimes.
    Why a swf? There are much more simple secondary server authentications.
     
  13. CoolAdvisor

    CoolAdvisor Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 24, 2008
    Messages:
    976
    Likes Received:
    360
    try the "embed" code with:
    Code:
    allowScriptAccess="always" allowNetworking="all"
    
     
    • Thanks Thanks x 1
  14. carlito

    carlito BANNED BANNED

    Joined:
    Aug 22, 2010
    Messages:
    1,153
    Likes Received:
    326
    not more chance, but thanks
     
  15. CoolAdvisor

    CoolAdvisor Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 24, 2008
    Messages:
    976
    Likes Received:
    360
    hard to tell without your page's source codes
     
  16. carlito

    carlito BANNED BANNED

    Joined:
    Aug 22, 2010
    Messages:
    1,153
    Likes Received:
    326
    Hi CookAdvisor, thanks for your kind hel

    Here is my index.html page (in red the code that does not work). It is an index file that loads a facebook paypal shop. Thanks

     
  17. kokoloko75

    kokoloko75 Elite Member

    Joined:
    Jan 1, 2011
    Messages:
    1,628
    Likes Received:
    1,935
    Occupation:
    Design director
    Location:
    Paris (France)
    This code in HTML5 works for me (EMBED or OBJECT) :
    Code:
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Salut Carlito !</title>
    <style type="text/css">
    body {
    	background-color: #CCC;
    }
    </style>
    </head>
    
    <body>
    <embed src="[COLOR="red"]https://d2fhka9tf2vaj2.cloudfront.net/tuts/283_nativeCursors/preview/Main.swf[/COLOR]" width="550" height="400" flashvars="id=hello world" wmode="transparent" />
    <object width="500" height="400" data="[COLOR="red"]https://d2fhka9tf2vaj2.cloudfront.net/tuts/283_nativeCursors/preview/Main.swf[/COLOR]" type="application/x-shockwave-flash">
       	<param name="src" value="[COLOR="Red"]https://d2fhka9tf2vaj2.cloudfront.net/tuts/283_nativeCursors/preview/Main.swf[/COLOR]" />
    </object>
    </body>
    </html>
    
     
    • Thanks Thanks x 1
    Last edited: May 2, 2011
  18. carlito

    carlito BANNED BANNED

    Joined:
    Aug 22, 2010
    Messages:
    1,153
    Likes Received:
    326
    WONDERFUL Kokoloko it works.
    I put your embed code in the body instead of the header and it seems to work.
    thanks+rep given
    merci :)
     
  19. CoolAdvisor

    CoolAdvisor Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 24, 2008
    Messages:
    976
    Likes Received:
    360
    Code:
    http://www.mywebsite.com/paypalshop.swf
    try to change this link to something else, find an swf file on another server
    so if this will work the issue must be something related to the "mywebsite.com"'s server, maybe they use some type of protection, who knows?


    so you found a solution, great!
     
    • Thanks Thanks x 1
  20. kokoloko75

    kokoloko75 Elite Member

    Joined:
    Jan 1, 2011
    Messages:
    1,628
    Likes Received:
    1,935
    Occupation:
    Design director
    Location:
    Paris (France)
    Merci !

    Best.

    Beny