hello again guys! if you read the previous tutorial you are now ready to start moving your current html forms to flash based ones, and i will guide you through the process.
What do you need? simple, a web target, flash (in my case flash8) and already have read my previous tutorial.

In this case we will be using my blog as target, as you know this is a wordpress powered blog and many of you already know how they work, they have a login page and an administration interface, but we will be focusing in the login process, sometimes html based forms get people bored because they have nothing of fun do they? (ja ja vary funny andres).
Let’s get ready open up a blank file in flash, now create a LoadVars object something like (put this code in the frame where you will be working at):

var lv:LoadVars=new LoadVars();

loginform.jpgin the flash stage drag two TextInput coponents and give each one an instance name, something like:usr_txt and pwd_txt. Then drag a button component
Now select the pwd_txt instance and then open the Parameters panel and select Password=true, it’s time to do the final touches to our little Form.

Select the button and open the Actions Panel then add this code to the button instanceLoginform2.jpg

on(click){ //we'll use _parent because the "lv" is in the parent level of THIS button //notice that the bold vars have the same name as the vars from the www.asb-labs.com/blog/wp-admin form vars (check the source) _parent.lv.log=_parent.usr_txt.text; _parent.lv.pwd=_parent.pwd_txt.text; //once we populated both vars lets send them, here you can decide if you use sendAndLoad or just send it will have a big difference, if you use send, flash will open a new window and the flash form will behave as an html based, but if u use sendAndLoad flash is going to be waited till the server answer i mean the server will send the html code of the wrong or succesful page request!!, in our case we will need just the send statement //use the same submit url the form uses, the _blank means nu page _parent.send("http://www.asb-labs.com/blog/wp-login.php","_blank","POST"); }

that’s it we are done, now start playing around converting html forms if you have any further doubt, you can post a comment ;-) cheers!!
(you can test it below) link:

This post has 2 comments.

  1. 961047046434
    02 Jul 07 3:26

    Can you convert this Html login to flash for me please :

    mikrotik hotspot > ieeja

    body {color: #737373; font-size: 10px; font-family: verdana;}

    textarea,input,select {
    background-color: #FDFBFB;
    border: 1px solid #BBBBBB;
    padding: 2px;
    margin: 1px;
    font-size: 14px;
    color: #808080;
    }

    a, a:link, a:visited, a:active { color: #AAAAAA; text-decoration: none; font-size: 10px; }
    a:hover { border-bottom: 1px dotted #c1c1c1; color: #AAAAAA; }
    img {border: none;}
    td { font-size: 14px; color: #7A7A7A; }

    $(if chap-id)

    $(endif)

    English

    Lūdzu pieslēdzieties, lai lietotu mikrotik hotspot servisu.$(if trial == ‘yes’)Lai izmēģinātu bez maksas, spiediet šeit..$(endif)

    login

    parole

     

    nodrošina mikrotik routeros © 2005 mikrotik
    $(if error)$(error)$(endif)

  2. andres
    03 Jul 07 9:31

    Hey hi, well in order to convert a form into a flash form you need:

    1) get the html form code

    2) get the “GET” or “POST” address and then you can go on with the tutorial

    greetings!!

LEAVE A RESPONSE