-
[CS3] Script not working!
Hello, I'm trying to make this script work with my whmcs domain checker. This script works when I use the Flash provided "ACTUAL SUBMIT" button, but when I try to put this code on a button transformed image, it doesn't want to work for me!
Code:
function clicked()
{
var my_lv = new LoadVars();
my_lv.domain = domainname.text;
my_lv.ext = ext.text;
my_lv.direct="true";
my_lv.submit="Go";
my_lv.send("http://www.evadehost.com/client/domainchecker.php","_self","POST");
}
my_search.addEventListener("click",clicked);
Why it doesn't work? I think those commands (clicked) are for the flash button. I'm not sure though. But for now, this is bs!
Thanks in advance!
- Mike
-
Click is only an event for the Simple Button component.
use onRelease event eg:
Code:
function clicked()
{
var my_lv = new LoadVars();
my_lv.domain = domainname.text;
my_lv.ext = ext.text;
my_lv.direct="true";
my_lv.submit="Go";
my_lv.send("http://www.evadehost.com/client/domainchecker.php","_self","POST");
}
my_search.onRelease = clicked;
while (2+2 == 4) {
drink ("bourbon");
}
gotoAndStop("bed");
-
Hmm, I'm getting these following errors:
function clicked()
- Statement must appear within on/onClipEvent handler
my_search.onRelease = clicked;
- Statement must appear within on/onClipEvent handler
Thanks for the reply!
-
Don't put the code on the symbol but on a frame. if you want to put it on the button use this:
Code:
on (release) {
var my_lv = new LoadVars();
my_lv.domain = domainname.text;
my_lv.ext = ext.text;
my_lv.direct="true";
my_lv.submit="Go";
my_lv.send("http://www.evadehost.com/client/domainchecker.php","_self","POST");
}
while (2+2 == 4) {
drink ("bourbon");
}
gotoAndStop("bed");
-
How do you put it on a frame? Because I think it needs a listener. (total noob here ). Thanks a ton for your time.
-
trace("AKA: Biro Barna");
You simply select the frame ( click it ) and press F9 ( paste the code there ).
| Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro | WebLog: http://blog.wisebisoft.com/ |
| Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
| Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/ | By perseverance the snail reached the ark. |
-
Originally Posted by Smilev
Don't put the code on the symbol but on a frame. if you want to put it on the button use this:
Code:
on (release) {
var my_lv = new LoadVars();
my_lv.domain = domainname.text;
my_lv.ext = ext.text;
my_lv.direct="true";
my_lv.submit="Go";
my_lv.send("http://www.evadehost.com/client/domainchecker.php","_self","POST");
}
For some reason, that code doesn't seam to work properly. When I press the go button, it does go to the domainsearch.php but I get an undefined variables error. Do you know why?
-
From the information you provide I can only guess.
Which variables are undefined? Where are placed the textfields domainname and ext (it might be a scope problem)? Also what variables is the php script expecting?
while (2+2 == 4) {
drink ("bourbon");
}
gotoAndStop("bed");
-
It's expecting domain.text and ext.text. I can upload the FLA file if you want, and you could take a look at it?
Thanks again.
-
yes, upload it. I'll have a look.
while (2+2 == 4) {
drink ("bourbon");
}
gotoAndStop("bed");
-
50$ later, I got someone to fix it. Thanks alot for all your time and support.
Greatly appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|