This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Flash Site Design > September 2006 > Flash buttons & Iframe
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Flash buttons & Iframe
|
|
| Anime_Hermit 2006-09-02, 3:20 am |
| Hello, adobe users. I'm new to this forum. Okay, now since I got that out of
the way, I'll go on about my question.
I'm making a website. Hybrid Flash and HTML based. I've been trying to make
buttons in flash that would target an IFRAME in HTML. I was told to simply use
getURL and change the target to the name of the IFRAME. It didn't work. I tried
to do other things as well. No luck. I'm using Flash Pro 8, which I'm quite new
to. Is it possible to make a flash button target an IFRAME? Flash Help won't
give any info about it. Thanks if you can help. Well, here's another thing I
tried. Can anyone tell me why this doesn't work?
//this goes on your button
on (press) {
loadInFrame("pages/music.html");
}
//This goes on a frame in the same timeline as your button
function loadInFrame(html) {
// Note the capital letter. should be lowercase
getURL(html, "main");
}
| |
| _Chewtoy_ 2006-09-05, 6:26 pm |
| Well I'm new to answering people's questions so I hope this helps:
With regards to the IFRAME, does it have an ID="somename" as well as
NAME="somename"?
If you can't seem to target it like that, you could use a little JavaScript:
getURL("javascript:yourjsFunc('iframe', 'target');
the javascript in your page would probably look a bit like this*:
function yourjsFunc( target, targetURL ) {
var justlikemagic = document.getElementById( target );
justlikemagic.src = targetURL;
}
*this is just example code and may not work cos I'm just writing it off the
top of my head.
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|