2009/08/05
AS3 讀取 GET 參數
URL = http://localhost/?member_num=xxx
AS3 寫法:
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
var member_num = String(paramObj["member_num"]);
2009/08/04
如何安排 flash 與 div 的上下層次關係
I’m currently working on a site with the wonderful Hong Vo from Namaste Interactive that has an embedded flash video object on the home page. This site also has a horizontal drop-down menu. All was great until one of the drop down lists became long enough to overlap the flash video. Apparently, when embedding a flash video into an html page the embed code automatically puts the flash video on top of everything else. I could not for the life of me get the menu to lay behind the video no matter what I tried.
It was one of those “little problems” that was eating away my entire morning and most of my patience! ;o) In sadness, I discovered several forum discussions in which, apparently, it was agreed that there was simply nothing to be done.
Thankfully, I was stubborn and continued to dig further (I don’t give up easily!) and found this discussion, which contained a simple solution, which I will summarize for you:
- Wrap your flash content in a div
- Add to your object tag
- Set wmode=”transparent” in the embed tag
- Use css to set the position and z-index for your div (don’t set negative z-index values as it will make your flash disappear)
The CSS
#flash {
position: relative; /*or absolute*/
z-index: 0;
}
The XHTML
<div id="flash">
<object … >
<param name="wmode" value="transparent">
<embed … wmode="transparent">
</object>
</div>
AS3 接收 URL 參數
很簡單,只有2段關鍵 code
html 部分
<object classid="clsid: xxxx.......
<param name=xxxx....
<embed src="http://mySite/mySwf.swf?a=1&b=2" .......>
</object>
as3 部分
if(root.loaderInfo.parameters.a == '1'){
gotoAndStop(1);
}
Web 技術中的 Session 是什麼?
轉載原文: Web 技術中的 Session 是什麼? 本文目標 在 Web 的世界裡,Session 已經是被廣泛使用的一種技術,大多數的 Web 開發者,肯定都能運用自如。在現今的各類 Web 應用程式的開發框架和工具中,Session 也已經被包裝成容易使用的模...