Current location: Hot Scripts Forums » General Web Coding » Flash & ActionScript » getURL target?


getURL target?

Reply
  #1 (permalink)  
Old 09-30-06, 04:06 PM
Hunter Hunter is offline
Newbie Coder
 
Join Date: Dec 2005
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
getURL target?

Hello. How can I target a url in flash? At the minute for my buttons I have this code, that works fine -
Code:
on(press) {
	getURL ("http://www.........");
}
How can I add a target to this url, like in html you would add
Code:
<html>
<a href="http://www.......">BUTTON</a>
</html>
Regards,
Hunter
Reply With Quote
  #2 (permalink)  
Old 10-01-06, 04:19 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
you mean a button in your application? "target" is also a param of the getURL function, so what do you mean exactly?
if you want to know about the param "target":
it's the same as in html: "_blank", "_parent", "_self"

if you want to know how to create a button:
1. make a textbox and type some text in it.
2. convert this textbox to a button.
3. click on your scene, and then back on the button. Name the button in the properties window.
4. Open the "action"-window of the frame your button is located in, and type the following code:
Code:
my_button_name.onRelease = function(){
  getURL("http://www.......");
};
Hope this makes it clearer. if not, just ask
UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
  #3 (permalink)  
Old 10-01-06, 09:38 AM
Hunter Hunter is offline
Newbie Coder
 
Join Date: Dec 2005
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
I want to add a target to my link.
http://www.clarkysite.co.uk/new/
Here is what I am working on. I want my buttons, that I currently have just linked, to target my iframe. Would I just simply change

getURL("http://www....");

to

getURL("http://www....", "iframeid");
?

Regards.
Hunter
Reply With Quote
  #4 (permalink)  
Old 10-01-06, 10:55 AM
UnrealEd's Avatar
UnrealEd UnrealEd is offline
Community Liaison
 
Join Date: May 2005
Location: Antwerp, Belgium
Posts: 3,165
Thanks: 4
Thanked 25 Times in 25 Posts
you can't link the getURL function to an iframe as far as i know. In html an iframe is loaded on every page, but you can't load it without loading the rest of the page.

you'll have to use php to check which iframe should be loaded. when i hit one of your buttons it says "index.php?page=some_page", this is how you should do it. then simply include the file, specified by the page var:
PHP Code:

if(!@include($_GET['page'].".html")) echo "invalid page specified"
hope this helps you a little. BTW: when using php, it's not necessary to use iframes, simply include it in a div or a table-cell, and you will get the same result, except for the fact that there wont be any scrollbars

UnrealEd
__________________
"Good judgement comes from experience, and experience comes from bad judgement." - Fred Brooks

Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: no suitable installation target found for package OLE-Storage_Lite. padmanaban_bala Perl 1 05-04-05 09:50 AM
target iframe or frame moose JavaScript 3 01-29-05 03:31 PM
automatically save target as once clicked on c.mckeown HTML/XHTML/XML 3 09-29-04 03:30 PM
Single click refreshing with target of _top Deezul ASP 0 09-22-04 06:57 PM
get the url of a target frame elf JavaScript 1 11-27-03 02:30 PM


All times are GMT -5. The time now is 06:29 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.