Feb 21 2010

FileSaver Data Transfer

Category: AS3admin @ 7:22 am

In my recent project, http://www.myflashlab.com/2010/01/27/contactform-class/ I was trying to do a lot of data transfer to and from flash to PHP (or any serverside script), I had to send attachments to php, I even had to encrypt the data before the transfer and that stuff. having to do all these things, I decided to write a class to take care of all these things for me.

so I wrote this fine class that I have named it FileSaver! :) This class is good for the following purposes:

  • you want to save a file from your flash app to your desktop.
  • you want to save a file from your flash app to your server.
  • you want to save a file to your server and send some variables along with it.
  • you want to send some variables to a server side script.
  • you can encrypt the data before sending them out to server script.

Continue reading “FileSaver Data Transfer”

Tags: , , , , , , , , , ,


Feb 21 2010

Custom Event Listener

Category: AS3admin @ 2:22 am

When writting your AS3 projects, you will need events. The main thing that events do is to help you make a bridge between your instances of classes. take the adobe’s MouseEvent as an example. you add a MouseEvent.CLICK listener to a movieclip so that when you click on a movieclip instance it will dispatch the “CLICK” event. it works like below as you know.

import flash.events.MouseEvent;
mc.addEventListener(MouseEvent.CLICK, onClick);
function onClick(e:MouseEvent):void
{
    trace("mc is clicked")
}

this is all good, you have used an event being built by adobe (there are many other premade events by flash if you just check the package flash.events) Continue reading “Custom Event Listener”

Tags: , , , , , , ,


Feb 21 2010

generate asDoc for flash player 10

Category: AS3admin @ 12:07 am

in my other post about asDoc generating I talked about my expiriences in generating asDoc but that string in the .bat file works only for flash player 9 projects! in this artical I will talk about how you ca also generate asDoc successfully for flash player 10 codes also.

first read the last post here to get ready with the whole idea. http://www.myflashlab.com/2010/02/20/how-to-generate-asdoc-from-your-class-files/

the only modification you need to make to the .bat file is:
-external-library-path “C:\Program Files\Adobe\flex_sdk_4.0.0.6898\frameworks\libs\player\10″ Continue reading “generate asDoc for flash player 10″

Tags: , , , , , , , , , ,


Feb 20 2010

how to generate asDoc from your class files

Category: AS3admin @ 11:49 pm

With the launch of our new website, this site, myflashlab.com, I tried to help users use our classes with a better expirience and that was when I thought of generating adobe like AS API documentations!

to tell you the truth, at first I did not know that there’s a tool to automatically generate these nice looking documents! so the first document I generated was done totally manually with my DreamWeaver! it took a lot of time, there were so many broken links between the pages and it finally gave me a feeling that made me say, how crazy adobe is to be building these documents!

After being almost disappinted, I noticed that some open source programmes like paperVision or some other have the very same looking documentations! so I was suspisous that there must be a tool for doing this time consuming work and I was right, there is a nice tool and it’s called asDoc generator :)

In this post I will talk about my own expiriences on how I managed to generate the documentations I needed for my classes. there may be better approaches that I’m not aware of. but this is what is working for me and I am happy with. If you have a better idea or something, please share it with us. Continue reading “how to generate asDoc from your class files”

Tags: , , , , , , , , ,


Jan 27 2010

Flip Class – CornerFlip

Category: Utilsadmin @ 6:58 pm

This flip effect class works dynamically and is created through pure coding. There is NO library assets or symbols or what soever. you can simply initialize the class and set which corner of your project you want to have the flip effect and it will just work like charm!

CHECK OUT THE DEMO HERE

You can add this paper flip effect to any display object, any MovieClip, stage or anywhere. below is a sample code showing the different settings that you can have for your CornerFlip class: Continue reading “Flip Class – CornerFlip”

Tags: , , , , , , , ,


Jan 27 2010

ContactForm Class

Category: Utilsadmin @ 6:47 pm

The ContactForm class will help you create complex web forms easily. you can create unlimited number of fields and positioning them horizontally or vertically and manually. all colors are set dynamically and the whole class has been built through pure coding.

  • Captcha code supported.
  • File attachment supported.
  • Data encryption supported.
  • CLICK HERE TO CHECK OUT THE DEMO

    Continue reading “ContactForm Class”

    Tags: , , , , , , , , , , , ,


    Jan 23 2010

    Unload an externally loaded swf file

    Category: FAQadmin @ 12:09 am

    How to remove or unload an externally loaded swf file from your project?

    It happenes a lot that you try to load an external SWF file into your project. maybe in your portfolio or some swf movies or sound files. The problem I am going to talk about here is about the common problem of unloading the swf files!

    you see, if you have loaded an swf file which has some music on it playing constantly, when you try to unload/remove that swf, the sound keeps playing! (not just sounds, maybe some Event.ENTER_FRAME or other listeners are still working)

    to avoid this problem, the best solution I can think of is to add a REMOVED_FROM_STAGE listener in your external swf file so it can listen to when it’s removed from the stage so it can kill the running processes inside itself.

    simply add it like this:

    1
    2
    3
    4
    5
    6
    import flash.events.Event;
    this.addEventListener(Event.REMOVED_FROM_STAGE, onStageRemoved);
    function onStageRemoved(e:Event):void
    {
    // kill all listeneres and running processes here.
    }

    Regards,
    Hadi

    Tags: , , ,


    Jan 22 2010

    Scrollbar Class

    Category: Utilsali @ 8:34 pm

    Pure coding AS3 regSimpleScroll (regular simple scrollbar) class or in simple words let’s say scrollbar class.

    8/22/2010 UPDATE

    • modifying mask size on runtime is now available.
    • getting mask width on run time, before and after addChild (all of the inputs are actully live and editable before and after addChild)
    • set vertical and horizontal percentage of the scrollbar on run time
    • Everything is completely live and OOp
    • Listened to your needs, Made an easier and cleaner content window, just copy and paste :)

    Lucky you! what? you may say why? right?
    Well, I must say, you’re lucky because you are about to seeing the MOST POWERFUL AS3 SCROLLBAR COMPONENT in the world!! Yep, you heard it right.

    Forget about any scrollbar you had seen before, this component has been built in 40 days, YES you heard it right, 40 days for just a scrollbar.

    Now that it’s finished I can’t just call it a scrollbar but I think it’s LIVE BEAST!

    Live because you can set all inputs at runtime .
    Live because it cares for your CPU usage.

    A beast because it has a full interactive communication with the status of your content.
    A beast because you can use your imagination to give it different styles.

    And, aha, it’s not only ONE product (powerful scrollbar), but also the content window that used the scrollbar in itself is included in the package too. you don’t even need to open Adobe flash or something as the content window is completely dynamic and easy to be modified…(gets its content from a XML file and its styls are from a CSS file) I have explained how to modify it in the package for beginner users, so feel relax because everything is as easy as 123. Continue reading “Scrollbar Class”

    Tags: , , , , , , , , , , , , , , , , , , ,


    Jan 22 2010

    Popup Class

    Category: Utilsadmin @ 6:59 pm

    Pure coding AS3 popup class. Everything will be created on runtime. you will have very detailed documentations and help notes and even sample files to see how you should work with this class.

    CHECK OUT THE DEMO HERE

    The main features I can talk about are that this popup class is dragable, resizeable, totally dynamic with coloring and design. it also uses our Bg class by which you can create different kinds of backgrounds for the popup window (just read the freely available documentations of our Bg class). you can load any display object into popup windows and you can load external image or swf files also. Continue reading “Popup Class”

    Tags: , , , , , , , , ,


    Jan 22 2010

    Tooltip Class

    Category: Utilsadmin @ 6:55 pm

    You might have seen a lot of tooltip classes around the net, but this one is very special! it’s so OOP!! and you can initialize it only once in your project and use it from ANYWHERE inside the deepest layers or classes and it will always be shown on top of everything. it is accessable from everywhere. This is a Pure coding AS3 tooltip class. Everything will be created on runtime. you will have very detailed documentations and help notes and even sample files to see how you should work with this class.

    CHECK OUT THE DEMO HERE

    Continue reading “Tooltip Class”

    Tags: , , , , ,


    « Previous PageNext Page »