SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2008
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Onload get the flash movie height width

    Hi to all,

    i want to get the width and height of flash movie while loading through javascript.

    i used this function to get width height
    function getDimensions() {
    var obj = document.getElementById('myMovie');
    alert(obj.TGetProperty('/',8) + ' ' + obj.TGetProperty('/',9));
    }

    it give me error TGetProperty() not found

    thanks.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,678
    Mentioned
    99 Post(s)
    Tagged
    4 Thread(s)
    That means that the obj is quite likely to be null, indicating that either the myMovie name isn't right (unlikely) or that the script is being run before the myMovie element is available.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2008
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for reply

    Actually i have a banner with width 746 and height 110 but with specify the height and width in flash object it show banner less width and heigh than the actual dimension.

    i get the flash file dynamically so each has different dimension so i want to show the flash banner with their actual size.

    how can i do this.

    thanks


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
  •