| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Sep 2004
Posts: 3
|
hi.
new here, but not new to flash. hopefully you guys can help, this seems like a very basic problem and i'm just being an idiot. i'm on Flash MX (and a mac, if if matters). I'm looking for a script that will redirect to a certain frame of my movie based on the url of the page that the .swf is embedded. so on index.html we are at frame 1, but on nextpage.html it's frame 37. for example. any ideas? cheers. -j |
|
|
|
|
|
#2 |
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
|
how are nextpage.html and frame 37 connected? are you using a frame label to connect them?
__________________
tg --- what the hell was i thinking? |
|
|
|
|
|
|
|
|
#3 |
|
Me
|
on both pages same swf
on both pages this javascript: HTML Code:
<script language="JavaScript"> <!-- function throwURL(){ window.document.theIDofyirMovie.SetVariable('locationofpage',window.location); window.document.getElementById('theIDofyirMovie').SetVariable('locationofpage',window.location); } --> </script> HTML Code:
<body onload="throwURL();">
ActionScript Code:
that'll do it I guess...kick me in the head if it's not working and I'll get back to you - RubenEDIT: It might not be performing a 100% in all browsers, but most of them it'll work for... ![]() EDIT: I mistyped: gotoAndStop("goHere"); should be gotoAndStop(goHere); ![]()
__________________
. Originally Posted by MichaelxxOA "He sounded like he knew which words he was going to use before he knew what he was going to say. I hate that shit." Last edited by Ruben; 09-22-2004 at 10:42 AM.. |
|
|
|
|
|
#4 |
|
Registered User
Join Date: Sep 2004
Posts: 3
|
ruben, it doesn't seem to be working.
the only things i've "configured" are the IdofyirMovie part (which i've just typed in the id name - test) and a frame in my movie called goHere. am i missing something else to configure? would this be easier if you emailed me the .fla and .html? if it is, you can do that. christmashippo@yahoo.com cheers |
|
|
|
|
|
#5 |
|
Me
|
Excuse me for the bugs that were in the script, that's probably why it didn't function...
bugs: - I mistyped: gotoAndStop("goHere"); should be gotoAndStop(goHere); - The javascript function wasn't closed by a curly brace ( } ); sorry ![]() anyways, to make it up to you I attached a sample...I added you to my msn as well in case you've got any questions - Ruben
__________________
. Originally Posted by MichaelxxOA "He sounded like he knew which words he was going to use before he knew what he was going to say. I hate that shit." |
|
|
|
|
|
#6 |
|
Registered User
Join Date: Sep 2004
Posts: 3
|
hey ruben.
i have tried debugging the stuff on my own, but i cannot get it to work. and it should work - of this i am sure. i was able to look at the movie (in MX), and i see that there is an index frame and nextpage frame, but when i load the .html files i only see "loading location". maybe it's a mac thing. i've tried IE and Safari. also, i can't open movie.fla. did you protect it? again...this could be a mac thing. failing all of these options, i'll just say thanks for the effort, really appreciated. cheers |
|
|
|
|
|
#7 |
|
Me
|
movie.fla is an FMX04-file...so maybe that's what's why you can't open it...
I haven't tested this way of doing stuff in safari yet, so I don't know if it's safari that's causing the problem...I tested it in IE and Firefox and it worked alright in those (I'm pretty sure they function alright in Netscape as well)...I'm on a PC... Maybe someone else could try unzipping & testing the files I attached in my previous post? - Ruben
__________________
. Originally Posted by MichaelxxOA "He sounded like he knew which words he was going to use before he knew what he was going to say. I hate that shit." |
|
|
|
|
|
#8 |
|
Registered User
Join Date: Oct 2004
Posts: 1
|
Hi,
I tried Ruben's code and it works on Windows, but not Mac :( I found this code on another bulletin board and it worked great on Mac and Win! Just add the javascript below into the HTML page that contains the SWF file (you may want to change some of the settings, such as movie size) This will send a variable called "page" to the SWF file. You just need to create a Flash file with a dynamic field with a variable name of "page" or "/:page". Then publish the file, open the HTML generated by Flash, add the script below and view the HTML page (it works even from your drive). Code:
<script type="text/javascript">
<!--
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" id=main width=550 height=300>');
document.write('<param name=movie value="test.swf?page=' + window.location + '"> <param name=quality value=high> <param name=bgcolor value=#ffffff> <param name="menu" value="false">');
document.write('<embed src="test.swf?page=' + window.location + '" quality=high bgcolor=#ffffff name=main menu=false width=550 height=300 type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>');
document.write('</object>');
//-->
</script>
|
|
|
|
|
|
#9 |
|
Me
|
Thanks pers.com!
I'll try that one soon myself - Ruben
__________________
. Originally Posted by MichaelxxOA "He sounded like he knew which words he was going to use before he knew what he was going to say. I hate that shit." |
|
|
|
|
|
#10 | |
|
Registered User
Join Date: Aug 2005
Posts: 1
|
Quote:
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|