|
|
|
#1 |
|
Senior Member
Join Date: Sep 2000
Posts: 115
|
export as image using actionscript
I've heard you can do this in version 8. I need to be able to export the flash stage as an image to be e-mailed to professors for an online course. Can someone lead me in the right direction?
__________________
Willi-Jay ______________________________ Creative Communications www.creativecommunications.ca ______________________________ |
|
|
|
|
|
#2 |
|
Senior Moderator
Join Date: Apr 2000
Location: Sheffield, UK
Posts: 3,881
|
First things first you need to snapshot the main timeline into an image:
Code:
import flash.display.BitmapData var b = new BitmapData(Stage.width,Stage.height) b.draw(_root) You will be sending quite alot of data over the wire so this could take some time and you will also need to send using HTTP POST. I would personally use php and the GD Image Library for the server-side. There are potentially alot of pixels that you will need to loop through. Flash will most probably display a "This script is running slowly" if you loop over the pixels all on one frame. So i suggest that you loop over the pixels over a number of frames. You can use: Code:
b.getPixel(x,y) |
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|