|
-
Phantom Flasher...
Hello,
Anyone know how to send variables to a flash movie?
If I have a normal HTML page and I click a link how can I also make the flash movie update??
Example: If I click on an HTML link to 'dogs' how can I get my flash movie to go to scene 'dogs', without using another flash movie?
I know how to use goto and other action script stuff in flash, but I have no idea of how to put variables in to flash???
If you are some kind of flash god then please let me know!!
If you have examples I'd love to receive them! [email protected]
Thanks in advance,
Markp www.arcade4.co.uk/guess
-
Phantom Flasher...
I'm still stuck with this!!!!
Anyone know where I might find the answer??
I could really do with some help here!
Thanks again,
Markp
-
Use Dreamweaver behavior! I copy this from help.
-----------------
Control Shockwave or Flash
Use the Control Shockwave or Flash action to play, stop, rewind, or go to a frame in a Shockwave or Flash movie.
To use the Control Shockwave or Flash action:
1 Choose Insert > Media > Shockwave or Insert > Media > Flash to insert a Shockwave or Flash movie, respectively.
2 Choose Window > Properties and enter a name for the movie in the leftmost text field. You must name the movie to attach the Control Shockwave or Flash action.
3 With the movie still selected in the Document window, open the Behavior inspector.
4 Click the plus (+) button and choose Control Shockwave or Flash from the Actions pop-up menu.
5 Choose a movie from the Shockwave Object pop-up menu.
Dreamweaver automatically lists all files ending in .dcr, .dir, .swf, or .spl that are in OBJECT or EMBED tags in the current document.
6 Choose to play, stop, rewind, or go to a frame in the movie. The Play option plays the movie from the current frame.
7 Click OK.
8 Check that the default event is the one you want.
If it isn't, choose another event from the pop-up menu. If the events you want are not listed, change the target browser in the Events For pop-up menu.
--------------------------------
That its .....
-
This is what I would do:
In calling web page:
--include something like this...
<A HREF="dogs.html?incomingvariable=dogs">go to the dogs</A>
In recieving web page:
--in HEAD...
<SCRIPT LANGUAGE="JavaScript">
function setFlashVar() {
var incomingvariable = "";
if (location.search.length > -1) {
var urlstr = unescape(location.href);
var start_incomingvariable = urlstr.indexOf("=",0) +1;
var end_incomingvariable = urlstr.length;
var incomingvariable = urlstr.substring(start_incomingvariable, end_incomingvariable);
}
window.document.dogs.SetVariable("var", incomingvariable);
}
</SCRIPT>
Make sure to include <BODY onLoad="setFlashVar()">
In Flash movie:
--create a simple loop that checks for the value of "var" and goes to the appropriate frame.
Couple of hints...using the SetVariable function requires alterations to both the OBJECT and EMBED tags. You can search for "passing variables" or maybe just "variables" on the macromedia flash page.
BTW--how much were you actually betting that this couldn't be solved? :-)
Kory
------------------
-
Phantom Flasher...
Hi!
First of all let me thank you two geniuses of flash/dw! I bow down to your supreme godly ness :¬)
But, I am using my flash file as a menu system... so the menu is in a separate frame :¬( I can't seem to get the page to update the other frame with the flash movie in it?
I've tried 'open in frame' in dreamweaver and still can't get it to work???
Thanks for all your help, so far!
When I reach the dizzying heights of flash stardom, as you two seem to have done, I might be able to return the favour one day! :¬)
Thanks again,
Markp
P.S. I do lots of music stuff so if you need any custom sounds/audio tracks for your flash projects, let me know. http://www.mp3.com/markp
-
handling frames is fairly easy, as far as passing javascript variables go. just make sure you name the frames and you can reference variables in each frame by:
framename.document.itmename
of course it will be a little more complicated than that to get your variables working with flash, but you should be able to do it without much work.
-sean
-
About the setvariable of Javascript:
This can not work on IE for Mac. That's why I am here looking for some work around.
Wolf Ding
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
|