Warning: Use of undefined constant Symbol - assumed 'Symbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215 Warning: Use of undefined constant JavaScriptSymbol - assumed 'JavaScriptSymbol' (this will throw an Error in a future version of PHP) in /mnt/new-ebs/workbench-106550/lib/dojo/util/docscripts/lib/parser2/dojo2.inc on line 215

dojox/flash/_base.js

  • Provides:

    • dojox.flash._base
  • Requires:

    • dojo.window in common
  • dojox.flash

    • summary
      Utilities to embed and communicate with the Flash player from Javascript
    • description
      The goal of dojox.flash is to make it easy to extend Flash's capabilities
      into an Ajax/DHTML environment.
      
      dojox.flash provides an easy object for interacting with the Flash plugin.
      This object provides methods to determine the current version of the Flash
      plugin (dojox.flash.info); write out the necessary markup to
      dynamically insert a Flash object into the page (dojox.flash.Embed; and
      do dynamic installation and upgrading of the current Flash plugin in
      use (dojox.flash.Install). If you want to call methods on the Flash object
      embedded into the page it is your responsibility to use Flash's ExternalInterface
      API and get a reference to the Flash object yourself.
      
      To use dojox.flash, you must first wait until Flash is finished loading
      and initializing before you attempt communication or interaction.
      To know when Flash is finished use dojo.connect:
      
      	dojo.connect(dojox.flash, "loaded", myInstance, "myCallback");
      
      Then, while the page is still loading provide the file name:
      
      	dojox.flash.setSwf(dojo.moduleUrl("dojox", "_storage/storage.swf"));
      
      If no SWF files are specified, then Flash is not initialized.
      
      Your Flash must use Flash's ExternalInterface to expose Flash methods and
      to call JavaScript.
      
      setSwf can take an optional 'visible' attribute to control whether
      the Flash object is visible or not on the page; the default is visible:
      
      	dojox.flash.setSwf(dojo.moduleUrl("dojox", "_storage/storage.swf"),
      false);
      
      Once finished, you can query Flash version information:
      
      	dojox.flash.info.version
      
      Or can communicate with Flash methods that were exposed:
      
      	var f = dojox.flash.get();
      	var results = f.sayHello("Some Message");
      
      Your Flash files should use DojoExternalInterface.as to register methods;
      this file wraps Flash's normal ExternalInterface but correct various
      serialization bugs that ExternalInterface has.
      
      Note that dojox.flash is not meant to be a generic Flash embedding
      mechanism; it is as generic as necessary to make Dojo Storage's
      Flash Storage Provider as clean and modular as possible. If you want
      a generic Flash embed mechanism see [SWFObject](http://blog.deconcept.com/swfobject/).
      
      Notes:
      Note that dojox.flash can currently only work with one Flash object
      on the page; it does not yet support multiple Flash objects on
      the same page.
      
      Your code can detect whether the Flash player is installing or having
      its version revved in two ways. First, if dojox.flash detects that
      Flash installation needs to occur, it sets dojox.flash.info.installing
      to true. Second, you can detect if installation is necessary with the
      following callback:
      
      	dojo.connect(dojox.flash, "installing", myInstance, "myCallback");
      
      You can use this callback to delay further actions that might need Flash;
      when installation is finished the full page will be refreshed and the
      user will be placed back on your page with Flash installed.
      
      -------------------
      Todo/Known Issues
      -------------------
      
      * On Internet Explorer, after doing a basic install, the page is
      not refreshed or does not detect that Flash is now available. The way
      to fix this is to create a custom small Flash file that is pointed to
      during installation; when it is finished loading, it does a callback
      that says that Flash installation is complete on IE, and we can proceed
      to initialize the dojox.flash subsystem.
      * Things aren't super tested for sending complex objects to Flash
      methods, since Dojo Storage only needs strings
      
      Author- Brad Neuberg, http://codinginparadise.org
    • type
      Function
  • dojox.flash.ready

    • type
      bool
  • dojox.flash.url

    • type
      Object
  • dojox.flash._visible

    • type
      Object
  • dojox.flash._loadedListeners

    • type
      Array
  • dojox.flash._installingListeners

    • type
      Array
  • dojox.flash.setSwf

    • parameters:
      • url: (typeof String)
        The URL to this Flash file.
      • visible: (typeof boolean)
        Whether the Flash file is visible or not. If it is not visible we hide
        it off the screen. This defaults to true (i.e. the Flash file is
        visible).
    • summary
      Sets the SWF files and versions we are using.
    • type
      Function
  • dojox.flash.setSwf.url

    • type
      String
    • summary
      The URL to this Flash file.
      visible: boolean?
      Whether the Flash file is visible or not. If it is not visible we hide
      it off the screen. This defaults to true (i.e. the Flash file is
      visible).
  • dojox.flash.setSwf._visible

    • type
      Object
  • dojox.flash.addLoadedListener

    • parameters:
      • listener: (typeof Function)
        A function that will be called when Flash is done loading.
    • summary
      Adds a listener to know when Flash is finished loading.
      Useful if you don't want a dependency on dojo.event.
    • type
      Function
  • dojox.flash.addInstallingListener

    • parameters:
      • listener: (typeof Function)
        A function that will be called if Flash is being
        installed
    • summary
      Adds a listener to know if Flash is being installed.
      Useful if you don't want a dependency on dojo.event.
    • type
      Function
  • dojox.flash.loaded

    • summary
      Called back when the Flash subsystem is finished loading.
    • description
      A callback when the Flash subsystem is finished loading and can be
      worked with. To be notified when Flash is finished loading, add a
      loaded listener:
      
      dojox.flash.addLoadedListener(loadedListener);
    • type
      Function
  • dojox.flash.installing

    • summary
      Called if Flash is being installed.
    • description
      A callback to know if Flash is currently being installed or
      having its version revved. To be notified if Flash is installing, connect
      your callback to this method using the following:
      
      dojo.event.connect(dojox.flash, "installing", myInstance, "myCallback");
    • type
      Function
  • dojox.flash._initialize

    • type
      Function
  • dojox.flash.Info

    • summary
      A class that helps us determine whether Flash is available.
    • description
      A class that helps us determine whether Flash is available,
      it's major and minor versions, and what Flash version features should
      be used for Flash/JavaScript communication. Parts of this code
      are adapted from the automatic Flash plugin detection code autogenerated
      by the Macromedia Flash 8 authoring environment.
      
      An instance of this class can be accessed on dojox.flash.info after
      the page is finished loading.
    • type
      Function
  • dojox.flash.Info.version

    • type
      String
    • summary
      The full version string, such as "8r22".
  • dojox.flash.Info.versionMajor

    • type
      Number
  • dojox.flash.Info.versionMinor

    • type
      Number
  • dojox.flash.Info.versionRevision

    • type
      Number
  • dojox.flash.Info.capable

    • type
      Boolean
    • summary
      Whether this platform has Flash already installed.
  • dojox.flash.Info.installing

    • type
      Boolean
    • summary
      Set if we are in the middle of a Flash installation session.
  • dojox.flash.Info.isVersionOrAbove

    • parameters:
      • reqMajorVer: (typeof int)
      • reqMinorVer: (typeof int)
      • reqVer: (typeof int)
    • summary
      Asserts that this environment has the given major, minor, and revision
      numbers for the Flash player.
    • description
      Asserts that this environment has the given major, minor, and revision
      numbers for the Flash player.
      
      Example- To test for Flash Player 7r14:
      
      dojox.flash.info.isVersionOrAbove(7, 0, 14)
    • return_summary
      Returns true if the player is equal
      or above the given version, false otherwise.
    • type
      Function
  • dojox.flash.Info._detectVersion

    • type
      Function
  • dojox.flash.Info._detectVersion.capable

    • type
      Object
  • dojox.flash.Info._detectVersion.versionMajor

  • dojox.flash.Info._detectVersion.versionMinor

  • dojox.flash.Info._detectVersion.versionRevision

  • dojox.flash.Info._detectVersion.version

    • type
      Object
  • dojox.flash.Info._JSFlashInfo

    • parameters:
      • testVersion
    • type
      Function
  • dojox.flash.Embed

    • parameters:
      • visible
    • summary
      A class that is used to write out the Flash object into the page.
    • description
      Writes out the necessary tags to embed a Flash file into the page. Note that
      these tags are written out as the page is loaded using document.write, so
      you must call this class before the page has finished loading.
    • type
      Function
  • dojox.flash.Embed._visible

    • type
      Object
  • dojox.flash.Embed.width

    • type
      int
    • summary
      The width of this Flash applet. The default is the minimal width
      necessary to show the Flash settings dialog. Current value is
      215 pixels.
  • dojox.flash.Embed.height

    • type
      int
    • summary
      The height of this Flash applet. The default is the minimal height
      necessary to show the Flash settings dialog. Current value is
      138 pixels.
  • dojox.flash.Embed.id

    • type
      String
    • summary
      The id of the Flash object. Current value is 'flashObject'.
  • dojox.flash.Embed.protocol

    • type
      Function
  • dojox.flash.Embed.write

    • parameters:
      • doExpressInstall: (typeof Boolean)
        Whether to write out Express Install
        information. Optional value; defaults to false.
    • summary
      Writes the Flash into the page.
    • description
      This must be called before the page
      is finished loading.
    • type
      Function
  • dojox.flash.Embed.get

    • summary
      Gets the Flash object DOM node.
    • type
      Function
  • dojox.flash.Embed.setVisible

    • parameters:
      • visible: (typeof Boolean)
    • summary
      Sets the visibility of this Flash object.
    • type
      Function
  • dojox.flash.Embed.center

    • summary
      Centers the flash applet on the page.
    • type
      Function
  • dojox.flash.Embed.center.width

  • dojox.flash.Embed.center.height

  • dojox.flash.Communicator

    • summary
      A class that is used to communicate between Flash and JavaScript.
    • description
      This class helps mediate Flash and JavaScript communication. Internally
      it uses Flash 8's ExternalInterface API, but adds functionality to fix
      various encoding bugs that ExternalInterface has.
    • type
      Function
  • dojox.flash.Communicator._addExternalInterfaceCallback

    • parameters:
      • methodName
    • type
      Function
  • dojox.flash.Communicator._encodeData

    • parameters:
      • data
    • type
      Function
  • dojox.flash.Communicator._decodeData

    • parameters:
      • data
    • type
      Function
  • dojox.flash.Communicator._execFlash

    • parameters:
      • methodName
      • methodArgs
    • type
      Function
  • dojox.flash.Install

    • summary
      Helps install Flash plugin if needed.
    • description
      Figures out the best way to automatically install the Flash plugin
      for this browser and platform. Also determines if installation or
      revving of the current plugin is needed on this platform.
    • type
      Function
  • dojox.flash.Install.needed

    • summary
      Determines if installation or revving of the current plugin is
      needed.
    • type
      Function
  • dojox.flash.Install.install

    • summary
      Performs installation or revving of the Flash plugin.
    • type
      Function
  • dojox.flash.Install._onInstallStatus

    • parameters:
      • msg
    • type
      Function
  • dojox.flash.info

    • type
      Object
  • dojox.flash._base

    • type
      Object
  • dojox

    • type
      Object