donderdag 8 januari 2009

flash drawing applications actionscript

If you are trying to build a flash drawing application in actionscript, a tool where users can draw in swf, these links might come in handy. Myself im actually working on something where users can FILL shapes, just like in a traditional coloring book for kids.

Nevertheless i cannot find any usable actionscript for this.
All i can find and fix is filling using actionscript, predefining the coordinates in AS.
Since i am using jpgs ( or vectors) as a base image, it is not possible.
I have to put all lines in actionscript first, which is impossible to start with.

So i will fake it, creating clips for every shape, and changing its color trough actionscript.
Its a stupid workaround, timeconsuming, but it will do for this projects.

Here some more links on drawing in flash.
They are great, but they wont help you with the FILL problem..
Let me know if you find a solution for this!!! ( also, in CS4 i think it might be possible)


http://www.actionscripts.org/forums/showthread.php3?t=159637
http://www.actionscript.org/resources/articles/10/1/Creating-a-Dynamic-Drawing-application-in-Flash/Page1.html
http://www.kirupa.com/forum/showthread.php?t=40686
http://www.queeky.com/draw/php/
http://psykopath.deviantart.com/art/Proper-Flash-Drawing-App-52545349
http://forums.macrumors.com/
http://jessewarden.com/2004/10/draw-lines-with-undo.html
http://www.flashandmath.com/basic/mousedraw/index.html


or you can always use a hammer...
Please leave your comments.

.

check complete server path to file or folder

Sometimes you need to know the complete server/directory path to a certain folder or file.
Let's say you are using .htaccess you will need to put a link in the file containing the complete server path to this file.

To find out this path, you can use this simple php script.
Create a php file and copy paste this code.
Save the file on your server in the folder of which you want to know the server path.
Open the file in your browser; it will display the complete path to this file.

Good luck!

-----the code----

< ? php
echo dirname (__FILE__);
?>

-----end code----

ps, dont use spaces between "< ? php" , it's just that this blog didnt support printing it otherwise..


or you can always use a hammer...
Please leave your comments.

.

Mac OSX change screenshot format png to jpg or other

Was doing a project, needed to cut up pictures...
It would have been easy just taking new screenshots and replacing them. Only problem is that MacOSX saves a screenshot as png format, not jpg.

Now you dont have to resave them in an imageeditor, you can just change the preferences of MacOSX like this:
(thanks tice;)

---
In Mac OS X 10.4 and later, the default screenshot format can be changed, by opening Terminal (located at /Applications/Utilities/Terminal) and typing in:

defaults write com.apple.screencapture type image_format
killall SystemUIServer
Where image_format is one of jpg, tiff, pdf, png, bmp or pict (among others). If you omit the second line, you will need to log out and in again for the change to take effect.
----



or you can always use a hammer...
Please leave your comments.

.