├── README ├── SWFSize.as3proj ├── docs ├── AC_OETags.js ├── all-classes.html ├── all-index-A.html ├── all-index-B.html ├── all-index-C.html ├── all-index-D.html ├── all-index-E.html ├── all-index-F.html ├── all-index-G.html ├── all-index-H.html ├── all-index-I.html ├── all-index-J.html ├── all-index-K.html ├── all-index-L.html ├── all-index-M.html ├── all-index-N.html ├── all-index-O.html ├── all-index-P.html ├── all-index-Q.html ├── all-index-R.html ├── all-index-S.html ├── all-index-T.html ├── all-index-U.html ├── all-index-V.html ├── all-index-W.html ├── all-index-X.html ├── all-index-Y.html ├── all-index-Z.html ├── asdoc.js ├── class-summary.html ├── com │ └── chargedweb │ │ └── swfsize │ │ ├── SWFSize.html │ │ ├── SWFSizeEvent.html │ │ ├── class-list.html │ │ └── package-detail.html ├── cookies.js ├── help.js ├── images │ ├── AirIcon12x12.gif │ ├── P_AlternativeMetadataIndicator_30x28_N.png │ ├── collapsed.gif │ ├── detailHeaderRule.jpg │ ├── detailSectionHeader.jpg │ ├── expanded.gif │ ├── inherit-arrow.gif │ ├── inheritedSummary.gif │ ├── logo.jpg │ ├── swfsize_logo.png │ ├── titleTableBottom.jpg │ ├── titleTableMiddle.jpg │ └── titleTableTop.jpg ├── index-list.html ├── index.html ├── override.css ├── package-frame.html ├── package-list.html ├── package-summary.html ├── print.css ├── style.css └── title-bar.html ├── lib ├── index.html ├── js │ ├── swfobject.js │ ├── swfsize.js │ └── swfsize_compressed.js └── swf │ └── expressInstall.swf └── src └── com └── chargedweb ├── swfsize ├── SWFSize.as └── SWFSizeEvent.as └── swfsizedemo ├── SWFSizeDemoFD.as └── SWFSizeDemoFlash.as /README: -------------------------------------------------------------------------------- 1 | === project === 2 | [home] http://chargedweb.com/swfsize/ 3 | [git] https://github.com/jloa/SWFSize 4 | [packs] http://sourceforge.net/projects/swfsize/ 5 | 6 | === licence === 7 | CC 3.0 @ http://creativecommons.org/licenses/by-sa/3.0/ 8 | 9 | === structure === 10 | [as3 docs] ./docs/ 11 | [as3 source] ./src/ 12 | [js source] ./lib/js/swfsize.js 13 | [example] ./lib/index.html 14 | 15 | === note === 16 | If u have any suggestions, plz send them to me @ jloa[at]chargedweb.com / subj:swfsize 17 | Much appreciated. 18 | 19 | [v.1.4.1] 20 | - SWF_ID is now passed automatically [thx to Kalani aka kapaakea] 21 | [v.1.4.0] 22 | - event broadcast removed from setSWFWidth(), setSWFHeight() methods [thx 2 Umano Teodori] 23 | [v.1.3] 24 | - ie 6, 7 scroll bug fixed [thx to Reed Bertolette] 25 | [v.1.2] 26 | - engine switched singleton -> class; now you can manage more than 1 embedded swf at a time! [thx David Aguilar for the suggestion] 27 | [v.1.1] 28 | - improved performance 29 | - method setWidth() renamed to setSWFWidth() 30 | - method setHeight() renamed to setSWFHeight() 31 | [v.1.0] 32 | - added setWidth() method 33 | - added setHeight() method 34 | - added getWidth() method 35 | - added getHeight() method 36 | - added getWindowWidth() method 37 | - added getWindowHeight() method 38 | - added getLeftX() method 39 | - added getRightX() method 40 | - added getTopY() method 41 | - added getBottomY() method 42 | - added setScrollX() method 43 | - added getScrollX() method 44 | - added setScrollY() method 45 | - added getScrollY() method -------------------------------------------------------------------------------- /SWFSize.as3proj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 84 | -------------------------------------------------------------------------------- /docs/AC_OETags.js: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // ADOBE SYSTEMS INCORPORATED 4 | // Copyright 2008 Adobe Systems Incorporated 5 | // All Rights Reserved. 6 | // 7 | // NOTICE: Adobe permits you to use, modify, and distribute this file 8 | // in accordance with the terms of the license agreement accompanying it. 9 | // 10 | //////////////////////////////////////////////////////////////////////////////// 11 | 12 | 13 | //v1.0 14 | function AC_AddExtension(src, ext) 15 | { 16 | if (src.indexOf('?') != -1) 17 | return src.replace(/\?/, ext+'?'); 18 | else 19 | return src + ext; 20 | } 21 | 22 | function AC_Generateobj(objAttrs, params, embedAttrs) 23 | { 24 | var str = ' '; 30 | str += ' 2 | 3 | 4 | All Classes - SWFSize lib 5 | 6 | 7 | 8 | 9 | 10 | 11 |

All Classes

12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
SWFSize
SWFSizeEvent
20 | 21 | 22 | -------------------------------------------------------------------------------- /docs/all-index-B.html: -------------------------------------------------------------------------------- 1 | B 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
bottomY — Property, class com.chargedweb.swfsize.SWFSize
14 | Returns the current bottomY coordinate i.e.
bottomY — Property, class com.chargedweb.swfsize.SWFSizeEvent
15 | Current browser's window bottomY coordinate value 16 |
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-C.html: -------------------------------------------------------------------------------- 1 | C 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
com.chargedweb.swfsize — package
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-D.html: -------------------------------------------------------------------------------- 1 | D 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-E.html: -------------------------------------------------------------------------------- 1 | E 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-F.html: -------------------------------------------------------------------------------- 1 | F 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-H.html: -------------------------------------------------------------------------------- 1 | H 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-I.html: -------------------------------------------------------------------------------- 1 | I 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
INIT — Constant Static Property, class com.chargedweb.swfsize.SWFSizeEvent
14 | The SWFSizeEvent.INIT constant defines the value of the type property of the 15 | event object for a onInit event; dispatched when SWFSize js is loaded and ready. 16 |
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-J.html: -------------------------------------------------------------------------------- 1 | J 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-K.html: -------------------------------------------------------------------------------- 1 | K 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-L.html: -------------------------------------------------------------------------------- 1 | L 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
leftX — Property, class com.chargedweb.swfsize.SWFSize
14 | Returns the current leftX coordinate i.e.
leftX — Property, class com.chargedweb.swfsize.SWFSizeEvent
15 | Current browser's window leftX coordinate value 16 |
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-M.html: -------------------------------------------------------------------------------- 1 | M 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-N.html: -------------------------------------------------------------------------------- 1 | N 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-O.html: -------------------------------------------------------------------------------- 1 | O 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-P.html: -------------------------------------------------------------------------------- 1 | P 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-Q.html: -------------------------------------------------------------------------------- 1 | Q 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-T.html: -------------------------------------------------------------------------------- 1 | T 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
topY — Property, class com.chargedweb.swfsize.SWFSize
14 | Returns the current topY coordinate i.e.
topY — Property, class com.chargedweb.swfsize.SWFSizeEvent
15 | Current browser's window topY coordinate value 16 |
toString() — method, class com.chargedweb.swfsize.SWFSizeEvent
17 | Formats the event as string 18 |
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-U.html: -------------------------------------------------------------------------------- 1 | U 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-V.html: -------------------------------------------------------------------------------- 1 | V 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
VERSION — Constant Static Property, class com.chargedweb.swfsize.SWFSize
Holds the full version string
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-X.html: -------------------------------------------------------------------------------- 1 | X 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-Y.html: -------------------------------------------------------------------------------- 1 | Y 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/all-index-Z.html: -------------------------------------------------------------------------------- 1 | Z 6 |

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  

-------------------------------------------------------------------------------- /docs/class-summary.html: -------------------------------------------------------------------------------- 1 | All Classes 6 |

Documentation for classes includes syntax, usage information, and code samples for methods, properties, and event handlers and listeners for those APIs that belong to a specific class in ActionScript. The classes are listed alphabetically. If you are not sure to which class a certain method or property belongs, you can look it up in the Index.


 ClassPackageDescription
 SWFSize
com.chargedweb.swfsize 14 | SWFSize class gives you the ability to: 15 | 16 | control the swf's container metrics; 17 | gather browser's window metrics & position; 18 | control the browser's native scrollbars. 19 | 20 |
 SWFSizeEvent
com.chargedweb.swfsize 21 | The SWFSizeEvent class defines events that are associated with the SWFSize object. 22 | These include the following events: 23 | 24 | SWFSizeEvent.INIT: dispatched when SWFSize js is loaded and ready; 25 | SWFSizeEvent.SCROLL: dispatched when user scrolls browser's native scrollbars; 26 | SWFSizeEvent.RESIZE: dispatched when browser's window is being resized. 27 | 28 |

-------------------------------------------------------------------------------- /docs/com/chargedweb/swfsize/class-list.html: -------------------------------------------------------------------------------- 1 | com.chargedweb.swfsize - SWFSize lib

Package com.chargedweb.swfsize

Classes
SWFSize
SWFSizeEvent
-------------------------------------------------------------------------------- /docs/com/chargedweb/swfsize/package-detail.html: -------------------------------------------------------------------------------- 1 | com.chargedweb.swfsize Summary 6 |



Classes
 ClassDescription
 SWFSize 14 | SWFSize class gives you the ability to: 15 | 16 | control the swf's container metrics; 17 | gather browser's window metrics & position; 18 | control the browser's native scrollbars. 19 | 20 |
 SWFSizeEvent 21 | The SWFSizeEvent class defines events that are associated with the SWFSize object. 22 | These include the following events: 23 | 24 | SWFSizeEvent.INIT: dispatched when SWFSize js is loaded and ready; 25 | SWFSizeEvent.SCROLL: dispatched when user scrolls browser's native scrollbars; 26 | SWFSizeEvent.RESIZE: dispatched when browser's window is being resized. 27 | 28 |

-------------------------------------------------------------------------------- /docs/cookies.js: -------------------------------------------------------------------------------- 1 | //////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // ADOBE SYSTEMS INCORPORATED 4 | // Copyright 2006-2008 Adobe Systems Incorporated 5 | // All Rights Reserved. 6 | // 7 | // NOTICE: Adobe permits you to use, modify, and distribute this file 8 | // in accordance with the terms of the license agreement accompanying it. 9 | // 10 | //////////////////////////////////////////////////////////////////////////////// 11 | 12 | /** 13 | * Read the JavaScript cookies tutorial at: 14 | * http://www.netspade.com/articles/javascript/cookies.xml 15 | */ 16 | 17 | /** 18 | * Sets a Cookie with the given name and value. 19 | * 20 | * name Name of the cookie 21 | * value Value of the cookie 22 | * [expires] Expiration date of the cookie (default: end of current session) 23 | * [path] Path where the cookie is valid (default: path of calling document) 24 | * [domain] Domain where the cookie is valid 25 | * (default: domain of calling document) 26 | * [secure] Boolean value indicating if the cookie transmission requires a 27 | * secure transmission 28 | */ 29 | function setCookie(name, value, expires, path, domain, secure) 30 | { 31 | document.cookie= name + "=" + escape(value) + 32 | ((expires) ? "; expires=" + expires.toGMTString() : "") + 33 | ((path) ? "; path=" + path : "") + 34 | ((domain) ? "; domain=" + domain : "") + 35 | ((secure) ? "; secure" : ""); 36 | } 37 | 38 | /** 39 | * Gets the value of the specified cookie. 40 | * 41 | * name Name of the desired cookie. 42 | * 43 | * Returns a string containing value of specified cookie, 44 | * or null if cookie does not exist. 45 | */ 46 | function getCookie(name) 47 | { 48 | var dc = document.cookie; 49 | var prefix = name + "="; 50 | var begin = dc.indexOf("; " + prefix); 51 | if (begin == -1) 52 | { 53 | begin = dc.indexOf(prefix); 54 | if (begin != 0) return null; 55 | } 56 | else 57 | { 58 | begin += 2; 59 | } 60 | var end = document.cookie.indexOf(";", begin); 61 | if (end == -1) 62 | { 63 | end = dc.length; 64 | } 65 | return unescape(dc.substring(begin + prefix.length, end)); 66 | } 67 | 68 | /** 69 | * Deletes the specified cookie. 70 | * 71 | * name name of the cookie 72 | * [path] path of the cookie (must be same as path used to create cookie) 73 | * [domain] domain of the cookie (must be same as domain used to create cookie) 74 | */ 75 | function deleteCookie(name, path, domain) 76 | { 77 | if (getCookie(name)) 78 | { 79 | document.cookie = name + "=" + 80 | ((path) ? "; path=" + path : "") + 81 | ((domain) ? "; domain=" + domain : "") + 82 | "; expires=Thu, 01-Jan-70 00:00:01 GMT"; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /docs/images/AirIcon12x12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jloa/SWFSize/c45b585500d3a4de893d5687df27af34fef2e7e6/docs/images/AirIcon12x12.gif -------------------------------------------------------------------------------- /docs/images/P_AlternativeMetadataIndicator_30x28_N.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jloa/SWFSize/c45b585500d3a4de893d5687df27af34fef2e7e6/docs/images/P_AlternativeMetadataIndicator_30x28_N.png -------------------------------------------------------------------------------- /docs/images/collapsed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jloa/SWFSize/c45b585500d3a4de893d5687df27af34fef2e7e6/docs/images/collapsed.gif -------------------------------------------------------------------------------- /docs/images/detailHeaderRule.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jloa/SWFSize/c45b585500d3a4de893d5687df27af34fef2e7e6/docs/images/detailHeaderRule.jpg -------------------------------------------------------------------------------- /docs/images/detailSectionHeader.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jloa/SWFSize/c45b585500d3a4de893d5687df27af34fef2e7e6/docs/images/detailSectionHeader.jpg -------------------------------------------------------------------------------- /docs/images/expanded.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jloa/SWFSize/c45b585500d3a4de893d5687df27af34fef2e7e6/docs/images/expanded.gif -------------------------------------------------------------------------------- /docs/images/inherit-arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jloa/SWFSize/c45b585500d3a4de893d5687df27af34fef2e7e6/docs/images/inherit-arrow.gif -------------------------------------------------------------------------------- /docs/images/inheritedSummary.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jloa/SWFSize/c45b585500d3a4de893d5687df27af34fef2e7e6/docs/images/inheritedSummary.gif -------------------------------------------------------------------------------- /docs/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jloa/SWFSize/c45b585500d3a4de893d5687df27af34fef2e7e6/docs/images/logo.jpg -------------------------------------------------------------------------------- /docs/images/swfsize_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jloa/SWFSize/c45b585500d3a4de893d5687df27af34fef2e7e6/docs/images/swfsize_logo.png -------------------------------------------------------------------------------- /docs/images/titleTableBottom.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jloa/SWFSize/c45b585500d3a4de893d5687df27af34fef2e7e6/docs/images/titleTableBottom.jpg -------------------------------------------------------------------------------- /docs/images/titleTableMiddle.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jloa/SWFSize/c45b585500d3a4de893d5687df27af34fef2e7e6/docs/images/titleTableMiddle.jpg -------------------------------------------------------------------------------- /docs/images/titleTableTop.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jloa/SWFSize/c45b585500d3a4de893d5687df27af34fef2e7e6/docs/images/titleTableTop.jpg -------------------------------------------------------------------------------- /docs/index-list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | SWFSize lib 4 | 5 | 6 | 7 | 8 | 9 |

Index

10 | 11 | 12 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 |
AN
BO
CP
DQ
ER
FS
GT
HU
IV
JW
KX
LY
MZ
70 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | SWFSize lib 4 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | <body> 31 | <h2>Frame Alert</h2> 32 | <p> 33 | This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. 34 | <br> 35 | Link to <a href="package-summary.html">Non-frame version.</a> 36 | </p> 37 | </body> 38 | 39 | 40 | -------------------------------------------------------------------------------- /docs/override.css: -------------------------------------------------------------------------------- 1 | /* 2 | //////////////////////////////////////////////////////////////////////////////// 3 | // 4 | // ADOBE SYSTEMS INCORPORATED 5 | // Copyright 2008 Adobe Systems Incorporated 6 | // All Rights Reserved. 7 | // 8 | // NOTICE: Adobe permits you to use, modify, and distribute this file 9 | // in accordance with the terms of the license agreement accompanying it. 10 | // 11 | //////////////////////////////////////////////////////////////////////////////// 12 | */ -------------------------------------------------------------------------------- /docs/package-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | SWFSize lib 4 | 5 | 6 | 7 | 8 | 9 | <body> 10 | <h2>Frame Alert</h2> 11 | <p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. 12 | <br> 13 | Link to<a href="package-summary.html">Non-frame version.</a> 14 | </p> 15 | </body> 16 | 17 | 18 | -------------------------------------------------------------------------------- /docs/package-list.html: -------------------------------------------------------------------------------- 1 | Package List - SWFSize lib

Packages

com.chargedweb.swfsize
-------------------------------------------------------------------------------- /docs/package-summary.html: -------------------------------------------------------------------------------- 1 | All Packages 6 |

SWFSize
 packageDescription
 com.chargedweb.swfsize

-------------------------------------------------------------------------------- /docs/print.css: -------------------------------------------------------------------------------- 1 | /* 2 | //////////////////////////////////////////////////////////////////////////////// 3 | // 4 | // ADOBE SYSTEMS INCORPORATED 5 | // Copyright 2005-2008 Adobe Systems Incorporated 6 | // All Rights Reserved. 7 | // 8 | // NOTICE: Adobe permits you to use, modify, and distribute this file 9 | // in accordance with the terms of the license agreement accompanying it. 10 | // 11 | //////////////////////////////////////////////////////////////////////////////// 12 | */ 13 | 14 | body { 15 | color: #000000; 16 | background: #ffffff; 17 | font-family: "Times New Roman", Times, serif; 18 | font-size: 12pt; 19 | } 20 | a { 21 | text-decoration: none; 22 | color: #000000; 23 | } 24 | pre { 25 | white-space: -moz-pre-wrap; /* Mozilla */ 26 | white-space: -pre-wrap; /* Opera 4-6 */ 27 | white-space: -o-pre-wrap; /* Opera 7 */ 28 | word-wrap: break-word; /* IE */ 29 | } 30 | .titleTableTopNav, .titleTableSubNav, .logoImage { 31 | display: none; 32 | } 33 | .packageFrame { 34 | display: none; 35 | } 36 | .titleTableSubTitle { 37 | font-weight: bold; 38 | } 39 | .classHeaderTableLabel { 40 | padding-right: 10px; 41 | vertical-align: top; 42 | } 43 | .showHideLinks { 44 | display: none; 45 | } 46 | html>body code { 47 | font-size: 10pt; 48 | } 49 | .summaryTableTitle, .detailSectionHeader { 50 | font-size: 14pt; 51 | font-weight: bold; 52 | padding-top: 15px; 53 | padding-bottom: 5px; 54 | } 55 | .summaryTable { 56 | border: 1px solid #000000; 57 | border-collapse: collapse; 58 | width: 100%; 59 | } 60 | .summaryTableDescription { 61 | padding-bottom: 20px; 62 | } 63 | .summaryTableSignatureCol, .summaryTableOwnerCol, .summaryTableLastCol, .summaryTableCol { 64 | border: 1px solid #000000; 65 | } 66 | .summaryTablePaddingCol { 67 | border: 1px solid #000000; 68 | border-right: 0px; 69 | } 70 | .summaryTableInheritanceCol, .summaryTableOperatorCol, .summaryTableStatementCol, .summaryTableSecondCol { 71 | border: 1px solid #000000; 72 | border-left: 0px; 73 | } 74 | .summaryTableLastCol { 75 | vertical-align: top; 76 | } 77 | .detailHeader { 78 | font-size: 13pt; 79 | padding-top: 100px; 80 | } 81 | .detailHeaderName { 82 | font-weight: bold; 83 | } 84 | .detailHeaderType { 85 | padding-left: 5px; 86 | } 87 | .detailHeaderRule { 88 | background: #FF0000; 89 | } 90 | .seeAlso { 91 | padding-bottom: 20px; 92 | margin-top: -20px; 93 | } 94 | .innertable { 95 | border-collapse: collapse; 96 | } 97 | .innertable td,.innertable th { 98 | border: 1px solid #000000; 99 | padding-left: 5px; 100 | padding-right: 5px; 101 | } 102 | .listing { 103 | font-size: 10pt; 104 | } 105 | .feedbackLink { 106 | display: none; 107 | } 108 | .copyright { 109 | font-size: 10pt; 110 | } -------------------------------------------------------------------------------- /docs/title-bar.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | SWFSize lib 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 22 | 23 | 24 | 25 | 38 | 39 |
13 | 14 | 15 | 16 | 19 | 20 |
SWFSize lib  17 | All Packages  |  All Classes  |  Index  |  No Frames 18 |
21 |
26 | 27 | 28 | 29 | 32 | 33 | 34 | 35 | 36 |
 
 
37 |
40 | 41 | -------------------------------------------------------------------------------- /lib/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | SWFSize v.1.4.1 4 | 5 | 6 | 7 | 12 | 13 | 14 | 15 | 16 | 37 | 38 | 39 | 40 | 41 |
42 | 43 |

You need to upgrade your Flash Player

44 |
45 | 46 | -------------------------------------------------------------------------------- /lib/js/swfsize.js: -------------------------------------------------------------------------------- 1 | /* 2 | @project: SWFsize @ www.chargedweb.com/swfsize/ 3 | @version: 1.4.1 4 | @author: Julius Loa a.k.a. Jloa | jloa[at]chargedweb.com 5 | licence: CC 3.0 @ http://creativecommons.org/licenses/by-sa/3.0/ 6 | 7 | o---[changes]--------------------------------------------------------------- 8 | 9 | [v.1.4.1] 10 | - see the SWFSize.as for changes / release notes 11 | [v.1.4.0] 12 | - event broadcast removed from setSWFWidth(), setSWFHeight() methods [thx 2 Umano Teodori] 13 | [v.1.3] 14 | - ie 6, 7 scroll bug fixed [thx to Reed Bertolette] 15 | [v.1.2] 16 | - engine switched singleton -> class; now you can manage more than 1 embedded swf at a time! [thx David Aguilar for the suggestion] 17 | [v.1.1] 18 | - improved performance 19 | - method setWidth() renamed to setSWFWidth() 20 | - method setHeight() renamed to setSWFHeight() 21 | [v.1.0] 22 | - added setWidth() method 23 | - added setHeight() method 24 | - added getWidth() method 25 | - added getHeight() method 26 | - added getWindowWidth() method 27 | - added getWindowHeight() method 28 | - added getLeftX() method 29 | - added getRightX() method 30 | - added getTopY() method 31 | - added getBottomY() method 32 | - added setScrollX() method 33 | - added getScrollX() method 34 | - added setScrollY() method 35 | - added getScrollY() method 36 | @FIXME: [not for IE] have to deduct the scrollbars width/height @see desciption below 37 | 38 | o--------------------------------------------------------------------------- 39 | 40 | o---[example]--------------------------------------------------------------- 41 | 42 | html usage (with swfobject): 43 | 44 | 45 | 46 | 66 | 67 | AS3 usage: @see the com.chargedweb.swfsize.SWFSize class 68 | 69 | o--------------------------------------------------------------------------- 70 | */ 71 | SWFSize = function SWFSize() 72 | { 73 | this.id = ""; 74 | this.version = "1.4.0"; 75 | this.valueAbs = "px"; this.valueRel = "%"; 76 | this.browser = navigator.appName; 77 | this.isIE = (this.browser.indexOf("Microsoft") >= 0); 78 | this.lX = 0; this.rX = 0; this.tY = 0; this.bY = 0; this.wH = 0; this.wW = 0; this.sW = 0; this.sH = 0; this.swfW = 0; this.swfH = 0; this.scrX = 0; this.scrY = 0; 79 | this.setId = function(id) { this.id = id; SWFSizePool.register(this); } 80 | this.init = function() 81 | { 82 | if(!this.available()){ this.errorID(); return 0; } 83 | this.targetSWF().focus(); 84 | this.onWindowLoadHandler(); return 1; 85 | } 86 | this.updateMetrics = function() 87 | { 88 | this.swfW = this.getSWFWidth(); 89 | this.swfH = this.getSWFHeight(); 90 | this.scrX = this.getScrollX(); 91 | this.scrY = this.getScrollY(); 92 | this.wW = (this.isIE) ? document.body.clientWidth : window.innerWidth; 93 | this.wH = (this.isIE) ? document.body.clientHeight : window.innerHeight; 94 | 95 | /** 96 | * @FIXME [!IE] have to deduct the scrollbars width/height (horizontal/vertical bars) from the swfsize.wW, swfsize.wH so that the swfsize.rX, swfsize.bY be precise; window.pageXOffset; window.pageYOffset 97 | * @UPD solved, part 98 | */ 99 | if(!this.isIE) 100 | { 101 | this.sW = this.wW - document.body.offsetWidth; 102 | this.sH = this.wH - document.body.offsetHeight; 103 | this.wW -= this.sW; 104 | } 105 | 106 | this.lX = document.body.scrollLeft; 107 | this.rX = this.lX + this.wW; 108 | this.tY = document.body.scrollTop; 109 | this.bY = this.tY + this.wH; 110 | } 111 | this.onWindowLoadHandler = function(e) 112 | { 113 | if(this.available()) 114 | { 115 | this.updateMetrics(); 116 | this.targetSWF().onWindowInit(this.tY+","+this.bY+","+this.lX+","+this.rX+","+this.wW+","+this.wH+","+this.swfW+","+this.swfH+","+this.scrX+","+this.scrY); 117 | }else{ 118 | this.errorID(); 119 | } 120 | } 121 | 122 | this.setSWFWidth = function(value, valueType) 123 | { 124 | valueType = this.checkValueType(valueType); 125 | if(this.available()) 126 | { 127 | this.targetSWF().width = (valueType == this.valueAbs) ? value : value + valueType; 128 | this.targetSWF().style.width = value + valueType; 129 | }else{ 130 | this.errorID(); 131 | } 132 | } 133 | this.setSWFHeight = function(value, valueType) 134 | { 135 | valueType = this.checkValueType(valueType); 136 | if(this.available()) 137 | { 138 | this.targetSWF().height = (valueType == this.valueAbs) ? value : value + valueType; 139 | this.targetSWF().style.height = value + valueType; 140 | }else{ 141 | this.errorID(); 142 | } 143 | } 144 | this.getSWFWidth = function() { if(this.id != "" && this.targetSWF()) { return this.targetSWF().width; }else{ this.errorID(); return 0; } } 145 | this.getSWFHeight = function() { if(this.id != "" && this.targetSWF()) { return this.targetSWF().height; }else{ this.errorID(); return 0; } } 146 | this.setScrollX = function(value){ var oY = (this.isIE) ? this.tY : window.pageYOffset; window.scrollTo(value, oY); this.updateMetrics(); } 147 | this.setScrollY = function(value){ var oX = (this.isIE) ? this.lX : window.pageXOffset; window.scrollTo(oX, value); this.updateMetrics(); } 148 | this.getScrollX = function(){ return (this.isIE) ? this.lX : window.pageXOffset; } 149 | this.getScrollY = function(){ return (this.isIE) ? this.tY : window.pageYOffset; } 150 | this.getWindowWidth = function(){ return this.wW; } 151 | this.getWindowHeight = function(){ return this.wH; } 152 | this.getLeftX = function(){ return this.lX; } 153 | this.getRightX = function(){ return this.rX; } 154 | this.getTopY = function(){ return this.tY; } 155 | this.getBottomY = function(){ return this.bY; } 156 | this.available = function() { return (this.id != "" && this.targetSWF()); } 157 | this.checkValueType = function(value) { value = (!value || value != this.valueAbs && value != this.valueRel) ? this.valueAbs : value; return value; } 158 | this.targetSWF = function() { return (this.isIE) ? window[this.id] : document[this.id]; } 159 | this.errorID = function() { alert("Error: could not find the swf container using SWFsize.id = \""+this.id+"\"\nCheck wheter you've passed the swf's id to SWFSize via swfsize.setId(attributes.id);"); } 160 | } 161 | 162 | SWFSizePool = new function SWFSizePooler(){ 163 | this.pool = []; 164 | this.numItems = 0; 165 | this.initialized = false; 166 | this.register = function(instance) 167 | { 168 | this.pool.push(instance); 169 | this.numItems = this.pool.length; 170 | if(!this.initialized) 171 | { 172 | if(window.addEventListener) 173 | { 174 | window.addEventListener("resize", this.onWindowResizeHandler, false); 175 | window.addEventListener("scroll", this.onWindowScrollHandler, false); 176 | }else{ 177 | window.attachEvent("onresize", this.onWindowResizeHandler); 178 | window.attachEvent("onscroll", this.onWindowScrollHandler); 179 | } 180 | initialized = true; 181 | } 182 | } 183 | this.getItemById = function(id){ 184 | for(var i = 0; i < this.numItems; i++) 185 | if(this.pool[i].id == id) return this.pool[i]; 186 | } 187 | this.onWindowResizeHandler = function(e) 188 | { 189 | for(var i = 0; i < SWFSizePool.numItems; i++) 190 | { 191 | inst = SWFSizePool.pool[i]; 192 | inst.updateMetrics(); inst.targetSWF().onWindowResize(inst.tY+","+inst.bY+","+inst.lX+","+inst.rX+","+inst.wW+","+inst.wH+","+inst.swfW+","+inst.swfH+","+inst.scrX+","+inst.scrY); 193 | } 194 | } 195 | this.onWindowScrollHandler = function(e) 196 | { 197 | for(var i = 0; i < SWFSizePool.numItems; i++) 198 | { 199 | inst = SWFSizePool.pool[i]; 200 | inst.updateMetrics(); inst.targetSWF().onWindowScroll(inst.tY+","+inst.bY+","+inst.lX+","+inst.rX+","+inst.wW+","+inst.wH+","+inst.swfW+","+inst.swfH+","+inst.scrX+","+inst.scrY); 201 | } 202 | } 203 | } -------------------------------------------------------------------------------- /lib/js/swfsize_compressed.js: -------------------------------------------------------------------------------- 1 | /* 2 | @project: SWFsize @ www.chargedweb.com/swfsize/ 3 | @version: 1.4.1 4 | @author: Julius Loa a.k.a. Jloa | jloa[at]chargedweb.com 5 | licence: CC 3.0 @ http://creativecommons.org/licenses/by-sa/3.0/ 6 | */ 7 | SWFSize=function SWFSize(){this.id="";this.version="1.4.0";this.valueAbs="px";this.valueRel="%";this.browser=navigator.appName;this.isIE=(this.browser.indexOf("Microsoft")>=0);this.lX=0;this.rX=0;this.tY=0;this.bY=0;this.wH=0;this.wW=0;this.sW=0;this.sH=0;this.swfW=0;this.swfH=0;this.scrX=0;this.scrY=0;this.setId=function(a){this.id=a;SWFSizePool.register(this)};this.init=function(){if(!this.available()){this.errorID();return 0}this.targetSWF().focus();this.onWindowLoadHandler();return 1};this.updateMetrics=function(){this.swfW=this.getSWFWidth();this.swfH=this.getSWFHeight();this.scrX=this.getScrollX();this.scrY=this.getScrollY();this.wW=(this.isIE)?document.body.clientWidth:window.innerWidth;this.wH=(this.isIE)?document.body.clientHeight:window.innerHeight;if(!this.isIE){this.sW=this.wW-document.body.offsetWidth;this.sH=this.wH-document.body.offsetHeight;this.wW-=this.sW}this.lX=document.body.scrollLeft;this.rX=this.lX+this.wW;this.tY=document.body.scrollTop;this.bY=this.tY+this.wH};this.onWindowLoadHandler=function(a){if(this.available()){this.updateMetrics();this.targetSWF().onWindowInit(this.tY+","+this.bY+","+this.lX+","+this.rX+","+this.wW+","+this.wH+","+this.swfW+","+this.swfH+","+this.scrX+","+this.scrY)}else{this.errorID()}};this.setSWFWidth=function(a,b){b=this.checkValueType(b);if(this.available()){this.targetSWF().width=(b==this.valueAbs)?a:a+b;this.targetSWF().style.width=a+b}else{this.errorID()}};this.setSWFHeight=function(a,b){b=this.checkValueType(b);if(this.available()){this.targetSWF().height=(b==this.valueAbs)?a:a+b;this.targetSWF().style.height=a+b}else{this.errorID()}};this.getSWFWidth=function(){if(this.id!=""&&this.targetSWF()){return this.targetSWF().width}else{this.errorID();return 0}};this.getSWFHeight=function(){if(this.id!=""&&this.targetSWF()){return this.targetSWF().height}else{this.errorID();return 0}};this.setScrollX=function(b){var a=(this.isIE)?this.tY:window.pageYOffset;window.scrollTo(b,a);this.updateMetrics()};this.setScrollY=function(b){var a=(this.isIE)?this.lX:window.pageXOffset;window.scrollTo(a,b);this.updateMetrics()};this.getScrollX=function(){return(this.isIE)?this.lX:window.pageXOffset};this.getScrollY=function(){return(this.isIE)?this.tY:window.pageYOffset};this.getWindowWidth=function(){return this.wW};this.getWindowHeight=function(){return this.wH};this.getLeftX=function(){return this.lX};this.getRightX=function(){return this.rX};this.getTopY=function(){return this.tY};this.getBottomY=function(){return this.bY};this.available=function(){return(this.id!=""&&this.targetSWF())};this.checkValueType=function(a){a=(!a||a!=this.valueAbs&&a!=this.valueRel)?this.valueAbs:a;return a};this.targetSWF=function(){return(this.isIE)?window[this.id]:document[this.id]};this.errorID=function(){alert('Error: could not find the swf container using SWFsize.id = "'+this.id+"\"\nCheck wheter you've passed the swf's id to SWFSize via swfsize.setId(attributes.id);")}};SWFSizePool=new function SWFSizePooler(){this.pool=[];this.numItems=0;this.initialized=false;this.register=function(a){this.pool.push(a);this.numItems=this.pool.length;if(!this.initialized){if(window.addEventListener){window.addEventListener("resize",this.onWindowResizeHandler,false);window.addEventListener("scroll",this.onWindowScrollHandler,false)}else{window.attachEvent("onresize",this.onWindowResizeHandler);window.attachEvent("onscroll",this.onWindowScrollHandler)}initialized=true}};this.getItemById=function(b){for(var a=0;aThe SWFSizeEvent class defines events that are associated with the SWFSize object.

40 | *

These include the following events:

41 | * 46 | * @see SWFSize 47 | */ 48 | public class SWFSizeEvent extends Event 49 | { 50 | /** 51 | *

The SWFSizeEvent.INIT constant defines the value of the type property of the 52 | * event object for a onInit event; dispatched when SWFSize js is loaded and ready.

53 | * @eventType onInit 54 | */ 55 | public static const INIT:String = "onInit"; 56 | 57 | /** 58 | *

The SWFSizeEvent.SCROLL constant defines the value of the type property of the 59 | * event object for a onScroll event; dispatched when user scrolls the browser's native scrollbars.

60 | * @eventType onScroll 61 | */ 62 | public static const SCROLL:String = "onScroll"; 63 | 64 | /** 65 | *

The SWFSizeEvent.SCROLL constant defines the value of the type property of the 66 | * event object for a onResize event; dispatched when the browser's window is being resized.

67 | * @eventType onResize 68 | */ 69 | public static const RESIZE:String = "onResize"; 70 | 71 | /** 72 | * Current browser's window leftX coordinate value 73 | */ 74 | public var leftX:Number; 75 | 76 | /** 77 | * Current browser's window rightX coordinate value 78 | */ 79 | public var rightX:Number; 80 | 81 | /** 82 | * Current browser's window topY coordinate value 83 | */ 84 | public var topY:Number; 85 | 86 | /** 87 | * Current browser's window bottomY coordinate value 88 | */ 89 | public var bottomY:Number; 90 | 91 | /** 92 | * Current browser's window width value 93 | */ 94 | public var windowWidth:Number; 95 | 96 | /** 97 | * Current browser's height width value 98 | */ 99 | public var windowHeight:Number; 100 | 101 | /** 102 | * Current swf container's width value 103 | */ 104 | public var swfWidth:Object; 105 | 106 | /** 107 | * Current swf container's height value 108 | */ 109 | public var swfHeight:Object; 110 | 111 | /** 112 | * Current scrollX value 113 | */ 114 | public var scrollX:Number; 115 | 116 | /** 117 | * Current scrollY value 118 | */ 119 | public var scrollY:Number; 120 | 121 | /** 122 | * Constructor; creates a new SWFSizeEvent object. 123 | * @param type:String event type 124 | * @param leftX:Number browser's leftX coordinate 125 | * @param rightX:Number browser's rightX coordinate 126 | * @param topY:Number browser's topY coordinate 127 | * @param bottomY:Number the browser's bottomY coordinate 128 | * @param windowWidth:Number the browser's window width value 129 | * @param windowHeight:Number the browser's window height value 130 | * @param swfWidth:Object swf container's width value object 131 | * @param swfHeight:Object swf container's height value object 132 | * @param scrollX:Number current scrollX value 133 | * @param scrollY:Number current scrollY value 134 | * @param bubbles:Boolean bubbles @see flash.events.Event @default false 135 | * @param cancelable:Boolean cancelable @see flash.events.Event @default false 136 | */ 137 | public function SWFSizeEvent(type:String, 138 | leftX:Number, 139 | rightX:Number, 140 | topY:Number, 141 | bottomY:Number, 142 | windowWidth:Number, 143 | windowHeight:Number, 144 | swfWidth:Object, 145 | swfHeight:Object, 146 | scrollX:Number, 147 | scrollY:Number, 148 | bubbles:Boolean = false, 149 | cancelable:Boolean = false):void 150 | { 151 | this.topY = topY; 152 | this.bottomY = bottomY; 153 | this.leftX = leftX; 154 | this.rightX = rightX; 155 | this.windowWidth = windowWidth; 156 | this.windowHeight = windowHeight; 157 | this.swfWidth = swfWidth; 158 | this.swfHeight = swfHeight; 159 | this.scrollX = scrollX; 160 | this.scrollY = scrollY; 161 | super(type, bubbles, cancelable); 162 | } 163 | 164 | /** 165 | * Formats the event as string 166 | * @return the string representation of the SWFSizeEvent class. 167 | */ 168 | override public function toString():String 169 | { 170 | return formatToString("SWFSizeEvent", 171 | "type", 172 | "leftX", 173 | "rightX", 174 | "topY", 175 | "bottomY", 176 | "windowWidth", 177 | "windowHeight", 178 | "swfWidth", 179 | "swfHeight", 180 | "scrollX", 181 | "scrollY", 182 | "bubbles", 183 | "cancelable"); 184 | } 185 | } 186 | } --------------------------------------------------------------------------------