I have some website links in a dynamically loaded text file. MY problem is i dont know how to have the links open in a new window. ne suggestions?
the getURL() format is as follows:
getURL(url, target, method);
now, target is the method that is probably what you’re having trouble with. there are 4 options you can use, that I am aware of.
“_self”
“_blank”
“_top”
“_parent”
If you want a new window to be opened, I believe you’ll want to use “_blank”.
So for you it could be (or possibly a different method):
getURL(“http://thepageIwant.com”, “_blank”, “POST”);
thanx.
One ques. should i post the above code in the flash page that contains the dynamically loaded text or in the text file itself.
<b><a href="http://www.usapa.army.mil/pdffiles/r25_50.pdf" target="_blank">AR 25-50, Preparing and Managing Correspondence, 03 June 2002<b></a><br>
it goes in the textfile
the getURL() function should go in your actionscript in the flash object.
Just one more thing to note, you do not have to you an absolute URL (for example “http://www.here.com”) you can instead use a variable which contains the link you want to go to, since you mention you are doing dynamic stuff.
thanx.
I had it in mind 2 do what digitalphilosophy posted but just wasnt sure.
one more ques. I dont know if im pushing the boundaries of flash here but wold it be possible to put this or any actionscript command inside the dynamic text file
on (release) {
// customize the window that gets opened
// 0 equals NO.
// 1 equals YES.
address = "slbdeadbeat.html";
target_winName = "slb";
width = 544;
height = 394;
toolbar = 0;
location = 0;
directories = 0;
status = 0;
menubar = 0;
scrollbars = 0;
resizable = 0;
// sends data back to the function
openWinCentre(address, target_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);
}
I’ll elaborate more on what im getting at, once this question is answered.
I asked the above because i want the text to open a centered pop up window (which is what the above code is about) so if yall know an easier way tell me plz.
read about
#include
in Flashs’ reference
If you want to customize the popup window on dnamic loaded txt, do this:
- On your html page of your flash movie place this code between the <head></head> tags:
<script language="javascript">
function popup()
{
window.open("yourfile.html","","height=550,resizable=yes,scrollbars=yes,status=yes,width=600,left=0,top=0");
}
</script>
Note that there are other properties u can customize, just need to know javascript.
2)On your txt file place this tag:
<A HREF='Java-script:popup()'>here is your link</A>
Remove the “-” in Java-script
*Originally posted by worm *
**I asked the above because i want the text to open a centered pop up window (which is what the above code is about) so if yall know an easier way tell me plz. **
yes, you can
just make a function in JS and call it from flash with
getURL("javascript : /function goes here/");
nice claudio, i was just about to break out the ol’ AS book
edit:
<A HREF='about :popup()'>here is your link</A>
could u xpln this some more in terms of where the website address would go.
You’re welcome
In case you dont know, here are some properties of the window.open method:
[list]
[]directories
[]height
[]hotkeys
[]location
[]menubar
[]personalbar
[]resizable
[]screenX
[]screenY
[]scrollbars
[]status
[]toolbar
[*]width
[/list]
i know the properties aready. thanx neway.
what i was asking above is, where exactly in the code provided do you place the actual address of the site ur linking to.
Sorry, i cant type the word javascript in the code… just read my other post where i explain the code. I edited it.
claudio - you can just write
javascript :
//include a spacespace