|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
I have a URL rendered by PHP. PHP saves some dynamic url's in .txt files. Flash pickes the url's from the .txt files. Than I make a variable equal to the url. Than I want to link to the variable. No problem normally. One could write something like this: var lop= something; on(release){ getURL(lop); } To make sure flash doen't recognize it as a string, you don't write "lop" but lop. But now have a javascript that makes sure the url doesn't replace the current window, but apeares in a layer. to call the function in flash I do this: on (release) { getURL("javascript:include('textlayer' ,'www.someurl.com')"); } My big big big problem is that I want the Url to be a variable. Only the quotation marks turn my variable into a string!! And as a consequence everything goes wrong!! Is there a way to make this work???? many many many thanx to the person that knows the solution. Greetz Sam aka Game from Holland ![]() |
|
#2
|
|||
|
|||
|
Hi, ok I'm a bit confused but I think I've muddled through. in flash the url will be a string. I'm like 99% sure there isnt a url type object in flash. I've got a couple of suggestions though:
on (release) { getURL("javascript:include('textlayer' ,\"www.someurl.com\")"); } ok that was my first, basically swap the ' for \". Javascripts the same as flash and their isnt an url object type (im guessing!). It just reads strings but it may be fussy about how the string is arranged. If the above doesnt work why not try parsing the string your self in the js function. i.e. substring the parts between the quotes. |
|
#3
|
|||
|
|||
|
Sorry Tann San. This does not work.
![]() But I can't believe it's impossible to use this javascript with a var instead of a string-URL. Anyone a solution? greetz Game |
|
#4
|
|||
|
|||
|
ok, try this out then:
on (release) { getURL("javascript:include('textlayer' ,"+www.someurl.com+")"); } I dont think you can actually use www.someurl.com as a variable though. I mean any site address when I say that. If you didnt use the url as a string it would make flash think that you were trying to pass com as a variable. com here being the variable (flash thinks) is in someurl which could be in a clip called www. now that was confusing wasnt it. if you had a variable i.e.: newURL = "www.someurl.com"; then you could use that instead i.e.: on (release) { getURL("javascript:include('textlayer' ,"+newURL +")"); } |
|
#5
|
|||
|
|||
|
hi tan sann! I think you solved the problem! I am a bit 'tipsy' now. (it's 7:30 in the morning here) But I tried it in flash, and it seems to
work. Thanks a lot!! |
|
#6
|
|||
|
|||
|
yes, it works. Thanks a lot !!
Sam |
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > a very strange getURL problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|