[SIZE=2]I am buiding a script to screen scrape a website. [/SIZE]
[SIZE=2]The website in question has a FLASH login screen & I need to automate the login process.[/SIZE]
[SIZE=2]- I have been able to use the .SetVariable function (via client javascript) to set the username and password.[/SIZE]
[SIZE=2](I downloaded the SWF and used a component to extract the code, see variable names etc).[/SIZE]
[SIZE=2]However I now need to automate the button click (to “sign in”) on the same flash object.[/SIZE]
[SIZE=2]My question therefore is: can I use a client side javascript method to execute a function in the flash object? I’ve tried tried something like this:[/SIZE]
[SIZE=2]var oFlash = document.getElementById(“movie”);[/SIZE]
[SIZE=2]oFlash.SetVariable(“input1.text”, “username”);[/SIZE]
[SIZE=2]oFlash.SetVariable(“input2.text”, “password”);[/SIZE]
[SIZE=2]oFlash.accountService.login();[/SIZE]
[SIZE=2]- login() being a declared function in the flash file, called when the “button” is clicked. [/SIZE]
[SIZE=2]The variables/input box values seem to be set ok, but it is failing on the “login()” call.[/SIZE]
[SIZE=2]I’ve tried searching far and wide; there is code suggesting this should work, but I just get an error “login is null or not an object”[/SIZE]
[SIZE=2]I must be missing something fundamental, about calling certain functions etc.[/SIZE]
[SIZE=2]Oh and btw, I can call oFlash.Play(), which seems to be working fine??[/SIZE]
[SIZE=2]Any ideas?[/SIZE]
[SIZE=2]thanks![/SIZE]