2010年11月30日 星期二

flash checkbox組件 問題

今天碰到一很怪的問題

就是組件放到flash 中單一一個檔看是沒問題的

但是當此swf被包到另一個swf中
就產生奇怪的問題

只好用自己寫的

真怪

2010年11月29日 星期一

神祕的 m e t a 事件 + swfAddress

神祕的m e t a 和 t i t l e 這兩個tag不能顛倒
IE 會看不見. 但是其他各家都可以看. chrome, firefox ,safari , opera...


XXXXXX







vodafone 說來好自由 世界更緊密



XXXXXX






embed font

http://www.zenelements.com/blog/css3-embed-font-face/

2010年11月9日 星期二

Chrome input yellow border




Chrome 的預設 Form yellow border

可以關掉

http://beckelman.net/demos/ChromeActiveField/Default.aspx

swfFit 是真的蠻好用的



雖然之前看過
但一直都沒有去用

當螢幕大小想設定
又不想自己做flash scrollbar 模擬瀏覽器
裡面flash 可能內文區又一個scrollbar

用這就很簡單

最近用了一下真是好用.Nice!

http://swffit.millermedeiros.com/

[ 每次都忘記網址 ] 瀏覽器與螢幕相關資料


http://supportdetails.com/

2010年10月22日 星期五

2010年10月21日 星期四

quickMEDIA 創新與商業模式

quickMEDIA 創新與商業模式

2010年9月12日 星期日

flash 之爛掉的 翻頁

翻頁再賣的軟體.
還有幾個找到再補

http://www.page-flip.com/

Google Goggles - 真方便




http://www.google.com/mobile/goggles/#landmark

AR 教學文章!

AR 文章!



http://www.i-garden.org/blog/2009/10/01/919

CSS 該注意的基本觀念2. 跟上衣篇有些重複


會發生圖片斷層的原因主要是因為圖片大小超過表單的大小,雖然我明明就把表格的高度與圖片的高度設定的一模一樣,但是好樣的 IE 就是會判斷錯誤,造成圖片斷層的問題。這個時候只要在 中加入 CSS:

測試圖片



以下全文轉載於
http://webweb.cz.cc/show_article.php?aId=368


FireFox: div 設置 margin-left, margin-right 為 auto 時已經居中,IE 不行
IE怎麼不行? .div{width:100px;margin:0 auto;}一樣居中

FireFox: body 設置 text-align 時,div 需要設置 margin: auto(主要是 margin-left,margin-right) 方可居中

FireFox: 設置 padding 後,div 會增加 height 和 width,但 IE 不會,故需要用 !important 多設一個 height 和 width
這個是ie對css盒模型解釋有問題造成的,只能遷就它

FireFox: 支持 !important, IE 則忽略, 可用 !important 為 FireFox 特別設置樣式
IE7 一樣兼容 !important 了

div 的垂直居中問題:vertical-align:middle; 將行距增加到和整個DIV一樣高 line-height:200px; 然後插入文字,就垂直居中了。缺點是要控制內容不要換行

cursor: pointer 可以同時在 IE FireFox 中顯示游標手指狀,hand 僅 IE 可以
pointer是標準的寫法,hand是 ie6之前版本自行定義的

FireFox: 鏈接加邊框和背景色,需設置 display: block, 同時設置 float: left 保證不換行。參照 menubar, 給 a 和 menubar 設置高度是為了避免底邊顯示錯位, 若不設 height, 可以在 menubar 中插入一個空格

XHTML+CSS兼容性解決方案小集
使用XHTML+CSS構架好處不少,但也確實 存在一些問題,不論是因為使用不熟練還是思路不清晰,我就先把一些我遇到的問題寫在下面:

1.在mozilla firefox和IE中的BOX模型解釋不一致導致相差2px解決方法:

div{margin:30px!important;margin:28px;} 注意這兩個margin的順序一定不能寫反,據阿捷的說法!important這個屬性IE不能識別,但別的瀏覽器可以識別。所以在IE下其實解釋成這 樣:

div{maring:30px;margin:28px}重複定義的話按照最後一個來執行,所以不可以只寫 margin:XXpx!important;

2.IE5 和IE6的BOX解釋不一致IE5下div{width:300px;margin:0 10px 0 10px;}div的寬度會被解釋為300px-10px(右填充)-10px(左填充)最終div的寬度為280px,而在IE6和其他瀏覽器上寬度則 是以300px+10px(右填充)+10px(左填充)=320px來計算的。這時可以做如下修改

div{width:300px!important;width /**/:340px;margin:0 10px 0 10px}

3.ul 標籤在Mozilla中默認是有padding值的,而在IE中只有margin有值所以先定義

ul{margin:0;padding:0;} 就能解決大部分問題

4.關於腳本,在xhtml1.1中不支持language屬性,只需要把代碼改為

CSS 該注意的基本觀念.

以下全文轉載於
http://blog.xuite.net/stevenking0905/blog/22896279

關於CSS對各個瀏覽器兼容是個非 常讓人頭疼的事情了,網絡上的教程遍地都是,在網路上發現了一篇不錯的東西,就轉載過來和大家共享,可以當作CSS兼容IE6,IE7,FireFox典 範了,值得去記錄下。

註:IE都能識別*;標準瀏覽器(如Firefox,Opera,Netscape)不能識別*;IE6能識別*, 但不能識別 !important,IE7能識別*,也能識別 !important;FF不能識別*,但能識別 !important;

寫 兩句代碼來控制一個屬性,區別Firefox與IE6:

程序代碼 程序代碼
background:orange; *background:blue;


//這一句代碼寫出來時,你用firefox或其它非IE瀏覽時,會發現,寫了該代碼的區域背景是橙色的,如果用IE瀏覽,卻是藍色的,這 是因為IE都能識別*;標準瀏覽器(如Firefox,Opera,Netscape)不能識別*;

寫兩句代碼來控制一個屬性,區別 IE7與IE6:

程序代碼 程序代碼
background:green !important; background:blue;



//這一句代碼寫出來時,你用IE7瀏覽,會發現,寫了該代碼的區域背景是綠色的,如果用IE6瀏覽,卻是藍色的,這是因為IE7 能識別!important*,一但識別了,就執行,忽略了後面的那一句,但IE6卻不能識別!important,所以前面部分跳過,直接執行了後半部 份。

寫兩句代碼來控制一個屬性,區別Firefox與IE:

程序代碼 程序代碼
background:orange; *background:green;



//這一句代碼寫出來時,你用Firefox瀏覽,會發現背景是橙色的,而IE裡卻是綠色的,很簡單,因為Firefox不能識 別*,而IE6,IE7都可以識*

寫三句代碼來控制一個屬性,區別Firefox,IE7,IE6:

程序代碼 程序代碼
background:orange; *background:green !important; *background:blue;



//這一句會使在Firefox在,背景呈橙色,IE7中為綠色,IE6中為藍色,道理和前面一樣,Firefox不能識別*,所 以後面兩句都不執行,直接執行第一句,IE7當然也能執行第一行代碼,但是因為第二句,他也能識別,所以就執行了第二句代碼,把前面的效果給過濾了,而最 後一句,IE7是不能識別的。IE6不能識別!imprtant,本來運行了第一句代碼了,第二句不能識別,那就理所當然的執行了最後一句。

注 意事項:

1、float的div一定要閉合。

例如:(其中 floatA、floatB的屬性已經設置為float:left;)

程序代碼 程序代碼
< #div id="floatA" >
< #div id="floatB" >
< #div id="NOTfloatC" >


這裡的NOTfloatC並不希望繼續平移,而是希望往下排。
這段代碼在IE中毫無問題,問題出在FF。原因是NOTfloatC 並非float標籤,必須將float標籤閉合。

程序代碼 程序代碼
< #div class="floatB">
< #div class="NOTfloatC">


之間加上

程序代碼 程序代碼
< #div class="clear">


這個div一定要注意聲明位置,一定要放在最恰當的地方,而且必須與兩個具有float屬性的div同級,之間不能存在嵌套關係,否則會產 生異常。
並且將clear這種樣式定義為為如下即可:

程序代碼 程序代碼
.clear{clear:both;}


此外,為了讓高度能自動適應,要在wrapper裡面加上overflow:hidden;

當包含float的box的時 候,高度自動適應在IE下無效,這時候應該觸發IE的layout私有屬性(萬惡的 IE啊!)用zoom:1;可以做到,這樣就達到了兼容。
例如某一個 wrapper如下定義:

程序代碼 程序代碼
.colwrapper{overflow:hidden;zoom:1;margin:5px auto;}



2、margin加倍的問題。

設置為float的div在ie下設置的 margin會加倍。這是一個ie6都存在的bug。
解決方案是在這個div裡面加上display:inline;
例如:

程序代碼 程序代碼
< #div id="imfloat">


相應的css為

程序代碼 程序代碼
#IamFloat{
float:left;
margin:5px;/*IE下理 解為10px*/
display:inline;/*IE下再理解為5px*/}



3、關於容器的包涵關係

很多時候,尤其是容器內有平行佈局,例如兩、三個 float的div時,寬度很容易出現問題。在IE中,外層的寬度會被內層更寬的div擠破。一定要用Photoshop或者Firework量取像素級 的精度。

程序代碼 程序代碼
4、關於高度的問題



如果是動態地添加內容,高度最好不要定義。瀏覽器可以自動伸縮,然而如果是靜態的內容,高度最好定好。(似乎有時候不會自動往下撐 開,不知道具體怎麼回事)

5、最狠的手段 - !important;

如果實在沒有 辦法解決一些細節問題,可以用這個方法,FF對於「!important」會自動優先解析,然而IE則會忽略,如下
.tabd1{

程序代碼 程序代碼
background:url(/res/images/up/tab1.gif) no-repeat 0px 0px !important; /*Style for FF*/
background:url(/res/images/up/tab1.gif) no-repeat 1px 0px; /* Style for IE */}


值得注意的是,一定要將xxxx !important 這句放置在另一句之上,上面已經提過

常見兼容 問題:

1. DOCTYPE 影響 CSS 處理

2. FF: div 設置 margin-left, margin-right 為 auto 時已經居中, IE 不行

3. FF: body 設置 text-align 時, div 需要設置 margin: auto(主要是 margin-left,margin-right) 方可居中

4. FF: 設置 padding 後, div 會增加 height 和 width, 但 IE 不會, 故需要用 !important 多設一個 height 和 width

5. FF: 支持 !important, IE 則忽略, 可用 !important 為 FF 特別設置樣式

6. div 的垂直居中問題: vertical-align:middle; 將行距增加到和整個DIV一樣高 line-height:200px; 然後插入文字,就垂直居中了。缺點是要控制內容不要換行

7. cursor: pointer 可以同時在 IE FF 中顯示游標手指狀, hand 僅 IE 可以

8. FF: 鏈接加邊框和背景色,需設置 display: block, 同時設置 float: left 保證不換行。參照 menubar, 給 a 和 menubar 設置高度是為了避免底邊顯示錯位, 若不設 height, 可以在 menubar 中插入一個空格。

9. 在mozilla firefox和IE中的BOX模型解釋不一致導致相差2px解決方法:
div{margin:30px!important;margin:28px;}

注 意這兩個margin的順序一定不能寫反,!important這個屬性IE不能識別,但別的瀏覽器可以識別。所以在IE下其實解釋成這樣:

程序代碼 程序代碼
div{maring:30px;margin:28px}


重複定義的話按照最後一個來執行,所以不可以只寫margin:XXpx!important;

10. IE5 和IE6的BOX解釋不一致
IE5下

程序代碼 程序代碼
div{width:300px;margin:0 10px 0 10px;}


div的寬度會被解釋為300px-10px(右填充)-10px(左填充)最終div的寬度為280px,而在IE6和其他瀏覽器上寬度 則是以300px+10px(右填充)+10px(左填充)=320px來計算的。這時我們可以做如下修改

程序代碼 程序代碼
div{width:300px!important;width /**/:340px;margin:0 10px 0 10px}


關於這個/**/是什麼我也不太明白,只知道IE5和firefox都支持但IE6不支持。

11.ul 標籤在Mozilla中默認是有padding值的,而在IE中只有margin有值所以先定義

程序代碼 程序代碼
ul{margin:0;padding:0;}


就能解決大部分問題

2010年9月8日 星期三

很棒的網路blog - Mr./Ms days




http://mmdays.com/



剛看到文字農場

個人很討厭那些自動字串跟文章產生器
常Google出來一堆賽.

AR 應用

http://augmented-reality-news.com/

這邊有蠻多AR 新聞的 . 從Rhino這邊看到的.感謝!!

2010年9月3日 星期五

今天新增兩位編輯成員喔!

今天是劃時代的一天.

2010年8月9日 星期一

2010年8月2日 星期一

bigSpaceShip loading museum

BigSpaceShip過去的經典loading


上次聽奶綠介紹的
讚!

http://www.prettyloaded.com/

2010年8月1日 星期日

Sony Ericsson 的手機桌布主題製作

download the themes creator

http://developer.sonyericsson.com/wportal/devworld/downloads/download/dw-70025-themescreator412?cc=gb&lc=en

than...


they support Mac OS to create themes!!

2010年7月1日 星期四

外部控制media player參數

http://delphi.ktop.com.tw/board.php?cid=30&fid=74&tid=21901

http://support.microsoft.com/default.aspx?scid=KB;en-us;q126869

http://support.microsoft.com/default.aspx?scid=kb;en-us;q241422


his article was previously published under Q126869
Media Player (both the 16-bit MPLAYER.EXE and the 32-bit MPLAY32.EXE) supports the following command-line syntax:

   MPLAYER /play /close /embedding file


All of the command-line switches and the file name are optional. Their meanings are as follows:

   /play       Play file right away.
/close Close after playing (only valid with /play).
/embedding Run as an OLE server.
file The file or device to open.


This information was inadvertently omitted from the Windows documentation.

In Windows 95 and Windows NT 3.5 and higher, the Media Player also supports the following switch:

   /open       Open the file if specified; otherwise, show the File Open
dialog.


In addition, the following switches can be used to ensure that the specified file is of a particular type:

   /AVI        The file must be a Video for Windows (.AVI) file.
/MID The file must be a MIDI (.MID) file.
/WAV The file must be a Wave Audio (.WAV) file.
Expand all | Collapse all

APPLIES TO
  • Microsoft Windows for Workgroups 3.1
  • Microsoft Windows for Workgroups 3.11
  • Microsoft Windows NT Server 3.5
  • Microsoft Windows NT Server 3.51
  • Microsoft Windows NT Workstation 3.5
  • Microsoft Windows NT Workstation 3.51
  • Microsoft Windows Software Development Kit 3.1
Keywords:
kbmm kbdocerr KB126869

Flash allow smooth鬼打牆

mac cs4

如果 import photo勾選 allow smooth , 再刪除會有 publish動畫出現閃爍問題



但是存檔完關掉檔案再重新發佈就ok

2010年6月9日 星期三

as3 flv playback auto play ...some event

original page : http://www.adobe.com/devnet/flash/articles/flvplayback_programming_03.html





Controlling web video with ActionScript 3 FLVPlayback programming

Loading, preloading, and displaying a video

The starting place for loading a video programmatically is usually the same; simply set the URL of the FLV file in the component's parameters. The ActionScript 3 FLVPlayback component uses the source property to define the URL of the FLV video. You can use a handful of other properties to affect how the video loads and starts to play.

This section covers the following topics:

  • Importing the fl.video package
  • Loading a video file and setting its autoPlay property
  • Handling preloading
  • Adding a progress bar component
  • Displaying an image overlay when the video is stopped at frame 1

See the "Getting started" section if you're wondering how to set up your file to work with these samples.

Importing the fl.video package

A package is a group of classes that provide functionality to the movie through ActionScript 3 programming. It is common practice to import packages at the start of a script so that the script has direct access to the class names within the package.

To start a script by importing the video package, add the following code to a keyframe on the Timeline containing your component instance:

import fl.video.*;

Note: Using the asterisk causes the compiler to import all classes within that package. Think of the asterisk as a wildcard character that will, in this case, import all the packages within the video package. If you do not wish to import all of the classes within a package, you can import a specific class path, such as fl.video.FLVPlayback.

Loading a video and setting the autoPlay property

Loading a video can be as simple as setting the source property of the component to the URL of the FLV file. Setting the autoPlay property at the same time can be a convenient way of controlling how the video behaves once loaded; setting autoPlay to false stops the video from starting when it's ready to appear.

To load a video and set its autoPlay property to false, add the following code below the import code you just wrote:

// Load the FLV and stop it until it is started later
display.autoPlay = false;
display.source = "myMovie.flv";

This code assumes that there is an FLVPlayback instance on the Stage named display.

Note: The FLVPlayback source property requires an HTTP URL to an FLV file, an RTMP URL to a stream, or an HTTP URL to an XML file.

Handling preloading

The FLVPlayback component pauses display of the progressive video until it is ready for viewing. The general process for handling preloading involves one of two approaches; you either let the video start playing automatically once its ready event has fired, or you pause the video and wait till a greater amount has loaded. One of the keys to smooth video playback is the ability to listen to timing events broadcast from the FLVPlayback component.

To respond to the video's ready event, add the following code to the same keyframe containing your ActionScript:

function readyHandler(event:VideoEvent):void
{
// Pause until the video can play till the end
display.pause();
display.playWhenEnoughDownloaded();
}

display.addEventListener(VideoEvent.READY, readyHandler);

Note: This code pauses the movie during the ready event unless the movie has downloaded enough to play all the way through without interruption.

Adding a progress bar component

When using progressive video, you can display a progress bar while the video is loading, up until the point when the video can begin playing. This can be accomplished easily by using the ProgressBar UI component. Follow the steps below to create a working example.

To add a progress bar:

  1. Create a new ActionScript 3 FLA file and rename the default layer 1 to assets.
  2. Drag and instance of the FLVPlayback component from the Components panel to the Stage. Position and resize the component as desired.
  3. Name the instance display in the Property inspector.
  4. Drag a ProgressBar component from the Components panel to the Stage. Position and resize the progress bar as desired.
  5. Name the progress bar instance pb in the Property inspector.
  6. Create a new layer and name it actions.
  7. Select the keyframe on Frame 1 of the actions layer and open the Actions panel. Enter the following code in the text editor:
    import fl.video.*;
    import fl.controls.ProgressBarMode;

    // Set Variables
    var flvControl:FLVPlayback = display;
    var flvSource:String = "Call_to_Action.flv";

    // Create event handler functions to control the progressbar
    function progressHandler(event:VideoProgressEvent):void
    {
    var bl:Number = Math.round(event.bytesLoaded/1000);
    var bt:Number = Math.round(event.bytesTotal/1000);

    // Update progress...
    pb.setProgress(bl,bt);
    }

    function readyHandler(event:VideoEvent):void
    {
    // Remove progressbar when we start playing (optional)...
    // removeChild(pb); // Remove the comments on this line if desired
    }

    // Set progress bar state
    pb.mode = ProgressBarMode.MANUAL;
    pb.indeterminate = false;

    // Add listeners and load the video
    flvControl.addEventListener(VideoProgressEvent.PROGRESS, progressHandler);
    flvControl.addEventListener(VideoEvent.READY, readyHandler);
    flvControl.source = flvSource;
  8. Update the flvSource variable to match the URL of your FLV file.
  9. Export the SWF (Control+Enter) to see the results.

Another variation for using the progress bar would involve stopping the video from automatically playing and monitor the bytesLoaded vs. bytesTotal values in the progress handler function. You could then remove the progress bar and play the video based on a return of a specified percentage of bytes loaded.

Note: ActionScript 3 reports runtime errors from the FLVPlayback components as exceptions. You catch and handle exceptions using the try...catch statement in ActionScript. For more information on video exceptions, see the VideoError class section of the Flash CS4 Professional ActionScript 3.0 Language Reference.

To see a working example, see flvplayback_programming1.fla in the sample files.

Displaying an image overlay when the video is stopped on frame 1

It's not uncommon for a video to start on a black frame and then fade in. On the web, this can be a visual issue if the video is paused until the user clicks the play button. In this case, the paused first frame of the video doesn't give any visual information about the video's content. One way to get around this is to load a default, static image that's the same size as the video. The image remains visible if the video is paused on frame 1 and is invisible otherwise.

Note: This sample requires that you have an image available in the assets folder sized to the same dimensions as the video. Another option is to supply a path to an image elsewhere on a remote server.

To display a static image overlay above the FLVPlayback:

  1. Create a new ActionScript 3 FLA file and rename the default layer 1 as assets.
  2. Drag an instance of the FLVPlayback component from the Components panel to the Stage. Position and resize the component as needed (the size should match the size of your video and image).
  3. Name the instance display in the Property inspector.
  4. Create a new layer and name it actions.
  5. Select the keyframe on Frame 1 of the actions layer and open the Actions panel. Enter the following code in the text editor:
    import fl.video.*;
    import flash.display.*;
    import flash.events.Event;
    import flash.net.URLRequest;

    // Set Variables
    var flvControl:FLVPlayback = display;
    var flvSource:String = "Call_to_Action.flv";

    // Load image...
    var defaultImage:Bitmap;
    var defaultImagePath:String = "frame1.jpg";
    var defaultImageLoader:Loader = new Loader();
    defaultImageLoader.load(new URLRequest(defaultImagePath));

    // Determine when to show the image...
    function enterFrameHandler(event:Event):void
    {
    // If the video is stopped on frame 1, show the image
    defaultImage.visible = display.playheadTime < 0.2;
    }
    // Handle image positioning when loaded...
    function defaultImageHandler(event:Event):void
    {
    // Position with video...
    defaultImage = event.currentTarget.content as Bitmap;
    defaultImage.x = display.x;
    defaultImage.y = display.y;
    addChild(defaultImage);

    // Monitor the video
    addEventListener(Event.ENTER_FRAME, enterFrameHandler);
    }
    defaultImageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, defaultImageHandler);

    // Load the video...
    flvControl.autoPlay = false;
    flvControl.autoRewind = true;
    flvControl.scaleMode = VideoScaleMode.NO_SCALE;
    flvControl.source = flvSource;
  6. Update the flvSource and defaultImagePath variables to match the URLs of your asset files.
  7. Export the SWF (Control+Enter) to see the results.

To see a working example, see flvplayback_programming2.fla in the sample files.

2010年6月1日 星期二

istock 圖庫 coupon!!



竟然一搜尋就賺了 1000台幣.

http://www.retailmenot.com/view/istockphoto.com




害我上次竟買了原價....