Log in

View Full Version : Changing IFRAME through menu created through "123 Flash Menu"



nayabsiddiqi
10-21-2007, 03:45 PM
Hi all,
can any one let me know if there is a way of changing IFRAME of my HTML through FLASH menu button, the menu is created in 123 Flash Menu.
In flash, getURL is the solution, but what if I need not to use that function.
Any way to change the button's LINK ?

Another thing is what is Target = _self?

Looking forward for response:)
Thanks

jscheuer1
10-21-2007, 04:08 PM
Target = _self

means quite literally what it says, open in the current window or frame. If you wanted to target a new window, use:

Target = _new

for a reusable new window, or:

Target = _blank

for a unique new window each time.

NOTE: New window targeting can and is sometimes blocked by the browser, resulting in no action being taken. The user is sometimes notified that a 'pop up' window was blocked.

With an iframe, if you give your iframe a unique name, ex:


<iframe src="whatever.htm" name="my_iframe_1" . . .

You can then target it:

Target = my_iframe_1

nayabsiddiqi
10-21-2007, 04:51 PM
Thanks for a quick response and providing Target Description.

Actually I need to change the SRC of that Particular IFRAME "home" through Flash Menu Button. I mean, I have my main page having Flash Menu, besides menu i have placed Frame. Now I need to change the SRC of my frame and let it be loaded whenever I click Flash Menu's button.

E.G. : I have About Us and Contact Us Buttons IN Flash Menu. Besides this menu, i have an iframe with the name "mainFrame", I need to change "mainframe" source and loads another source html within that frame by clicking either of the buttons.

This can be done through getURL if I made my menu in Flash, but as m using third party tool which doesn't provide this functionality.

Hope you gonna help me out!
thanks

jscheuer1
10-21-2007, 05:33 PM
OK, well the third party menu probably is still using getURL, as it is the most common method used by Flash to load a page.

If that is the case, and you have just the one iframe on your page, you could set the page's base target, and that should take care of it. Put this in the head after the title and any meta tags:


<base target="mainFrame">

If it works, all links will now open in that iframe unless they have a different individual target. It won't work if the flash menu links target _self.

Other than that, you would need a more flexible menu. Ordinary links on that page could still target the current window individually.

nayabsiddiqi
10-21-2007, 05:52 PM
It won't work if the flash menu links target _self.

Actually this is the case :). Any solution, there must be some solution other than Action Script.

Thanks John

BLiZZaRD
10-21-2007, 06:56 PM
You can use JavaScript (in the Flash and the HTML) or you can use FlashVars as a trigger event.

What exactly are you trying to change? Content? Must you use IFrames?

Also, use _parent instead of _self in Flash (for this example).

jscheuer1
10-21-2007, 07:08 PM
It won't work if the flash menu links target _self.

Actually this is the case :). Any solution, there must be some solution other than Action Script.

Thanks John

That's what I said, yes, unfortunately. Um, if you need to use Flash for the menu, editing the Action Script and recompiling would be the way to go. There are tons of other menus (css and/or javascript based) around though. Flash does have other drawbacks as a menu anyway. If I were you, I'd be looking around at other menus.

nayabsiddiqi
10-21-2007, 07:22 PM
Thanks John for your help :)
i'd be using css based menus :)
but will surely gonna find how actually would it be done

Take care

BLiZZaRD
10-21-2007, 07:40 PM
This is how it works...

in the HTML code:



<iframe src="page.html" name="content" width="???" marginwidth="0" height="???" scrolling="yes" frameborder="0"></iframe>


Change the "page.html" to your URL, and "content" to the div ID you need to use.

Then in your AS use this:



on (release) {
getURL("path/to/page.html","content");
}


again where path/to/page.html is the page you want to load, and "content" is the iframe ID.

it will NOT work locally, but once you upload it it should be just peachy.

:D