|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
dynamic url from txt file
i'm trying to retrieve a url from a text file for field T1:
on (release) { menu=_parent._name; link=_name; url="_root.T1."+menu+link+"url" linkurl=eval(url); trace(linkurl); getURL (linkurl, "content"); } which works, but gives me "C:\localpath\www.domain.com" unless i type the http:// into the text file - i was given this to fix it, but don't know exactly what to do with it... t1url_full="http//:"+t1url; getURL(t1url_full,"_blank"); if i do this: on (release) { menu=_parent._name; link=_name; url="_root.T1."+menu+link+"url" // trace(url); linkurl=eval(url); t1url_full="http//:"+t1url; getURL(t1url_full,"_blank"); } i get an error message "can't find C:/localpath/http://www.domain.com - make sure..." so it's applying the http:// to the text file value '...&T1url=www.domain.com...' but it's clearly not quite right - can someone tell me what i'm doing wrong here, please? thanks g
__________________
computers. yay. |
|
#2
|
|||
|
|||
|
After much seraching on this very topic and many many frustrating hours, I (with the help of a someone in my class) have found out how to do this. First of all.... to have the http part in the text file, it must be URL encoded.... there is a complete list on macromedias website, but here are the symbols youll need.
: = %3A / = %2F . = %2E Second of all, after much toying with code similar to what you posted, i found that all i had to do was insert a target path into my getURL code. So mine looks like this: on(release){ trace(_root.link); getURL(_root.link,"_parent"); } with link being the variable of the dynamic text feild positioned off stage. Something so easy yet took me 10 hours.... I hope this helps you. |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > dynamic url from txt file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|