首先是推荐老弟的新作:Angel Fall (Original Mix)。本Blog的周二进站音乐便是这首。不错的
明天就要真正意义上结束这个暑假开学了,其实对我来说只是休息了1周又重新上课...CS本学期在8.5号就开学了...回想一周前还是满脑子飞的EZ-UML、答辩、头脑秀逗得老师、GeneralLinkableXXXXX(为了保护小组各成员不至于再度发疯,部分字符已用XXX表示),这学期真的算不了什么。
下面是我最想说的
Flash Website v2
项目开工:2005.7.10
起因:我对我自己Flash网站v1的强烈不满
过程:想出了个ReformCore概念,设计了新的logo,弄来了嵌入式编译器
目的:制作更漂亮、更人性化、更加符合我审美的新Flash网站(后期加上的目标:符合web2.1)
结果:由于当时暑假考驾照,网站把ReformUI的雏形完毕即告流产
复工:2006.1.x
原因:放寒假了,没事可做
过程:完善ReformUI
结果:由于每天要赶早去徐汇上GRE,同时PRP项目在身,项目搁浅
复工x2:2006.7
原因:实在看不下这个难产的项目了+原先的设计不符合当前审美
过程:重新设计界面+开始写主要构架
结果:主要构架完成,但明天要开学了...
项目截至今天已经超过一年的建设时间了...天哪~
为了逼自己去完成这个项目,现把一些内部代码资料公布...
我不做解释,大家看情况理解吧~
mainsite.obj_main.AddBlock("test");
CreateWindow("GraphWin",40,50,true,Script_win);
GraphWin.SetClientSize(300,300);
GraphWin.SetWindowText("DoModal测试");
CreateUIHost(this,"obj",33);
obj.SetHostSize(1440,1000);
obj.StretchPic(false);
obj.CompleteLook(false);
obj.ShowBorder(false);
obj.LoadObject("http://www.csksoft.net/data/dawnofReform.jpg");
CreateWindow("OldSiteWin");
OldSiteWin.SetWindowText("以前的Flash网站-CSKSOFT WEBSITE v1 All right reserved");
OldSiteWin.SetWindowSize(753,580);
OldSiteWin.Attach("/fla/main.swf",true);
CreateWindow("win2");
win2.SetWindowText("PicWindow");
win2.SetWindowSize(500,350);
win2.Attach("http://www.csksoft.net/data/dawnofReform.jpg",true);
win2.container.objhost.SetLinkURL("http://www.csksoft.net/data/dawnofReform.jpg");
CreateWindow("rwin");
rwin.SetWindowText("外部组件调用");
rwin.SetClientSize(250,150);
rwin.Attach("fla/load_test.swf",true);
CreateUIHost(this,"obj",33);
obj.SetHostSize(250,150);
obj.LoadObject("fla/load_tedst.swf");
i=100;
t = setInterval(script, 10,
"if (i<=0) {clearInterval(t); t = undefined;}msgout(i);i--;",
this);
dwColor = 0x1a67f4;
CreateWindow("GraphWin",50,50);
GraphWin.SetClientSize(50,50);
GraphWin.container.beginFill(dwColor,0xFF);
GraphWin.container.moveTo(10, 10);
GraphWin.container.lineTo(10, 40);
GraphWin.container.lineTo(40, 40);
GraphWin.container.lineTo(40, 10);
GraphWin.container.lineTo(10, 10);
GraphWin.container.endFill();
CreateWindow("GraphWin",40,50);
GraphWin.SetClientSize(300,300);
GraphWin.SetWindowText("绘图窗口");
GraphWin.container.createEmptyMovieClip("graph",2);
with (GraphWin.container.graph) {
lineStyle (0, 0xFF0000, 100);
for (x = -5; x<5; x+=0.2) {
y= Math.sin(x)*30;
if (x==-5)
{
moveTo(x*30+150,150-y);
}
else
{
lineTo (x*30+150,150-y);
}
}
}
t = setInterval(script, 500,
"today_date = new Date();msgcls();msgout(today_date.toString());",
this);
CreateTween(Script_win,"_x","elastic.easein",10,400,50,100);
var sXML;
sXML=XML_CreateRPCRequest("GetBlogConfig",Array("bIsMiniMode","strToken"),Array("false",GLOBAL_strTokenID));
sXML.send("/sitecmd.asp","_blank");
var myObj;
myObj = new Object();
myObj.item1 = "aaa";
myObj.attributes=new Object();
myObj.attributes.id=3;
myObj.value = "ddd";
myObj.node = new Object();
myObj.node.value="ccc";
var myxml;
myxml = new XML("");
ConstructXmlSubTree(myxml,"ss",myObj,myxml);
msgout(myxml);
//XWindow //ReformUI.XWindow
SetWindowSize(nWidth:Number, nHeight:Number);
SetClientSize(nWidth:Number, nHeight:Number);
SetWindowText(sTitle:String);
GetWindowText():String;
SetWindowFocus();
GetListID():Number;
Attach(strObjID:String, bIsFromURL:Boolean):Boolean;
OnClose(); //CallBack
Destroy():Boolean; //return false if refused by OnClose();
ExpendWindow(bExpend:Boolean);
GetWindowState(nStateID:Number);
//nStateID=1 :IsTransAble
//nStateID=0 :IsExpend
AlphaBlendWindow(bAlpha:Boolean);
//---------------------------------------------------members
TitleBar //ReformUI.XWindow.TilteBar
container //ReformUI.XWindow.Container
var bIsObjFromURL:Boolean;
var bIsContained:Boolean;
generalObj,objhost
SetObj(strObjID:String,bIsFromURL:Boolean):Boolean
DestroyAll();
BottomBarA //ReformUI.XWindow.BottomBar
var nWindowID:Number;
var strHostID:String;
var nWindowHeight:Number;
var nWindowWidth:Number;
var bIsWindowExpend:Boolean;
var fInterval;
//----------------------------------------------------ReleatedAPI
GetTopLevelWindowID():Number;
GetWindowTopLevel():Number;
CloseAllWindow();
CreateWindow(strWindowID:String, nX:Number, nY:Number , bIsDoModal:Boolean , objParent);
XWindowList:Array;
var nXWinBoundWidth:Number,nXWinBoundHeight:Number;
GetXWinBoundBox():Array;
SetXWinBoundBox(nWidth:Number,nHeight:Number);
//UIHost //RefromUI.UIhost
LoadObject(sURL:String,bIsRes:Boolean);
IsObjLoaded():Boolean;
LoadPrecent():Number;
GetObjSize():Number;
StretchPic(bIsStretch:Boolean);
GetObjVersion():Number;
CustomFunction(FuncName:String, Arg1, Arg2); //var CustomResult
SetHostSize(nWidth:Number, nHeight:Number);
SetHostIDTitle(strTitle:String);
SetLinkURL(sURL:String);
ShowBorder(bIsShow:Boolean);
ShowDataInfo(bIsShow:Boolean);
CompleteLook(bIsShow:Boolean);
EnableClick(bEnable:Boolean);
Destroy();
//Events
OnClick(); return false when cancel
OnLoadComplete();
//---------------------------------------------------members
var HostWidth:Number, HostHeight:Number;
var IsContendObj:Boolean;
var ObjURL:String;
var HostIDName:String;
var ObjVersion:Number;
var LinkURL:String;
var IsShowBorder:Boolean;
var bIsSretchPic:Boolean;
var CustomArg1, CustomArg2, CustomResult;
objcontainer
//----------------------------------------------------ReleatedAPI
CreateUIHost(strParentID:String, strHostID:String, nLevel:Number, nX:Number, nY:Number)
//TxtHolder //ReformUI.TxtHolder
SetSize(nWidth:Number, nHeight:Number);
GetSize():Array;
EnableScrollBar(bEnabled:Boolean);
EnableEditable(bEnabled:Boolean);
UpdateLayout();
EnableWordWrap(bEnabled:Boolean);
/////////////////////////////////
//Not complete yet!
LoadTxt(strURL:String, bIsHtml:Boolean, nPostMethod:Number);
//////////////////////////////////
SetText(strT:String, bIsHtml:Boolean);
GetText(bNeedSrc:Boolean):String;
UpdateScrollBar();
ClearText();
Destroy();
//---------------------------------------------------members
var nSelfHeight:Number, nSelfWidth:Number;
var bIsEnableScrollBar:Boolean;
var bIsEnableWordwrap:Boolean;
hbar,scrollbar;
//----------------------------------------------------ReleatedAPI
CreateTxtHolder(strParentID:String, strHolderID:String, nLevel:Number, nX:Number, nY:Number);
//ScrollBar //ReformUI.ScrollBar
UpdateBar();
SetStepLength(nStep:Number);
GetStepLength():Number;
SetBarLength(nHeight:Number); //def=100;
GetBarLength():Number;
SetRange(nMaxPos:Number); //startup with 100
GetRange():Number;
OnPosChange(nPos); //CallBack,return false for undo
SetPos(nPos:Number);
GetPos():Number;
Destroy();
//---------------------------------------------------members
var nCurrentPos:Number;
var nStepLength:Number;
var nMax:Number;
var nSelfHeight:Number, nDragLength:Number;
var fInterval;
var bIsStartDrag:Boolean;
//----------------------------------------------------ReleatedAPI
CreateScrollBar(strParentID:String, strBarID:String, nLevel:Number, nX:Number, nY:Number);
//progressBar //ReformUI.progressBar
SetPos(Pos:Number);
GetPos():Number;
Destroy();
//---------------------------------------------------members
var nPos:Number = 0;
//----------------------------------------------------ReleatedAPI
CreateProgressBar(strParentID:String, strBarID:String, nLevel:Number, nX:Number, nY:Number);
//LoadUI.MainLogo //reformUI.LoadUI.MainLogo
OnCancel=function() //CallBack
OnRetry=function() //CallBack
SetLoadCnt(ObjCnt);
SetTitle(StrTxt:String);
ShowCancelBtn(bShow:Boolean);
SetFailedFlag(bShow:Boolean);
Destroy();
//-----------------------------------------------------ReleatedAPI
CreateLoadUI(strParentID:String, strLogoID:String, nLevel:Number, nX:Number, nY:Number,nType:Number);
//nType:0 for MainLogo
FlatButton //ReformUI.Button
SetLabel(strNewLabel:String):String;
GetLabel():String;
SetBtnSize(nWidth:Number, nHeight:Number);
Destroy();
EnableBtn(bEnable:Boolean):Boolean;
SetLabelColor(newColor:Color);
//Event
OnRollOver;OnRollOut;OnMouseDown;OnMouseUp;OnClick
//-----------------------------------------------------ReleatedAPI
CreateButton(strParentID:String, strBtnID:String, nLevel:Number, nX:Number, nY:Number);
dragbar //ReformUI.dragbar
SetWidth(nWidth:Number):Number;
UpdateUI();
SetPos(Pos:Number):Number;
GetPos():Number;
SetRange(nMin:Number,nMax:Number):Boolean;
GetMin():Number;
GetMax():Number;
//----var
Width:Number;
nPos,nMin,nMax:Number;
//----events
UpdateUI,onChange,onDrag(x,total) //use addListener
//-----------------------------------------------------ReleatedAPI
CreateDragBar(strParentID:String, strID:String, nLevel:Number, nX:Number, nY:Number);
/*
url tip define:
SubView=3&subdir...&UUID=
*/
//SiteObjs
obj:mainsite
addProxyAlignObj(objRef:Object, strAlignType:String):Boolean //strAlignType "l","r","m"
RemoveProxyAlignObj(objRef:Object):Boolean
SetWidth(nWidth:Number):Number
ParseUrlCmd(strCmd:String):Boolean
events:
broadcast:OnWidthChg(x:int);
obj:mainsite.obj_main
SetBlockWidth(size:Number):Boolean
GetBlockSize(strName:String, nID:Number):MovieClip
RemoveBlockByID(nID:Number):Boolean
RemoveBlock(objBlock:Object):Boolean
OnItemSizeChg(objBlock:Object)
GetBlockID(objBlock:Object):Number
Display(strCmd:String):Boolean //cmd:show;hide;distroy
events:
broadcast:OnHolderSizeChg(size:int);
//End of SiteObjs
var GLOBAL_nDownloadingSpeed:Number; //kb per sec
var GLOBAL_strMainSwfURL:String;
var GLOBAL_strTokenID:String;
//BAISC
parseBoolean(string:String) :Boolean
//API
//Site Config Var:
var strSiteInfo_Title:String, strSiteInfo_Version:String, strSiteInfo_LastUpdate:Date;
var bSiteConfig_UI_EnableShadow:Boolean;
var nSiteConfig_ScriptWinX:Number, nSiteConfig_ScriptWinY:Number, strSiteConfig_ScriptWinCnt:String,bSiteConfig_ScriptWinShow:Boolean;
var bSiteConfig_SndEnabled:Boolean, strSiteConfig_SndSrc:String;
var strSiteConfig_ExecScript:String;
var nSiteCnt_DefView:Number;
var nSiteCnt_ViewNum:Number;
var lstSiteView_ImgURL:Array;
var lstSiteView_ConfigURL:Array;
var lstSiteView_IsExpend:Array;
var lstSiteView_Title:Array;
var lstSiteView_TitleEn:Array;
var lstSiteView_Description:Array;
var lstSiteLink_LnkIcon:Array;
var lstSiteLink_LnkDest:Array;
var lstSiteLink_LnkType:Array;
var lstSiteLink_LnkTitle:Array;
//
_split(str);
GetRandomToken:String
CreateTween(objDestObj:Object,strEffectProperty:String,strTweenType:String,StartVal,EndVal,nDuration:Number,nFPS:Number);
GetMajorFlaVer();
GetQueryString(strURL:String,strStringName:String):String;
GetSiteInfo(strInfoType:String);
//SiteWidth;SiteHeight;SiteTitle;SiteVersion;DefSrciptTxt;LastUpdate;UI_EnableShadow
//ScriptWinIniPosX;ScriptWinIniPosY;ShowScriptWinAuto;Snd_EnableAuto;Snd_SrcURL;
//AutoExecScript;DefViewID;SiteViewTotal;lstViewIconURL;lstViewConfigURL;lstViewExpend;
//lstViewTitle;lstViewTitleEn;lstViewDescription;lstSiteLnkIcon;lstSiteLnkDest;lstSiteLnkType
//lstSiteLnkTitle
ReadSiteConfig(ConfigXML:XML);
CreateXMLPost(PostType:String);
VerifyCmdResponse(SrcXml:XML);
XML_CreateDataRequest(strDataName:String, lstInfoArg:String):XML
SolveRPCResponseXML(xmlRawDest:XML):Object
SolveRPCResponse(xmlRawDest:XML):Object
XML_CreateRPCRequest2(strRPCName:String, objArgList:Object):XML
XML_CreateRPCRequest(strRPCName:String, lstArgNameLst:Array, lstArgValLst:Array):XML
CreateXMLPost2(PostType:String):XML
CreateScriptWindow();
msgout(strMsg:String);
msgcls();
ShowScriptWindow(bShow:Boolean);
SetScriptTxt(strScriptTxt:String);
XOR_Encode(strSrc:String,strPWD:String):String;
IsScriptWindowVisible();
CallRPC(strRPCName:String, objArg:Object, funcOnResponse:Function):Boolean;
UpdateBrowseState(strBrowStr:String);
objBrowseState.strAction
objBrowseState.addListener
@Event.OnBrowCmd
//Component
ScriptWindow_core //mov_main.ScriptWindow.Cont
-------------------------------
SetScriptBuf(strNewVal:String)
ClsTxt(nClsType:Number)
// -2 clear current
// -1 clear all
//0 \ 1
PostPrint(strPrintStr:String);
SetEditorVal(strNewVal:String);
GetEditorVal():String;
GetBufVal(nBufType:Number):String;
SetPostBuf(strNewVal:String);
UpdateBuf(nBufType:Number, bSetBuf:Boolean);
Execute(strScriptStr:String);
SetView(nState:Number);
以上只是一些函数的原形定义,我不是要开源的,不过只要你足够敏锐,这些信息就够你做很多有趣的事了~
请不要用于非法用途和任何我不愿看到的行为