|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
html/flash layering problem!!!
I am relatively new to web design/programming. I have created a flash movie file that serves as homepage to a site (the remainder of which is written in visual basic) and I am having great difficulty with the login segment. This part (username/password) is checked using an .asp file, and then redirects user to the relevant part of the site (not written in flash). I couldn't figure out how to incorporate this into actionscript, so it was suggested that instead I incorporate the flash home page movie file into an already written html code that contains the working simple login (only textboxes and enter button). Yet my problem remains layering the movie file and the html login. I need help placing the html login over the movie file- I have tried <LAYER> and <DIV> but these don't seem to work. Thanx!
|
|
#2
|
|||
|
|||
|
there's no reason you can't do the login with flash - it will be easier and more reliable than combining flash with dhtml layers, which is not well supported across platforms/browsers....
create two input text fields - if you're not sure how to do this, click on the text tool in the tools bar then select text type to be input text in the properties inspector. Use the properties inspector to name one of them username_txt and the other password_txt. While you have password_txt selected, change line type to *password* (the drop down box that begins with "Single Line") - that will mean that the user input is hidden with asterisks. then you need to make a submit button of some kind - do that the way you would normally make a button and name it submit_btn. The put this code on the main timeline: Code:
submit_btn.onRelease = function() {
var my_lv = new LoadVars();
my_lv.username = username_txt.text;
my_lv.password = password_txt.text;
my_lv.send("login.asp","_self");
}
which will be the equivalent of sending an html form to the script login.asp. You can add a bit of validation to the form by making it check whether the form has been filled in: Code:
submit_btn.onRelease = function() {
var u = username_txt.text;
var p = password_txt.text;
if(u.length > 0 && p.length > 0) {
var my_lv = new LoadVars();
my_lv.username = u;
my_lv.password = p;
my_lv.send("login.asp","_self");
}
}
|
|
#3
|
|||
|
|||
|
thank you, i tried this but when i test the flash movie the username textbox has _level0.user written in it and the password textbox has ********* in it, what could be the cause of this? I checked the syntx and it contained no errors.....please help
|
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > html/flash layering problem!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|