-
Communicating between two flash frames
I'm having trouble figuring out how to accomplish the following:
There are three frames on the page, a header, footer, and body. All three are seperate .swf files. Now what I'm trying to do is when you click a button in the footer flash file. It tells the body flash file to basically do a gotoandstop(); command.
I believe there is a way to do this, however I'm not to familar with flash and frames.
Can anyone help, great thanks appreciated.
-
You're gonna' use a getURL Action. Something like:
on(release){
getURL("file_name","frame_name");
}
-
Senior Member
You could use a LocalConnection object to communicate between the movies (assuming you use MX or later),
try this thread for an example,
http://www.flashkit.com/board/showth...hreadid=481462
-
ok, but what if i want to use a javascript command location.href to pull back the html address. Now I need to pull back the URL into flash and display it on the screen in flash. NOTE - This is a one time process that only needs to take place when the page is loaded.
-
Senior Member
use javascript to write out the object and embed tags (document.write) and then supply location.href as the value of a variable in the flash vars parameter.
this thread has a similar example using location.search (instead of location.href)
http://www.flashkit.com/board/showth...ocation.search
-
ok, now I'm freakin out. I can't seem to get this to work, maybe because I'm not fully understanding. I have a web page with three frames, the middle frame is an asp page that returns the SQL database results. The variable RN is also a hpyerlink that opens another page with three frames as well but all three pages are flash this time. The URL appears as "http://192.168.0.174/app/v3/RDFrame.htm?RN=1002+"
ok so this is what I'm understanding so far... I have sent the variable RN from the orignal page to being in the URL of the frame page. So I have this URL in the address bar. I use the folloing javascript to obtain the URL and break it down for use in the program.
function RDFOPEN() {
var LOCO = location.href.split("?")
var FILE = LOCO[1].split("+")
var RN = FILE[0]
}
I tried using location.search but couldn't get it to work but location.href did. So now I set the variable, my question is this: Where do I put this script? Do I put it in "RD.html" which is the file in the middle frame? RD.html is the flash file that I need to read that variable to it can continue to play the movie, If I put this script in this file I would think that a simple trace() command would work becuase the variable is local but it is not working. I think I'm missing somthing. The SQL is working properly but the HTML/ASP, Flash are not..
I really appreciate your patience in helping me understand this. Thank you very much for your help so far.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|