-
Ok, I have spent the last few weeks looking over the boards on Javascript commands and using them to communicate variables and commands between 2 SWFs on an HTML page.
The only part of my work that I can't find answers to, is how to communicate between seperate frames. What I want is to be able to get a javascript command from one SWF in one frame, to a SWF in another HTML frame, so that I can make one movie respond to commands issued by the other.
Any help is appreciated as well are any resource SWFs and HTML pages.
-
Senior Member
-
Thanks for the help, SX. I have managed to get some of the stuff working that I wanted to, but I still have few problems.
For one, I can't find a list of the Flash-specific JS commands anywhere, not on Macromedia or Java Sun. I have a feeling such a list exists, but I don't know where to look.
Secondly, I am having a little bit of trouble with the setVariable flashscript command.
Code:
function setData(varName, varValue) {
mObject(mName).SetVariable(varName.toString(), varValue);
}
When I use it, it sets the variable in the swf I tell it to. The problem is it doesn't set it as a expression, so I can't use in mathematical calculations or expressions involving it. At present I am using TGotoFrame and using a frame in Flash to set the variable to the number I want it, but as the number of variables increases, this is becoming a pain. Do you have any thoughts as to what I can do to solve this, to make my variables an expression I can use, rather than one I can only display in text boxes?
-
Senior Member
grrrr.... i hate this... it just didn't send the whole post i wrote... check:
http://www.macromedia.com/support/fl...ingwithflash4/
those are methods that you will use mostly... there are few others, but don't have time now to write them all...
about second problem... try to use:
function setData(varName, varValue) {
mObject(mName).SetVariable(varName.toString(), Number(varValue));
}
although it should work without it...
hope it helps...
-
Thanks SX.
Your help has been invaluable.
You are da man, or, er, woman
-
Senior Member
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
|