Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

directing a link to an inline frame in flame 8

Status
Not open for further replies.

astaylor

MIS
Mar 14, 2007
138
US
I am a beginner when it comes to this, so any bit of information will help. I know a normal link looks something like this:

getURL("link", "_self or _blank");

but i would like to direct a link to an inline frame inside of the page, instead of opening a new window or opening in the same window. Lets say the inline frame is called "inline." I have tryed:

getURL("link", "inline");

but that didnt work and i cant seem to find anything on the internet describing a way to do it.

Thanks in advance for any help.

-drew
 
<body>
<table width="*" border="0">
<tr>
<td width="300"></td>
<td width="10"></td>
<td width="562"></td>
</tr>
<tr>

<td colspan="4" align="center">flash code here</td>

</tr>
<tr>
<td colspan="2"></td>

<td><iframe src="index2.html" name="inline" frameborder="0" width="562" height="367"></iframe></td>
<td width="300"></td>
</tr>
</table>
<p align="center">&nbsp;</p>
</div>
</body>

That is how i have the page setup and i want the links from the flash movie to load into the inline frame. I get this error though when i have the link like this, "getURL("link", "inline");"


**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on handler
getURL("link", "inline");

Total ActionScript Errors: 1 Reported Errors: 1

Is there something i should add to my html or is there something i need to add to the flash script. Any ideas?

thanks

-drew
 
Well you certainly must correct your Flash code...

If you've use that code within a button symbol, you need something like...

on(release){
getURL("link", "inline");
}

Next, I'd at least add an id tag to your iframe...

<iframe src="index2.html" id="inline "name="inline" frameborder="0" width="562" height="367"></iframe>

And, I'm not sure you can have an iframe within a table?

Regards. FLASH HELP - OPENED FOR BUSINESS!
TO GET YOUR OWN FREE WEBSITE HOSTING
 
ok i dont get an error anymore within flash with

on(release){
getURL("link", "inline");
}

and i have added an id tag within my html to the iframe called "inline" like you suggested. What happens though is the link opens in a new window. I dont think having a iframe within a table is a problem because i have it working that way now and i can direct links within the html to the iframe. Its just trying to get it to work from flash thats the problem. Any other suggestions to get it from opening in a new window and into the iframe? Thanks again for all your help so far oldnewbie.

-drew
 
yes, i havent uploaded it to the internet yet. so my link looks something like

on(release){
getURL("contact.html", "inline");
}

I have all the files in the same folder and it does work with that code but it just opens the page in a new window.

btw i feel like an idiot for saying "flame 8." must have had something else on the mind. lol
 
oh i see what you mean now. Yes i am testing it through the .html and not through the .swf
 
figured it out. Had to have it uploaded to the web. It would not work locally on my computer.

thanks for your help oldnewbie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top