View Full Version : Flash scripting/PHP/JS and popups
Barely Human
24-12-2004, 03:03 AM
Does anyone on here know how to enbed them properly into each other? Its only on the flash side of things im having problems with. If anyone knows their shit can they contact me, it would be most apreiciated :cool:
Tyrisia
21-01-2005, 04:07 AM
I know a fair bit of actionscript, and how to link a movie to php, not so hot on javascript tho. If I can be any help just give me a shout dude ;) .
Barely Human
21-01-2005, 04:45 AM
Cheers fella.
The problem i have is this -
Ive been making a flash site. Ive added a newsletter subscription to the site, and when someone hits submit, it links them to a php page, where it sends the data to a text file, and also opens a picture saying submission succesful. This all works fine, but i want the php page to open in a pop-up window to the right size of the picture. I can get it to open in a pop up no problem, but it wont send the data when i do.
The other thing is i have been using swishmax to build the site and not flash, so i dont know how well the action scripting relates. Anyway, the code i have used thats works (without the pop-up) is -
on (press) {
getURL("http://www.clubfaction.net/site/array.php","_blank",GET");
_root.visible = true;
}
The script i have been using for the pop-ups is
on (press) {
javascript("window.open('http://www.clubfaction.net/site/armageddonflyers.html','armageddon','width=600,hei ght=476, addressbar=no, statusbar=no, resizable=no, scrollbars=no, toolbar=no, top='+((screen.availHeight/2)-(400/2))+',left='+((screen.availWidth/2)-(400/2))+'')");
}
This does work for popups, but it doesnt send the GET commend if i combine it with the other script :doh:
i am at a loss with what to do :neutral:
Tyrisia
22-01-2005, 05:16 AM
A) r u combinin the two commands on one "on (click)" function, which I think u should be?
B) if I was doin this in Flash, I wouldn't be usin the getUrl function, but the loadVariables (or loadVariablesNum) function, as this is guarenteed to send the variables outta a Flash movie to whatever php is sittin behind it.
The best thing I can think of is if u msn me with the files, an I'll download the swish trial and ave a look at it in there, maybe I can shed some light?
Tyrisia
22-01-2005, 06:10 PM
not loadVariables, sendAndLoad :doh:
schlongfingers
13-02-2005, 04:52 AM
on (press) {
javascript("window.open('http://www.clubfaction.net/site/armageddonflyers.html','armageddon','width=600,hei ght=476, addressbar=no, statusbar=no, resizable=no, scrollbars=no, toolbar=no, top='+((screen.availHeight/2)-(400/2))+',left='+((screen.availWidth/2)-(400/2))+'')");
}
This code is fine buddy, you just need to append your get variables to the url, for example
on (press) {
javascript("window.open('http://www.clubfaction.net/site/armageddonflyers.html"+_root.path.to.your.get.variable+"','armageddon','width=600,height=476, addressbar=no, statusbar=no, resizable=no, scrollbars=no, toolbar=no, top='+((screen.availHeight/2)-(400/2))+',left='+((screen.availWidth/2)-(400/2))+'')");
}
[/quote]
schlongfingers
13-02-2005, 04:53 AM
Argh shit, that's actionscript - you need to amend to whatever swish uses, but think you get the idea of what's needed.
schlongfingers
13-02-2005, 04:55 AM
also there needs to be a '?' after the html, then just build your string like
index.html?variable1=abcd&variable2=efgh
Really wish you could edit posts in this section!
Powered by vBulletin® Version 4.1.11 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.