Well, for one it wont compile like that.
Actionscript isn't as strict as javascript (or flexible, however you want to put it...) In essence the semicolons are optional, but the line breaks tell flash when the statement has ended. You can extend beyond a line break for formatting purposes by using the _ character. But it must be treated like a variable; out of quotes and you have to have a + in between . Example as such would get you closer:
on (release) {
getURL("javascript:window.opener.location.href = 'pagina.php?"+ _
+"parametro=valor'; "+_
+" if (window.opener.progressWindow){ "+_
+" window.opener.progressWindow.close(); "+_
+" } "+_
+"window.close();");
}
- on (release) {
- getURL("javascript:window.opener.location.href = 'pagina.php?"+ _
- +"parametro=valor'; "+_
- +" if (window.opener.progressWindow){ "+_
- +" window.opener.progressWindow.close(); "+_
- +" } "+_
- +"window.close();");
- }
However your javascript would not have the line breaks. I think it might still work, but to be a bit more elegant (or sloppy, however you put it...) you can add the line breaks into java with this:
on (release) {
getURL("javascript:window.opener.location.href = 'pagina.php?\n"+ _
+"parametro=valor'; \n"+_
+" if (window.opener.progressWindow){ \n"+_
+" window.opener.progressWindow.close(); \n"+_
+" } \n"+_
+"window.close();\n");
}
- on (release) {
- getURL("javascript:window.opener.location.href = 'pagina.php?\n"+ _
- +"parametro=valor'; \n"+_
- +" if (window.opener.progressWindow){ \n"+_
- +" window.opener.progressWindow.close(); \n"+_
- +" } \n"+_
- +"window.close();\n");
- }
At this point its ugly. At least to my eyes, alot of people like this, they can see it, and it doesn't make their eyes bleed. The moral of the story is to put your javascript in the html. You have 3 statements and an evaluation. certainly enough to jusify a function. So put your javascript where it belongs, in javascript and use
getURL("Javascript:JonSaidYourAFunctionNow()")
[blur]disclaimer: [/blur] I didn't check any of my work, but my theorys are most certainly my opinion and may be wrong [fade]even if does seem like agood idea at the time [/fade]