Image Editor sample for the 2nd FASC Conference.

제2회 플래시 액션스크립트 카페 컨퍼런스(5월 24일)에서 발표할 이미지 에디터입니다. 컨퍼런스에 앞서 어떤 내용을 발표할지, 참석하는 분들이 미리 확인해 볼 수 있도록, SWF 파일을 공개합니다. 소스 파일은 컨퍼런스 후에 공개하도록 하겠습니다.

다음 내용들을 대충 훑어보고 오시면 이해하는데 도움이 될 것 같네요.

The Image Editor is the sample movie for the 2nd Flash ActionScript Cafe Conference(May 24th). I post it for the audience to check what will be presented at the conference. I will open the source files to the public after the presentation is over.

Before you attend the meeting, it will be helpful to go through the following topics.

このイメージエディタは二番目のFlash ActionScript Cafe Conferenceで発表しに作った物です。プレゼンテーションの前、どんなことを発表するか、皆さんに知らせるために、SWFを公開します。ソースコードは発表が終わってから公開するつもりです。

下の主題をくまなく目を通せば、発表の内容を理解し安くなると思いますけど。

  • FileReference
  • DisplayObject
  • ContextMenu
  • ByteArray
  • MouseEvent

Related Links
AMFPHP Live JPEG Encoder 0.4 [ by Thibault Imbert ]
allow-http-request-headers-from tag in crossdomain.xml
Saving an image with AS3 and PHP: 3. ByteArray
Saving an image with AS3 and PHP: 2. FileReference
Saving an image with AS3 and PHP: 1. PHP
Flickr opens up for Flash
onReleaseOutside in AS3

Recently saved image.
Recently saved image.

Tags: , , , ,

25 Responses to “Image Editor sample for the 2nd FASC Conference.”

  1. choiceRa Says:

    와우! shift key까지 적용되는거에요? OTL

  2. Hangun's World Says:

    Alt 키도 하려면 할 수 있지만, 새로 기능 추가하려니 귀찮아서요.
    그냥 전에 만들어 둔 소스를 활용하는 선에서… ^^a

  3. 검쉰 Says:

    와~ 멋지네요~ ^^

  4. Hangun's World Says:

    감솨요 ^^

  5. jin_u Says:

    드뎌 정해졌구낭. 토욜날 보자

  6. Hangun's World Says:

    딱히 할만한 걸 못 찾아서, 최근에 주로 많이 작업했던 걸로 발표하려고.

  7. Bookun Says:

    한실장님~ 용운입니다.
    어찌어찌 여기까지 오게되었네요. 다들 블로그 사용하고 계시군요.^^
    종종 찾아올게요~
    근데 명로기가 없네요~^^;

  8. Hangun's World Says:

    방명록을 따로 만들자니 귀찮아서, 그냥 전에 사용하던 플래시 게시판을 달아놨지요.
    Board 메뉴로 들어가면 되요.

  9. Hangun's World - Blog Says:

    Image Editor Source Code…

    지난 토요일, 제2회 플래시 액션스크립트 카페 컨퍼런스에서 발표한 이미지 에디터의 소스 파일입니다.
    Download the source files.
    ……

  10. Bookun Says:

    오~스괘~~~~~^^
    역시 한실장님…. 가서 보지 못해 정말 죄송합니다.ㅜㅜ

  11. Hangun's World Says:

    ^^ 감솨요
    다음에 기회가 또 있을지는 모르겠지만, 그때는 친히 초대할게요 ㅎㅎㅎ

  12. adeel Says:

    This editor does not work from the source code, what necessary steps does one have to take in order for it to work ?

    At the moment i get an ‘IO error has been occured’

    Could you please explay why this is so

    Kind Regards

  13. Hangun's World Says:

    Flash applications can not access local assets directly for the security issue. So, you need a PHP server to upload and download images.
    First, upload “uploadok.php” to your PHP server. Then, modify codes line 25 through 26 in “ImageEditor.as” file.

    If you don’t have a PHP server, no problem. I modified the source code to upload images to my Web site, hangunsworld.com, so you can test it locally. Please, download the source code and try again.
    http://hangunsworld.com/blog/307

  14. Adeel Iqbal Says:

    Hi there, thank you for your immediate reply from my previous question.

    Hope you r well. Could i ask a few questions?

    1. Is the source code released freely available to edit and can it be utilised to create other peices of software.

    2. I would like to know whether it is possible to do everything that is possible with the images uploaded, with text as well. i.e. is is possible to add dynamic text to the canvas and be able to edit that text, resize, move to front / back etc and also to remove that text from the canvas. Just as that which you have made possible with images?

    3. If this is possible, could you please demonstrate or send a working version of such a system to the e-mail i have provided. i.e. an example of how to add text to the canvas in the same style, maybe a text holder class in effect.

    Kind Regards

  15. Hangun's World Says:

    Hi, Adeel Iqbal. Hope you are well, too.

    1. Yes. You are free to edit the source code and use it in other projects.
    2. Yes. It is possible to add dynamic texts, edit, resize, arrange them. But the features are not included in the cource code.
    3. Sorry. I am busy now working on other projects, so I can not add the features to it. But I think you can hire Flash developers near you to do the job.

    Best regards.

  16. firefox Says:

    Hi, I am attempting to create another application from the code provided, however I have a few compiler errors in the “ImageHandler.as” file:

    1120: Access of undefined property rotate_mc.
    1120: Access of undefined property size_mc.
    1120: Access of undefined property move_mc.
    1120: Access of undefined property rect_mc.

    I have copied these movieclips to my stage library, with no luck. I fail to understand where these movieclips have been instantiated or created. Am I missing something out? How do I get “ImageHandler.as” file to recognise these movie clips? For example in the library, there is a movieclip called “moveHandle”, how does your program know that moveHandle is actually “move_mc”. Your help is much appreciated.

    Thanks,

  17. Hangun's World Says:

    Hi.
    You need to copy “@@ ImageHandler” movieclip stored in the “Image Handler” folder in Library. It has all of those movieclips in it. If you changed the class path, don’t forget to modify the class path in Symbol Properties too.

    Best regards.

  18. firefox Says:

    Hi again,

    I got that working now thanks very much. I also have got text fields inserted into the application.
    Is there any way that you can think of adding scrollbars to the contentHolder?

    I have attempted to use a scrollPane but it doesnt work with sprites. Am I doing something wrong?

  19. Hangun's World Says:

    Hi.
    I think you should create TextHolder and TextHandler classes from the ImageHolder and ImageHandler. Those classes are not appropriate for handlering textfields, because they were made to control images.

    I tested the following codes, and it works good. Do you mean this?

    1
    2
    3
    4
    5
    
    var sp:Sprite = new Sprite();
    scrollPaneInstance.source = sp;
    var tf:TextField = new TextField();
    tf.text = "test";
    sp.addChild(tf);

    best regards.

  20. firefox Says:

    Thanks for the speedy reply.

    The TextHolder and TextHandler class idea is a good one, infact thats exactly what I did (suprise, suprise ;-) ) I just copied most of ImageHandler and ImageHolder. And it works great!

    The scrollpane was for the whole application, (i.e. to replace contentHolder), and it doesnt work properly. I want a scrollpane that will show scrollbars at all times, or when the user drags an image off the application screen:
    var sp:Sprite = new Sprite();
    sp.width = 2000;
    sp.height = 2000;
    scrollPaneInstance.source = sp;
    var tf:TextField = new TextField();
    tf.text = “test”;
    sp.addChild(tf);

    But the scrollbars refuse to come up, even though the sprite is really large.
    :(

    Any Ideas?

  21. Hangun's World Says:

    Well, it seems the Sprite sp’s size does not change, because it has no contents in it. Try this.

    1
    2
    3
    4
    5
    6
    7
    8
    
    var sp:Sprite = new Sprite();
    sp.graphics.beginFill(0xFFFFFF);
    sp.graphics.drawRect(0, 0, 2000, 2000);
    sp.graphics.endFill();
    scrollPaneInstance.source = sp;
    var tf:TextField = new TextField();
    tf.text = "test";
    sp.addChild(tf);
  22. firefox Says:

    Worked perfectly! Thank you very much!

  23. Hangun's World Says:

    My pleasure! ^^

  24. firefox Says:

    Hi Hangun,
    I have a problem uploading images to http://localhost. When I click the upload button, flash just waits for a long time without doing anything. I tried:

    flash.system.Security.allowDomain("http://localhost/")

    but it makes no difference. I know that your example on this site allows anyone to upload images, how can I do the same for my application?

    Regards,

  25. Hangun's World Says:

    If your computer is connected to the Internet via a static IP address, you can use your IP address for users to upload images to your application run on your personal Web server. (like this http://000.000.000.000) There could be more tasks to allow users access to your application. Check manuals of your modem or router, etc.
    Otherwise, you need to use a Web hosting service.

    Best regards.

Leave a Reply