View Full Version : Flash button to change html page in a different frame...
fleaguru
04-25-2005, 01:15 AM
Ok, the more I think about this, the more I'm not sure it can be done, so I thought I'd stick it up here to see what you guys think.
Got a flash navigation in one frame, which I'm trying to have the menu buttons change the html page. But I need it to change the html page in a different frame of the frameset.
Is this possible, and if so what would be the actionscript I need to apply to my getURL be?
Would this work? getURL("news.html", bottomFrame)??
Many thanks...
Rossman
04-25-2005, 01:27 AM
You would probably need to create a Javascript function that would change the html in the secondary frame, and then call that from your SWF. That's my first thought, anyways.
Well, I have the same problem and somebody posted something about java too but i can't get it working... How should i write the Java code in my webpage to make it work?
In the other post they said (see below) but my problem is creating the java script!!!!
------
write a script in your button:
on(release){
getURL ("yourHTMpage.html", "yourFrameName");
}
But to target a MC in another frame you would need javascript in your html page, I'm not sure off the top of my head but you can do this:
on(release){
getURL ("javascript: your script here ", "yourFrameName");
}
__________________
just another flash designer
and teamaker
SoperMan
02-05-2008, 01:56 AM
Thanks for the js tip. I've been delaying learning js for some time now and you've given me the final push.
Evedently when I published the swift, flash did create an external js file, but I guess to really get things working, I'll actually have to get going on js.
Thanks for your replies.
Terry (Dennis) Soper
SoperMan
02-05-2008, 03:24 AM
Found a non javascript solution
--------------------------------------------------------------------------------
It's kind of complicated, but works.
I tested it using flash cs3 and dreamweaver 8
1. Create your dreamweaver site, and create your index.html file you want to add your flash movie to.
2. Create your flash movie and publish settings to the dreamweaver site folder. Publish
3. After you publish, navigate to the dreamweaver site folder and doubleclick the swf file. Press on a button.
You should get a security warning that says "flash player has stopped a potentially unsafe operation"
4. Click settings to go to the flash player settings manager.
5. Add your local swf file location to trusted locations
6 Restart the swf application and click a button.
7. The swf file should be working, and if your set flash cs3 to create an html, it should work too.
8. To center everything nicely, use dreamweaver to add your flash content. Note: if you are using dreamweaver to add your flash content, you don't need the js file that flash cs3 generated, just use the index.html file that you created in dreamweaver.
It's complicated and probably won't work for everyone, but it worked for me. Excuse me while I put my js video back on the shelf.
Terry Dennis Soper
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.