> ## Content Index
> Fetch the complete content index at: https://blog.hinablue.me/llms.txt
> Use this file to discover other available public pages before exploring further.

# [Flash tech.] 簡單的 Flash 滑鼠拖曳圈選
- URL: https://blog.hinablue.me/flash-tech-draw-and-crop-your-image-in-the-flash/
- Published: 2009-08-08T18:25:00.000Z
- Updated: 2026-06-25T09:58:38.000Z
- Author: Hina Chen
- Tags: Work, Flash, Drag and Crop

強者請直接參考這兩篇：

- [\[AS 3\] Actionscript Image Crop Project – Part I – Drawing Rectangle](http://manewc.com/2008/03/11/as-3-actionscript-image-crop-project-part-i-drawing-rectangle/?ref=blog.hinablue.me)
- [\[AS 3\] Actionscript Image Crop Project – Part II – Copying Bitmap Data](http://manewc.com/2008/03/12/as-3-actionscript-image-crop-project-part-ii-copying-bitmap-data/?ref=blog.hinablue.me)

上述兩篇是教你怎麼在 Flash 裡面利用滑鼠的拖曳動作來做圈選框，並將圈選框內的圖形給複製出來。我呢，則是將圈選框小改了一下，因為利用 Shape 透過 graphics 的方式來做的話，會有很多影分身出現。所以我就換了個思考模式，一樣是利用滑鼠的拖曳動作，把他換成 MovieClip 來做的話，就不會有影分身問題，而且也可以將透明度給拉出來，讓圈選的部位可以半透明。

這是影片測試結果，我可以多次的圈選區塊：  
![](https://blog.hinablue.me/content/images/2014/Jun/8458966109.jpg)

然後，輸出圈選區塊的座標值：  
![](https://blog.hinablue.me/content/images/2014/Jun/7726848848.jpg)

礙於這是私人需求的程式，所以原始碼就不在此野人獻曝了，基本上是參考我所列出來的那個網站修改而來的，有需要的人就煩請自己動動腦囉。