Be a Supporter!

API to bitmap

  • 203 Views
  • 6 Replies
New Topic Respond to this Topic
Creepy
Creepy
  • Member since: Nov. 28, 2004
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
API to bitmap 2005-10-01 10:30:09 Reply

I made a drawing program in flash and was wondering if there is a code that export the api code the user make into a .jpg!

caseyo
caseyo
  • Member since: May. 14, 2005
  • Offline.
Forum Stats
Member
Level 23
Blank Slate
Response to API to bitmap 2005-10-01 10:37:46 Reply

www.download.com

Try some sort of converter.

Sam
Sam
  • Member since: Oct. 1, 2005
  • Offline.
Forum Stats
Moderator
Level 19
Programmer
Response to API to bitmap 2005-10-01 10:43:54 Reply

Paste the API code, press Control + Enter and take a screenshot =P

Creepy
Creepy
  • Member since: Nov. 28, 2004
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Response to API to bitmap 2005-10-01 11:18:26 Reply

ok here's the code and a screenshot.
The last part in the code make all the API coding into a Bitmap (by Glailel Gamer),
but i still need to know how to export the bitmap!
code:

createEmptyMovieClip("myDrawing", 1);
myDrawing.lineStyle(2, 0x000000, 100);
onMouseDown = function () {
myDrawing.moveTo(_root.pencil._x, _root.pencil._y);
onMouseMove = function () {
myDrawing.lineTo(_xmouse, _ymouse);
};
};
onMouseUp = function () {
onMouseMove = null;
};
onEnterFrame = function () {
Mouse.hide();
if (_ymouse>70) {
_root.pencil._x = _root._xmouse;
_root.pencil._y = _root._ymouse;
_root.mouse._x = 1000;
} else {
_root.mouse._x = _root._xmouse;
_root.mouse._y = _root._ymouse;
_root.pencil._x = 1000;
}
_root.pencil.swapDepths(10);
_root.wall.swapDepths(2);
_root.mouse.swapDepths(11);
_root.boldpanel.swapDepths(5);
_root.colorpanel.swapDepths(6);
};
import flash.display.BitmapData;
var myBitmapData:BitmapData = new BitmapData(550, 400, false, 0x00FFFFFF);
myBitmapData.draw(_root);
_root.bitma.attachBitmap(_root.myBitmapDat
a)

http://img285.images..0/flashdrawer6zq.png

Creepy
Creepy
  • Member since: Nov. 28, 2004
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Response to API to bitmap 2005-10-01 11:43:34 Reply

so no one who got anything to say?
no comments, nothing?

Newsdee
Newsdee
  • Member since: Jan. 21, 2005
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to API to bitmap 2005-10-01 12:56:29 Reply

The problem to export the bitmap is getting that data out of Flash into a file. I don't think the Flash player can save a file to disk other than the "SytemObjects"... so your only solution would be to plug your flash app to a PHP server that gets the bitmap data and saves it as JPG... but that's kind of a lot to do :-)

Newsdee
Newsdee
  • Member since: Jan. 21, 2005
  • Offline.
Forum Stats
Member
Level 18
Blank Slate
Response to API to bitmap 2005-10-01 19:48:41 Reply

Just found this: how to export an image with Flash/PHP .