首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Flash >

关于FlashPaper传值解决思路

2012-03-18 
关于FlashPaper传值想问一下读取文件的路径在哪里设置?function loadFlashPaper(path_s, dest_mc, width_i

关于FlashPaper传值

想问一下读取文件的路径在哪里设置?


function loadFlashPaper(path_s, dest_mc, width_i, height_i, loaded_o)
{
  var _loc1 = _root;
  var intervalID = 0;
  var loadFunc = function ()
  {
  var _loc1 = _root;
  dest_mc._visible = false;
  var _loc2 = dest_mc.getIFlashPaper();
  if (!_loc2)
  {
  return;
   
  return;
  } // end if
  if (_loc2.setSize(width_i, height_i) == false)
  {
  return;
   
  return;
  } // end if
  clearInterval(intervalID);
  var _loc3 = _loc2.getNumberOfPages();
  var pages_l = _loc2.getLoadedPages();
  ctrlHolder_mc.swapDepths(_loc1.logo_mc);
  ctrlHolder_mc.swapDepths(_loc1.control_mc);
  ctrlHolder_mc2.swapDepths(_loc1.top_mc);
  ctrlHolder_mc3.swapDepths(_loc1.loading);
  ctrlHolder_mc4.swapDepths(_loc1.log_mc);
  ctrlHolder_mc3.swapDepths(_loc1.bg_mc);
  if (_loc3 == pages_l)
  {
  dest_mc._visible = true;
  } // end if
  _loc1.loading_mc._visible = false;
  _loc1.control_mc._visible = true;
  _loc1.in_mc._visible = true;
  loaded_o.onLoaded(_loc2);
  };
  intervalID = setInterval(loadFunc, 10);
  dest_mc.loadMovie(path_s);
} // End of the function
function onLoaded(fp)
{
  var _loc1 = fp;
  _loc1.showUIElement("PrevNext", false);
  _loc1.showUIElement("Print", false);
  _loc1.showUIElement("Find", false);
  _loc1.showUIElement("Tool", false);
  _loc1.showUIElement("Pop", false);
  _loc1.showUIElement("Zoom", false);
  _loc1.showUIElement("Page", false);
  _loc1.showUIElement("Overflow", false);
  _loc1.enableScrolling(true);
  _loc1.m_mainMC.document_mc.y_sb._alpha = 80;
  _loc1.m_mainMC.document_mc.y_sb.prototype._color = blue;
  _loc1.m_mainMC.document_mc.x_sb._alpha = 80;
  _loc1.m_mainMC.document_mc.bg_mc.beginFill = red;
  _loc1.m_mainMC.document_mc.bg_mc._alpha = 0;
  _loc1.m_mainMC.document_mc.beginFill(blue, 100);
  _loc1.m_mainMC.document_mc.toolbar_mc._alpha = 0;
} // End of the function
stop ();

[解决办法]
loadFlashPaper(path_s, dest_mc, width_i, height_i, loaded_o)

path_s FlashPaper文件路径
dest_mc 加载FlashPaper文件的MovieClip
width_i,height_i FlashPaper文件加载后的初始宽度和高度
loaded_o 侦听对象

热点排行