SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2002
    Location
    Wales
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What does this JS do?

    Hi All,

    Can anyone tell what this piece of code does?

    Code:
     
    <script type="text/javascript">
    		var so = new SWFObject("http://domain-removed-byme/swfname.swf", "idxplayer", "180", "150", "8", "#979797");
    		so.addVariable("vidname", "testvid");
    		so.addVariable("desturl", "/test/test.asp?k=12");
    		so.write("player");
    	</script>
    I've replaced the 'sensitive' domain details etc. When the page loads a small video runs in the corner, that's all it does, but how does the above script work? I can see that a new object is created (so) and that testvid is passed to swfname.swf. Is desturl the source of the video? And finally I think that the object (so) is written to a class 'player' in the html?

    As you can see, I'm a bit fuzzy with this so can anyone clarify exactlt what's going on?

    Regards
    Rob

  2. #2
    SitePoint Evangelist vikrantkorde's Avatar
    Join Date
    Jun 2004
    Location
    Mumbai, India
    Posts
    541
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am not sure but if you change
    so.write("player");
    to
    so.write("idxplayer");

    I guess it will work....
    Vikrant Korde
    S Y S T I M E, Mhape,
    Mumbai, Maharashtra, India.

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2002
    Location
    Wales
    Posts
    175
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found this which pretty much explains all about it. Just in case someone's interested, here's a link:

    http://blog.deconcept.com/swfobject/


Bookmarks

Posting Permissions

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