PDA

View Full Version : controlling iframes



hojo
June 26th, 2003, 08:27 PM
can it be done? i've heard that fscommand can be used to control iframes, but haven't been very successful with it myself.

here's the setup:
[flash banner]
[i1] [i2]
[flash footer]

the navagation is controlled in "flash banner" changing "i1" (iframe 1) and "i2" (iframe 2).

heres the code i'm using on the buttons:
on (release) {
fscommand("parent.I1.location='home1.html'");
fscommand("parent.I2.location='home2.html'");
}


when pressing the "home" button on the nav, it loads home1.html in i1 and home2.html in i2 as listed above.

any help would be much appreciated, thanks :)

hojo
June 26th, 2003, 09:30 PM
please, this is destroying my time, i've spent countless hours trying to figure this thing out when it's probahly something small and stupid i'm doing wrong.

ahmed
June 26th, 2003, 09:36 PM
use getURL with 'target' set as the name of your iframe :)

hojo
June 26th, 2003, 09:50 PM
i'm using MX, what would the code look like for it using 'target'? i can't seem to get it to work...

yoritomo
June 26th, 2003, 10:14 PM
heres the code:

on (release) {
getURL("home1.html", "I1");
}


it will work, i tried it (wow my first helping)

-oh and can someone tell me how to post in actionscript format; i tried but when i pasted into the thing that came up it only pasted the first line...

aurelius
June 27th, 2003, 02:00 AM
To post in AS format, surround your code with "as" tags:
[*as]code goes here[/*as]
(only without the asterisks).

hojo
June 27th, 2003, 01:27 PM
thanks for replying guys :)

for some reason it's not loading anything into the frames below, here's what i'm talking about:

http://www.netvir.com/travis/index3.htm

the only one with the tested code is home and the site is still being worked on.

thebigcheese
June 28th, 2003, 04:52 PM
what you could do is have one iframe with a page that has w iframs in it -
but what everybody else was saying should work