東坡下載:內(nèi)容最豐富最安全的下載站!

幫助|文件類型庫|最新更新|下載分類|排行榜

編程相關破解相關編程工具反編譯安裝制作程序源碼軟件補丁數(shù)據(jù)庫Visual Studiovc++visualbasicdreamweaver

首頁編程開發(fā)程序源碼 → Java的Flash類庫(JSwiff) 8.0 官網(wǎng)最新版

Java的Flash類庫(JSwiff)

Java的Flash類庫(JSwiff)8.0 官網(wǎng)最新版

  • 大。2.4M
  • 語言:中文
  • 平臺:WinAll
  • 更新:2015-05-27 17:17
  • 等級:
  • 類型:程序源碼
  • 網(wǎng)站:http://m.californiadebtcollectionlawyers.com
  • 授權(quán):免費軟件
  • 廠商:
  • 產(chǎn)地:國產(chǎn)軟件
好用好玩 50%(0)
坑爹 坑爹 50%(0)
軟件介紹軟件截圖相關軟件軟件教程網(wǎng)友評論下載地址

JSwiff 是一款開源的,基于Java的操作Macromedia Flash file 的框架,可以創(chuàng)建,和操作Flash文件。JSwiff 還提供了JSwiff Investigator,可以直接分析現(xiàn)有的SWF文件的結(jié)構(gòu),得到Tag層次的信息..

其他不多說,喜歡的人自己可以到該網(wǎng)站去了解,下面我就拿出一個例子來。呵~~從官方那邊修改過來的,我就不多做解釋了(呵~人家說得很明白啦,雖然有點煩瑣)

Java的Flash類庫(JSwiff)用法

import java.io.FileOutputStream;
import java.io.IOException;
import com.jswiff.SWFWriter;
import com.jswiff.SWFDocument;
import com.jswiff.swfrecords.Rect;
import com.jswiff.swfrecords.RGBA;
import com.jswiff.swfrecords.Matrix;
import com.jswiff.swfrecords.tags.DefineFont2;
import com.jswiff.swfrecords.tags.DefineEditText;
import com.jswiff.swfrecords.tags.PlaceObject2;
import com.jswiff.swfrecords.tags.ShowFrame;
public class CreateSwf 
{
public static void main(String[] args) 
{
  String fileName = "test.swf";
  SWFDocument document = new SWFDocument();
  // first we define a font for the text
  // get a character ID for the font
  int fontId = document.getNewCharacterId();
  // use a standard font (e.g. Arial), we don't want to define shapes for each glyph
  DefineFont2 defineFont2 = new DefineFont2(fontId, "Arial", null, null);
  document.addTag(defineFont2);
  // get a character ID for our text
  int textId = document.getNewCharacterId();
  // dynamic text is a good way to go, we use DefineEditText for this
  // we don't care about bounds and variables
  DefineEditText defineEditText = new DefineEditText(
   textId, new Rect(0, 0, 0, 0), null);
  // we have set the text bounds to a zero rectangle;
  // to see the whole text, we set the autosize flag
  defineEditText.setAutoSize(true);
  // assign the font defined above to the text, set font size to 24 px (in twips!)
  defineEditText.setFont(fontId, 20 * 24);
  // set text color to red
  defineEditText.setTextColor(new RGBA(255, 0, 0, 255));
  // don't let viewers mess around with our text
  defineEditText.setReadOnly(true);
  // finally set the text
  defineEditText.setInitialText("棄天笑(soda) test!");
  document.addTag(defineEditText);
  // place our text at depth 1
  PlaceObject2 placeObject2 = new PlaceObject2(1);
  placeObject2.setCharacterId(textId);
  // place text at position (45; 10) (in twips!)
  placeObject2.setMatrix(new Matrix(20 * 45, 20 * 10));
  document.addTag(placeObject2); // place text
  document.addTag(new ShowFrame()); // show frame
  try 
  {
   writeDocument(document, fileName);
  } 
  catch (IOException e) 
  {
   System.out.println("An error occured while writing " + fileName + ":");
   e.printStackTrace();
  }
}
private static void writeDocument(SWFDocument document, String fileName)
  throws IOException
{
  SWFWriter writer = new SWFWriter(document, new FileOutputStream(fileName));
  writer.write();
}
}


PC官方
安卓官方手機版
IOS官方手機版

Java的Flash類庫(JSwiff)截圖

下載地址

Java的Flash類庫(JSwiff) 8.0 官網(wǎng)最新版

熱門評論
最新評論
發(fā)表評論 查看所有評論(0)
昵稱:
表情: 高興 可 汗 我不要 害羞 好 下下下 送花 屎 親親
字數(shù): 0/500 (您的評論需要經(jīng)過審核才能顯示)

編輯推薦

本類軟件必備

編程UltraEditvc++6.0Notepad++編譯VBILSpyHopper數(shù)據(jù)MySQLoracleaccess設計DreamweaverfireworksFlash

報錯

請簡要描述您遇到的錯誤,我們將盡快予以修正。

轉(zhuǎn)帖到論壇
輪壇轉(zhuǎn)帖HTML方式

輪壇轉(zhuǎn)帖UBB方式