理智地、负责任地、透明地推广Firefox
您可能也对这些感兴趣
切换

其实JSFL也不是很难。连我这种编程不怎么样的人都能轻松制作插件了……呵呵。

顺便介绍一下Dengjie's关于MXP的文章,非常好Macromedia 插件与插件管理器 , 来自蓝色理想

封装时候要通过MXI,这里,再一次看到XML格式的魅力。发现XML真的能办很多事情。
PS:个人觉得file标签里面的destination 最好用相对路径,有时候莫名其秒的不识别非file:///协议
下面给出官方的PDF打包下载,详细描述了每一个标记的内容。
下载 Adobe-Macromedia-MXI格式标准

PS,特别感谢南京大学的大牛Xfy的关于XMLUI的文章。

目前存在一个极为BT的bug:只能在_root时间轴下面使用这个命令。一旦在symbol中,就会不正常,头痛ing……没有任何错误啊!
欢迎各位一同讨论这个问题……

从trace边界,到选择,到conver,都没有任何错误:(
[down=attachments/month_0504/63u9_superBreak.rar]点击下载MXP文件[/down]
源文件如下:
JSFL文件

引用自
////////////////////////////////////////
// Initialization the Variables //

// superBreak by awflasher.com v0.1 //
////////////////////////////////////////
//-----------------------------------------------------
/* Useage:
1 - Select your vector graphics
2 - change the JSFL parameters - eg, "_run(10,4)"
that stands for the break-apart-method is 10(subSymbols)X4(subSymbols)
2 - Run the JSFL file(From commands menu
3 - wait and get your breaked parts
--->let's go ^__^
*/
// (clear the "//" to run this JSFL .
//_run (3, 5)
//-----------------------------------------------------
//-------------Functions-------------------------------
var _doc = fl.getDocumentDOM ()
var getRect = _doc.getSelectionRect ();
var xui = _doc.xmlPanel (fl.configURI + "Commands/superBreak.xml");
if (xui)
{
  xp = xui.xp;
  yp = xui.yp;
  seedName = xui.seedName
  _run (xp, yp);
}
///////////////////////////////////////
// END of Init //
///////////////////////////////////////
////**********Functions**********/////
function pickUpTheSelectedRect (xp, yp)
{
  ///////////////////////////
  // Get the initSelection //
  ///////////////////////////
  _left = getRect.left
  _top = getRect.top
  _right = getRect.right
  _bottom = getRect.bottom;
  __width = _right - _left;
  __height = _bottom - _top;
  __ws = __width / xp;
  __hs = __height / yp;
} //End of pickUpTheSelectedRect
function _run (xp, yp)
{
  pickUpTheSelectedRect (xp, yp);
  for (i = 0; i < xp; i ++)
  {
    for (j = 0; j < yp; j ++)
    {
      fl.trace("ws="+__ws);
      fl.trace("hs="+__hs);
      _l=_left + i * __ws;
      _t=_top + j * __hs;
      _r=_left + (i + 1) * __ws;
      _b=_top + (j + 1) * __hs;
      fl.trace("_l"+_l)
      fl.trace("_t"+_t)
      fl.trace("_r"+_r)
      fl.trace("_b"+_b)
      _doc.setSelectionRect({left:_l, top:_t, right:_r, bottom:_b});
   if (_doc.getSelectionRect () != 0)
     {
        _doc.convertToSymbol ("graphic", seedName + i + "_" + j, "top left");
     }
    }
  }
}[/quote]相关的XML文件:

引用自
<dialog id = "inputName" title = "inputName" buttons = "accept,cancel">
<vbox>
<hbox>
<vbox>
     <hbox>
<label value = "the seed:" control = "seedName" />
<textbox id = "seedName" maxlength = "16" multiline = "false" value = "theSeedOfYourMCs" />
</hbox>
     <hbox>
<label value = "the X-coor-parts:" control = "xp" />
<textbox id = "xp" maxlength = "16" multiline = "false" value = "1" />
</hbox>
      <hbox>
<label value = "the Y-coor-parts:" control = "yp" />
<textbox id = "yp" maxlength = "16" multiline = "false" value = "1" />
</hbox>
</vbox>
</hbox>
</vbox>
</dialog>

usage:

1 ->
Choose your want-to-break graphic (not a symbol ,but a ungroupped graphic)

2 ->
FlashMX2k4->Commands->"=aw=superBreak"

3 ->
Input a seed for the duplicated-parts' prefix.
Input the pieces you want to break the graphic into.

4 ->
Just wating^__^ ....

Anyquestion , contact : awflasher@126.com
or visit:
http://www.awflasher.com

: http://www.awflasher.com/blog/archives/215

哇!跟我一样,您也是一名Firefox用户,这些话题您可能感兴趣:

RSS feed | Trackback URI

才 4 条评论 ( 展开所有评论 | 收起所有评论 ) 立刻发表评论 »

Danger
2005-04-28 10:34:16

不错,加油.

露露
2005-04-29 13:42:36

五一节快乐!
很久没来看你了喔。
呵呵!

aw
2005-04-29 14:56:55

五·一要拼命了!

露露
2005-04-29 17:02:42

[biggrin]
不是吧?我五一去阳朔徒步漓江呢。
呵呵!