PDA

View Full Version : getURL with a named Target.



jlanders
04-26-2004, 07:45 PM
Hi all,

OK Guys... this should not be this hard. Can you please help me with this, it is driving me crazy!!! :shock:

I have a Frameset with a top - bottom frame. The flash is in the top nav frame and I need to call another page and place it in the bottom frame. Thus it is a simple Nav Flash populating a bottom frame window.

Frame Code:


<frameset rows="167,*" framespacing="0" frameborder="NO" border="0">
<frame name="top" src="frmMainTop.html" scrolling="NO" noresize >
<frame name="mainframe" src="frmMainBotm.html" >
</frameset>



Actionscript Flash Code:


on &#40;release&#41; &#123;
getURL&#40;"buyers.html", "mainframe"&#41;;
&#125;


This does nothing!
However, This -


on &#40;release&#41; &#123;
getURL&#40;"buyers.html", mainframe&#41;;
&#125;

Will pop a new browser and fill it with the correct html page.

What am I doing wrong?
Any help is appreciated.

jeet
04-27-2004, 06:11 AM
Hi there,

if you are using below code


on &#40;release&#41; &#123;
getURL&#40;"buyers.html", "mainframe"&#41;;
&#125;

it means you are calling the file in a static target it's not a variable means flash treat it as frame name

and


on &#40;release&#41; &#123;
getURL&#40;"buyers.html", mainframe&#41;;
&#125;

if you are using the above code it's a dynamic variable and it's one in blank browser with this file.


regards

jeet

jlanders
04-27-2004, 01:54 PM
Thanks for your reply Jeet!

That is correct. I am using a static reference to the target frame "mainframe". The html frame set was also pasted in the post so you can see that as well. The code that was causing problems was:





on &#40;release&#41; &#123;
getURL&#40;"buyers.html", "mainframe"&#41;;
&#125;


What is wierd is that I changed the frame name in the frameset to main, then changed the action script to:



on &#40;release&#41; &#123;
getURL&#40;"buyers.html", "main"&#41;;
&#125;


and for some strange reason... it works now? Do you know of a character lenght limit on a frameset name?

Thanks for your help. All is working now.

James

sethinc
02-03-2007, 01:19 AM
I cannot figure this out. could you go step by step with me, because i have tried everything. I noticed that you have helped before

this is my action script:

on (release) {
getURL("whatwedo.htm", "main");
}

this is what the site looks like

<HTML>
<HEAD>
<TITLE>Classic Rock Installations of Texas</TITLE><link rel="shortcut icon" href="favicon.ico" >
</HEAD>
<FRAMESET border="0" cols="100%">
<FRAMESET rows="200,*">
<FRAME name="top" src="Classic Rock Menu.html">
<FRAME name="main" src="variousmanufacturers.html">

</FRAMESET>
</FRAMESET>
</HTML>

what is wrong

shawnp40
06-22-2008, 03:44 PM
Guys...I need help.

I have tried everything but I cannot get getURL to target a frame. (I've read all the threads).

1) Using FLASH 9.0 using AS 2.0 (Adobe CS3)
2) Using DreamWeaver CS3 with vanilla Framset

<frameset rows="100,*" frameborder="yes" border="10" framespacing="10">
<frame src="top.html" name="topFrame" scrolling="No" noresize="noresize">
<frame src="frame1.html" name="main">
</frameset>

3) In my AS I simply use:
on (release){
getURL("frame1.html", target="main");
}

...i've also tried removing the target=

on (release){
getURL("frame2.html", "main");
}

Neither works....any help would be much appreciated. (they also pop a new screen)

Attached in my FLA project and HTML frameset. Any takers?

NTD
06-22-2008, 08:29 PM
Hi,

It has been quite some time since I have dealt with frames, but I seem to recall the second parameter shoudn't be a string......and using the name "main", I seem to recall an issue with that being a reserved keyword somewhere, but might be mistaken about that. Anyway, try...


on (release){
getURL("frame2.html", main);
}


Also keep in mind that if using a browser that supports tabbed browsing, you might need to adjust the browser settings as to how links are managed. If you want to load content without changing pages, you can look into the loadMovie method with Flash.

Hope it helps
NTD

bradsmokes
05-06-2010, 06:16 AM
sounds good to me :):)