Reading the width and height of a SWF movie

Alejandro Tejada capellan2000 at yahoo.com
Mon May 17 03:42:12 EDT 2004


Hi Developers,

I've made this a simple handler for reading the width 
and height of a SWF movie, i'll like to know if
it works ok in Linux and MacOSX:

on mouseUp
  answer file "Select a SWF movie:"
  if it is not empty then
    put "binfile:"&it into cvb
    put it into vfile
       
    if char 1 to 3 of url cvb is in "CWS,FWS"
    then
      put char 9 to 20 of url cvb into mki
      
      repeat for each char n in mki
        put chartonum(n) into nbv
        set the numberformat to 00000000
        put (baseconvert(nbv,10,2) + 0) after cdf
      end repeat
      
      put char 1 to 5 of cdf into xsd
      delete char 1 to 5 of cdf
      set the numberformat to 00
      put baseconvert(xsd,2,10) into xsz
      
      repeat 4
        put (baseconvert(char 1 to xsz of /
        cdf,2,10)/1920 * 96) & comma after vft
        delete char 1 to xsz of cdf
      end repeat
      
      put vfile & return & "Width: " & item 2 of vft &
" pixels" & space & "Height: " & item 4 of vft & "
pixels"
else
      answer "I do not recognize this file as a SWF / 
movie!"
    end if
  end if
end mouseUp

Thanks in advance.

al


=====
Visit my site:
http://www.geocities.com/capellan2000/
Search the mail list:
http://mindlube.com/cgi-bin/search-use-rev.cgi


	
		
__________________________________
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/


More information about the use-livecode mailing list