right_side
Posted on 20 Nov 2008 In: Web Tutorials

Creating email form with flash and php

SENDING MAIL THOURGH FLASH AND PHPFLASH PART

We will add four input boxes for
To
From
Subject
Body

————————–
—- Follow the steps —-
————————–

1. Pick up the Text Tool and write To, From, Subject, Body in a static form. Choose Static from text box properties like this

user posted image

2. Now make another TEXT box using TEXT Tool and set its properties asinput box, like this

user posted image

and place it in front of text To, so it will look like this

user posted image

3. Now we have to attach a variable with this input box. For that we will click on the input box and in its Properties tab we will input the variable name. See the RED rounded rectangle area. The variable
we will is to.

user posted image

4. Now COPY and PASTE this input box and place in front of From, Subject and Body so it will look like this

user posted image

now stretct the BODY input box and change its varialbe name and also from single line to multiple line.

user posted image

5. Now you will have to change the variables names of each INPUT Boxes.Click on the input box which is in front of From and in its properties change its variable name to from. Now click on the input box infront of Subject and change its variable name to subject. Click in Body input box and change its variable name to body.

6. Now make a button “SEND” and in its action put the following code.

 on (release) {
    if (to eq “” || from eq”" || subject eq “” || body eq “”) {
    getURL(”javascript:alert(”All fields are required”);”);
} else {

     send = “done”;
     loadVariablesNum(”mail.php”, 0, “POST”);
     getURL(”javascript:alert(”Your mail has been successfully sent”);”);

     to=”";
     from=”";
     subject=”";
     body=”";
   }
}   

7. Now we have to make a check either all the input boxes are filled or not, for that right click on the first frame of the Layer one and  click on Action.

user posted image

in its action panel paste the following code.

CODE

      stop();
      to=”";
      from=”";
      subject=”";
      body=”";

Finally the mail form will look like this.
user posted image
[i]All Flash work is done. Now we have to make our PHP code

PHP PART

Now we have to integrate the variables we have made in Flash with PHP script.  
————————–
—- Follow the steps —-
————————–

1. Open NOTEPAD or any Text Editor you like.
2. Paste the following code into that
 

  <?
      if ($send==”done”) {
      $to = escapeshellcmd($to);
      $subject = escapeshellcmd($subject);
      $body = escapeshellcmd($body);

      $from = escapeshellcmd($from);
      $tfrom = “From: <$from>”;
      mail($to,$subject,$body,$tfrom);
      }
  ?>
   
3. Save this file with name mail.php

Thats all done.  

.:: Download Example Files .::

Now you have to find any webserver thats supports PHP scripts, so that you can test you Email Sender program. Upload your HTML, SWF and PHP file in the same folder. Hope it helps.

There are only a few steps for sending mails through Flash and PHP. First thing is ofcourse to design an interface using that you will be for sending mails, and the second portion is the PHP code. So we will start
with the first portion to make an interface and attach Variables with input boxes.

Posted on 20 Nov 2008 In: Web Tutorials

Embedding flash movie in visual basic

For making our VB projects more attracitve we embed our flash made Movies into our VB files. Lets make a simple example have simple animations.

In this example we will add a simple animated SWF in VB.

QUOTE

This is just Flash part.
————————
— Follow The Steps —
————————
1. Write TEXT and convert it to symbol.
2. Just give it some Fade out Effect.
3. Export it as swishdb.swf

Now this is Visual Basic 6 Part.
————————
— Follow The Steps —
————————
1. Run VB6 and select Standard EXE
2. Now save both FORM and PROJECT with name swishdb.
3. Now right click on the left tool bar and select Components.

user posted image

4. Now from components —-> Controls, check the option of Shockwave Flash  and press OK

user posted image

5. Now you will see a new component in the left tool bar.

user posted image

now click on it, and draw a rectangle on your form. It will look like a white rectangle, you can set its height and width from Properties.
6. Now simple click on that white rectangle and now see its properties on the right side. Its properties will look like this

user posted image

Now click on the button in front of CUSTOM. A window will apear like this

user posted image

7. Now give the exact path of your SWF file (swishdb.swf). And check the option
of Embed Movie.

8. Now you can set different properties from Properties. For example if you want to make your movie transparent, then do the following steps. Scroll down all properties, you will see an option WMode, now write Transparent in front of it, so it will look like this.

user posted image

9. Now RUN your project. If you make EXE file, the SWF movie is embeded in the main source, now you can delete those SWF files.

.:: Download Example Files ::.

You can use this tutorial for both Flash and SWiSH. Because the method
of embedding SWF is same.

Posted on 20 Nov 2008 In: Web Tutorials

Creating basic animation in flash

I assume that you have a little knowledge of flash. Before making an animation let me make it clear to you that whenver you make any animation you have to convert your object to a Graphic Symbol.

Follow the steps.

1. Draw a rectangle.
2. Select the whole area of rectangle with Arrow Tool
3. Now convert it to a graphic symbol, goto menu Insert and click
  on Covert to Symbol. And from that popup window, select Graphic option. 

  
 
Now your rectangle is a graphic symbol.

4. RightClick on frame number 20 and selcect Insert Keyframe.

5. Now LeftCilck on frame number 20, and drag your rectangle to any other position, put it in the left botton corner.

6. Now rightclick on any frame between frame number 1 and 20, and select
  Create Motion Tween

well - thats all. this is basic.
hope it helps.

Posted on 20 Nov 2008 In: Web Tutorials

How to do shape tweening in flash

What is shape tweening.

Shape tweening is a method in which you convert any shape to any
other shape, for example a rectangle will be converted to a circle
in the following example.

Example : View here

We will make two examples of shape tweaning, because tweening
of TEXT is different than shape.

QUOTE

Tweaning of Shape

Follow the steps, your animation will convert a rectangle to circle.1. Open new file.
2. Make a rectngle on the first frame.
3. Now if you want a quick animation, (it depends on you how many frames
  you want) right click on Frame number 10.
4. Select Insert Keyframe from that menu. Now you will see another  
  DOT on frame number 10.
5. Left click on Frame 10 and delete that frame. Now only frame number 10
  is empty, other 9 frames are not empty.
6. Now click on Fram 10 and drae a circle. Now if you see there is a Circle
  on frame number 10 and a rectangle on all other frames.
7. Now click on any frame between 1 and 10.
8. Now if you see in properties (at the bottom) there will be written
  Tween and in front of this, there will be a combobox, now
  you have to select Shape from it.
9. You are done. Now run your movie.

QUOTE

Applying TWEEN to Text.
When you apply tweaning to TEXT its a little bit different. Because you
cannot directly apply tweening to text.
You dont need to do anything else, there only one change in doing so.

1. Write text “SWiSH-DB”.
2. Click on text and from Modify menu, select Break Apart.
3. Now each single alphabet is seperated. It looks like this

  user posted image

4. Now again goto Modify menu and select Break Apart.  
  then it will look like this.

  user posted image

5. Now rightclick on frame number 10 and select Inert Keyframem and delete this frame.
7. Again write “Ultimate Designers”, and do the above steps with this (break apart etc)..
7. Now click on any frame between 1 and 10.
8. Now if you see in properties (at the bottom) there will be written
  Tween and in front of this, there will be a combobox, now
  you have to select Shape from it.

thats all. This is very easy and basic tutorial for newbies, I am sure it will
help the newbies arround SWiSH-DB.