jeudi 30 décembre 2010

Tour de flex


Tour de Flex is a desktop application for exploring Flex capabilities and resources, including the core Flex components, Adobe AIR, data integration, and a variety of third-party components, effects, skins, and more.
Tour de Flex has three primary goals:
  • Provide non-Flex developers with an overview of what is possible in Flex in a "look and see" environment
  • Provide Flex developers with an illustrated reference tool
  • Provide commercial and non-commercial Flex developers with a place to showcase their work
System requirements:

lundi 27 décembre 2010

Mirage Optical Illusion Hologram

Can you believe this little piglet is just a mirage? Me neither! Acctually it isn’t there at all! Instead it’s inside the spheric box, and mirrors inside make it look as 3D hologram. You can watch the video to be sure. I found this optical illusion at Grand Illusions, so if you want to buy Mirage for yourself, jump to their website. The Mirage is one of those classic toys that has been around for several decades now, but never lost its appeal. It produces a small, full-color hologram of natural, lifelike appearance, allowing 360-degree viewing. The little plastic pig seems solid enough, but when you try and touch it, your fingers find that it is just an illusion – there is nothing there. You can find the explanation of this optical illusion inside this post. Also if you enjoy this kind of tricky toys, you might want to visit “Magical Cube Toy”.
Mirage consists of two opposing parabolic mirrors. In overall appearance, Mirage resembles a small 9inch wok with a circular opening in the top. The physical object to be converted to a hologram is placed in the concave centre of the bottom mirror.
A hologram instantly projects up through this aperture, appearing to the viewer as a truly solid object. We supply the little plastic pig, but you can place any object in the Mirage, and instantly convert it into a wonderful optical illusion!
Mirage was originally discovered over 30 years ago, when a member of staff at the University of California at Santa Barbara was cleaning around a stack of searchlight reflectors (which are parabolic reflectors of course!) when he noticed that he was trying to clean off some ‘dust’ that turned out not to actually be there! He showed this to one of the physics professors, and the two of them started making a commercial product, based around the phenomenon that they had accidentally discovered.
Their initial product was made of glass, and was quite expensive. Later an American company called Optigone took out a licence, and started making a version in plastic, which could sell for a third of the price. There have been even cheaper copies made in the Far East, but they tend to have lower quality optics.

vendredi 24 décembre 2010

oDesk joomla certification

oDesk Certified Joomla 1.5 Developer

Commande d'un moteur pas à pas unipolaire

Salut Roboticien!!
Je vais vous présenter le circuit et ma façon de commande d'un moteur pas à pas unipolaire.
Pour ce montage, j'ai utilisé un circuit uln2803 comme un interface de puissance un moteur pas à pas bien évidement et un pic 16F877.
J'ai utilisé un virtual terminal qui communique avec le pic par l'intermédiaire du protocole uart et qui assure la commande.
  • Code avec Mikroc pro
unsigned char cmd[8]={0X01,0X03,0X02,0X06,0X04,0X0C,0X08,0X09};
unsigned char i=0; 
char k='r';


void main() {
     uart1_init(9600);
     uart1_write_text("Commande d'un moteur pas a pas unipolaire");
     uart1_write(10);
     uart1_write(13);
     uart1_write_text("pas complet: c");
     uart1_write(10);
     uart1_write(13);
     uart1_write_text("demi pas: d");
     uart1_write(10);
     uart1_write(13);
     portb=0X00;
     trisb=0;
     
     while(1){
            if(uart1_data_ready()==1){
                 k=uart1_read();
                 uart1_write(k);
                 switch(k){
                 case 'r':
                   break;
                 case 'c':
                   i=i+2;
                   if(i==9)i=1;
                   if(i==8)i=0;
                   break;
                 case 'd':
                   i++;
                   if(i==8)
                   i=0;
                   break;
                 default:
                   uart1_write(10);
                   uart1_write(13);
                   uart1_write_text("errure!!");
                   break;

             }
             portb=cmd[i];
        }
   }
}
A bientôt Dans Mon prochain Tutorial :)
Mazen


Mesure de température avec une sonde thermique et affichage lcd

Salut tout le monde,
Dans ce petit Tutorial je veux faire la mesure de température et l'affichage de la valeur mesuré en temps réel.
Pour la sonde thermique je vais la modéliser par un potentiomètre interactive dont la valeur de résistance est variable durant l’exécution du programme.
Le circuit électronique est ci dissous.

  • La liste de composants:

    un pic 16F877
    afficheur LCD alphanumérique LM016L 
    potentiomètre interactive avec Rm=1Kohm
  • Code avec Mikroc pro
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;

sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
//initialisation de module de connection du LCD
double temp=0;
char *val="1";
void initialisation(){
     lcd_init();
     adc_init();
     lcd_cmd(_lcd_cursor_off);
     lcd_cmd(_lcd_clear);
     lcd_out(1,5,"Mesure");
     lcd_out(2,1, "Temperature");
     delay_ms(500);
     lcd_cmd(_lcd_clear);
}
void main() {
     initialisation();

     while(1){
     lcd_out(1,1,"La température =");
     temp=adc_read(1) ;
     temp*=0.48;
     floattostr(temp,val);
     lcd_out(2,1,val);
     }

}







samedi 28 août 2010

Flash tuto_ Cute plane game as2 part1 controlling position

Hello Flashers!!
In this Tutorial, I'm going to show you how to manipulate a plane position and how to make it move.
In the next tutorials I'm going to show you how to add enemies in your game and weapons to your little plane to score points, but only with actionScript 2.0.
I downloaded a plane image and delete its background with photoshop.

Open up flash and let's get started.

As I said before we are going to use actionScript 2. So open a new action Script 2 file or go (file->publish settings-> flash -> choose action script2).

I named the first frame as "BG" this frame will contain our background which is by the way will do 50% of the job.


 Minimize your page. Now draw your background.
Rq: the background image has the same height of the page but 4 times larger. The part of the image that's not in the page will not appear with swf file.


 Select all of your background image and convert it to a movie clip (F8 -> movie clip).
In this step we are going to make our background moving, it's like the camera will follow our future plane.
So go to frame 50 and create a keyFrame (left click->F6).

Select the first frame and move your backgrounf to the extreme right.
Now Select your last frame (the new keyFrame) and move your background to the extreme left.
Left click somewhere between the two keyFrames (the first and the last frame) and choose Create Classic Tween.
Test your movie (ctrl+ enter).
Now we are finished with our background so make it invisible and let us add our plane.
Create a new layer and name it "plane".
File->import -> import to library the photoshop made plane.



Grab your plane into the plane layer and adjust it size while pressing the shift key to keep it centered.
Convert the plane to a movie clip, and give it an instance name in the properties panel.
Select the first frame of the plane layer and press F9 to write some code.
Here's the code try to get it to use and modified as your needs.
var keyboardListener:Object = new Object();
keyboardListener.onKeyDown = function() {
        if (Key.isDown(Key.RIGHT)) {
                   pln._x +=2;
        }
            if (Key.isDown(Key.LEFT)) {
                   pln._x -=2;
        }
            if (Key.isDown(Key.UP)) {
                   pln._y -=2;
        }
           if (Key.isDown(Key.DOWN)) {
                   pln._y +=2;
        }
       
};
Key.addListener(keyboardListener);
Download all the work from here
Thanks for your attention. See you guys in my next tutorial.
Mazen :]

mercredi 25 août 2010

My Activities: Flash tuto_ Making a custom animated cursor

My Activities: Flash tuto_ Making a custom animated cursor: "Hello Flash lovers and welcome to another tutorial. In this tutorial, we are going to make an animated custom cursor in Flash with ActionScr..."

Flash tuto_ Making a custom animated cursor

Hello Flash lovers and welcome to another tutorial. In this tutorial, we are going to make an animated custom cursor in Flash with ActionScript 3.
This is an example of what we will make.
Open up a new Action script 3 file. First we are going to import a small image for our new mouse pointer.

Now convert it to a movie clip.
Give it an instance name so we can deal with it from ActionScript 3.
Press F9 and type this code.
I will repeat it for lazy people who just want to copy it.
Mouse.hide();
stage.addEventListener(MouseEvent.Mouse_Move,follow);
fnction follow (evt:MouseEvent){
   crs. x =  mouseX;
   crs.y= mouseY;
}
For those who are interested in learning, Hi again.
the Mouse.hide() function basically hides the mouse and if you want to show your mouse use Mouse.show() just like that.
Then we set up a fairly simple event listener for an event, for when the mouse moves. And everytime it does, we're going to make our movie clip follow it.
fnction follow (evt:MouseEvent){
   crs.x = mouseX;
   crs.y= mouseY;
}
This code says that every time you enter the frame, then the movie clip's position on the stage (csr.x and csr.y) will equal the x and y position of the mouse on the stage.
Well, thank you for reading this, and I hope you've learned something from it, you will find all the work
here http://www.megaupload.com/?d=6R0F8H5A
See you next time.
Mazen :)

Flash tuto_ The growing vine animation

To play the movie below: right click -> play or (lire).
Hello everyone in this new tutorial.
Today I'm going to show how to create the famous growing vine animation.
Open flash and let us get started.
File -> import -> import to stage.
we are going to import a vine VECTOR picture. you can download vector picture from many sites these are my two favorits:
http://www.vecteezy.com/
http://www.shutterstock.com
Or you can choose one of the vectors that I used it.
Here flash shows us the different layers in our document. Make sure that the bitmap check box is not checked, then press OK.
Press the hot key (q) for the free transformation tool and adjust your vine to fit your screen.
Name the current layer as Mask.
Make a new layer and name it Artwork. Put this layer under the mask layer (drag and drop technique).
Select the Mask layer and convert it to a mask.
Unlock the Artwork layer, make the two layers visible and change the fill color to outline (Just left click in the middle of the green square).
 Select the vector vine and press (ctrl+b) twice so we got the vector shape.
Now we can see the outline of our vine.
Next step is very easy but it needs some patience, In fact the more patient you are the more beautiful result you will have.
Select your Artwork layer.


Select your brush tool set it's size and it's color.
In your first frame of the Artwork layer use your brush to print a line just in the  root.
Press F6 for a new key frame and continue with coloring your vine.
These are some screen shots from my work.



Go to your last frame, press F9 and type (stop();) to stop the animation at the end.
You can notice that the Mask frames are increasing automatically.
Save your work and test your movie.

Thank for your attention, I'm really sorry of my bad English but believe me I'm doing my best.
If there anything not clear just post a comment and I ensure that I will reply insh'Allah.
Download all the work from here: http://www.megaupload.com/?d=3BJV3C1T
See you next time,
Mazen