Here’s my actionscript so far
_txt.text = id;
when i put in a link i did this:
http://mylink.com/somefolder/_txt
it’s not working.
what do i need to do to get the variable in the link. if that made sense?
Here’s my actionscript so far
_txt.text = id;
when i put in a link i did this:
http://mylink.com/somefolder/_txt
it’s not working.
what do i need to do to get the variable in the link. if that made sense?
on (press) {
//Goto Webpage Behavior
getURL("http://mylinkishere.com/[COLOR=RoyalBlue]_txt[/COLOR]","_self");
//End Behavior
}
i’m not sure what goes around the blue. I’ve tried quotes, slashes… is the whole thing wrong? it works fine with text fields
Unless i’m missing the point won’t the following work…
getURL("[http://mylinkishere.com/"+_txt.text,"_self](http://mylinkishere.com/)");
Also it might be a good idea to create a variable for the link…
var myLink:String = "http://mylinkishere.com/"+_txt.text;
...
getURL(myLink,[COLOR=#003366]"_self[/COLOR]");
cool my variable showed up! that’s progress. Do you happen to know how to get rid of the single quotes that keep showing up on the outside
I’m not sure what you mean.
Can you post your fla??
I dont have a host to post my fla right now… but
my as:
_txt.text = id;
on (release) {
//Goto Webpage Behavior
getURL("http://mylink/"+_txt.text,"_self");
//End Behavior
}
then in the browser it shows up as http://mylink/[COLOR=“Red”]’[/COLOR]myvariablenumbersarehere[COLOR=“Red”]’[/COLOR]
All I need to do is get rid of the single quotes before and after my variable.
maybe try eval()
on (release) {
//Goto Webpage Behavior
getURL("http://mylink/"+eval(_txt.text),"_self");
//End Behavior
}
It got rid of the quotes, but now it’s not seeing my variable at all.
http://mylink/undefined
Sorry about this.
lol… np. Maybe try this:
var myLink:String = eval("http://mylinkishere.com/"+_txt.text);
on (release) {
//Goto Webpage Behavior
getURL(myLink,"_self");
//End Behavior
}
I got a couple errors with that one.
so far the closest I got was this:
on (release) {
//Goto Webpage Behavior
getURL("http://mylink/" + id,"_self");
//End Behavior
}
it adds single quotes before and after my variable.
:: Copyright KIRUPA 2024 //--