SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Guru Angry Coder's Avatar
    Join Date
    May 2002
    Location
    Canada
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How is it possible to get the width and height of a flash file?

    Hello,

    I heard it's not possible to get the width and height of a flash file using PHP and that's only possible through JavaScript.

    Can you please tell me how?

    Thanks.
    Why It Doesn't Work?!

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Well, you could try getting the height using offsetHeight and offsetWidth:
    Code:
    var obj = document.getElementById('theFlash');
    var objWidth = obj.offsetWidth;
    var objHeight = obj.offsetHeight;
    where the <object> containing the Flash movie has the id theFlash

  3. #3
    SitePoint Guru Angry Coder's Avatar
    Join Date
    May 2002
    Location
    Canada
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,

    That worked but only if I already have the width and height of the swf specified. I don't have it, that is what I need to determine with the code.

    Thanks.
    Why It Doesn't Work?!

  4. #4
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I'm sorry, I don't know about that. I would have imagined this would be more possible with PHP. Perhaps you have to install an extension? Have you had a look in the PEAR repository?


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
  •