Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 11th, 2003, 11:07 AM
game game is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: holland
Posts: 164 game User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 19 m 9 sec
Reputation Power: 5
Angry a very strange getURL problem

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

Reply With Quote
  #2  
Old December 11th, 2003, 02:28 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,633 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 7835 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 15 h 7 m 8 sec
Reputation Power: 538
Facebook MySpace
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.
__________________
-Tann

-Vote for your favorite ActionScript editor here.

Reply With Quote
  #3  
Old December 11th, 2003, 04:51 PM
game game is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: holland
Posts: 164 game User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 19 m 9 sec
Reputation Power: 5
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

Reply With Quote
  #4  
Old December 11th, 2003, 06:37 PM
Tann San Tann San is offline
Gotta get to the next screen..
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2003
Location: Legion of Dynamic Discord
Posts: 4,633 Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)Tann San User rank is Colonel (50000 - 60000 Reputation Level)  Folding Points: 7835 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 15 h 7 m 8 sec
Reputation Power: 538
Facebook MySpace
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 +")");
}

Reply With Quote
  #5  
Old December 12th, 2003, 01:10 AM
game game is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: holland
Posts: 164 game User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 19 m 9 sec
Reputation Power: 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!!

Reply With Quote
  #6  
Old December 12th, 2003, 01:38 PM
game game is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: holland
Posts: 164 game User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 h 19 m 9 sec
Reputation Power: 5
yes, it works. Thanks a lot !!

Sam

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > a very strange getURL problem


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway