ARLoadFlash

From Blue Mars Developer Guidebook

Jump to: navigation, search
There are security restrictions on this article

This is an Avatar Reality Utilities function.

Function

ARLoadFlash(movie, options)
options - table setup parameters for the Flash movie

Examples

From the Molecule Viewer example:

 ARLoadFlash(self.Properties.button,
            {  visible=true,
               dock=eFD_Pos,
               pos={x=0.2,y=0.2},
               handleEvents=true,
               fscommand=self.id});

Code

The function goes through the options table and calls the function appropriate for each parameter.

function ARLoadFlash(file, options)
   local name = file;
   if (options.name) then 
      name = options.name;
   end
   HUD.LoadFlash(file,name);
   if (options.dock) then
      HUD.DockFlash(name,options.dock);
   end
   if (options.pos) then
      HUD.SetFlashPos(name,options.pos.x,options.pos.y);
   end
   if (options.scale) then
      HUD.SetFlashScale(name,options.scale.x,options.scale.y);
   end
   if (options.handleEvents) then
      HUD.HandleFlashEvents(name);
   end
   if (options.visible) then
      HUD.ShowFlash(name);
   end
   if (options.modal) then
      HUD.Modal(name);
   end
   if (options.handleEvents) then
      HUD.HandleFlashEvents(name);
   end
   if (options.maskEvents) then
      HUD.MaskFlashEvents(name,options.maskEvents);
   end
   if (options.handleKeys) then
      HUD.HandleKeyEvents(name);
   end
   if (options.alpha) then
      HUD.SetFlashAlpha(name,options.alpha);
   end
   if (options.fscommand) then
      HUD.AddFSCommandListener(name,options.fscommand);
   end
end
Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools