/** * Use to create a popup an image file that automatically resizes to fit its content. * Works ONLY with image files. * * usage: * * OBO_Popup.pop("path/image.jpg", ["Window Title", "yes", "yes", "yes", "yes", "yes", "yes"]); * * Only the path to image is required - all other arguments are optional. If not supplied, * the default window title is "Image". * * @author Devon O. */ package com.onebyonedesign.extras { import flash.external.ExternalInterface; public class OBO_Popup { public static function pop(url:String, title:String = "Image", resizable:String = "no", toolbar:String = "no", menubar:String = "no", status:String = "no", directories:String = "no", location:String = "no"):void { if (ExternalInterface.available) { // does browser use layers or divs? var hasLayers:Boolean = ExternalInterface.call('document.layers'); // open popup ExternalInterface.call('imgWin=window.open', '', '', 'scrollbars=no, resizable=' + resizable + ', toolbar=' + toolbar + ', menubar=' + menubar + ', status=' + status + ', directories=' + directories + ', location=' + location + 'scrollbars=0, width=50, height=50, left=50, top=50'); // begin html ExternalInterface.call('imgWin.document.writeln', '