Javascript not working in Netscape with TGotoFrame

  • craig hirshberg
  • Born
  • Born
  • craig hirshberg
  • Posts: 4
  • Loc: Asheville, NC

Post 3+ Months Ago

I've built a site that uses javascript to control which frame of a Flash menu is displayed depending on which page it is loaded.

Problem: Not working in Netscape (I'm testing in Netscape 7.0), but works exactly how I want in IE.

Anyone pros out there have any ideas?

I'd like to toast the New Year knowing I don't have to deal with this anymore.

Thanks in advance, here's my code:

Code: [ Select ]

<script language="javascript">
function goTo(){
var movie = window.document.flashmenu;
movie.TGotoFrame('/',29);
}
</script>

<body onLoad="goTo()">
  1. <script language="javascript">
  2. function goTo(){
  3. var movie = window.document.flashmenu;
  4. movie.TGotoFrame('/',29);
  5. }
  6. </script>
  7. <body onLoad="goTo()">
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • mtheory
  • Beginner
  • Beginner
  • User avatar
  • Posts: 45
  • Loc: Branford CT

Post 3+ Months Ago

Is the frame number hard coded into the javascript in the different pages, or are you trying to pass a variable from the url string.

If it is the first then toss the jscript in the trash and simply hard code a variable into each different page within the swf embedment code.

example:

<param name="movie" value="yourmovie.swf?frameNo=29" />


If it is the second, then I would opt for a PHP solution to do the query string and pass the variable to the Flash movie.
The server-side scripting will be much more reliabe than javascript across the many browser/computer platforms.
  • craig hirshberg
  • Born
  • Born
  • craig hirshberg
  • Posts: 4
  • Loc: Asheville, NC

Post 3+ Months Ago

Thanks for the suggestions!

I think I've gotten in over my head on this one. I'm not passing any variables (because I don't fully understand how). I tried the hard code inthe embed tag, but nothing worked, even in IE.

Someone from another forum noted that it was a load problem, and made an example that worked in netscape, but when I applied it to my pages, it still didn't work.

The PHP thing sounds good, but I have no idea how to do it, which will require a lot more research - I'll consider that down the road.

I think I'm giving up at this point. It's really not that big a deal. I had no idea so many things need to be considered for cross browser/cross platform reliability.

I'm really disappointed in the web at the moment - I thought it was supposed to make communication easier! I'll stick with my full-time job of video production...at least there are more standards to follow.

Thanks again!
  • mtheory
  • Beginner
  • Beginner
  • User avatar
  • Posts: 45
  • Loc: Branford CT

Post 3+ Months Ago

Put this into the first frame of your movie

gotoAndPlay(frame);

With the hard coded variable in above post the movie will skip to frame 29.
  • craig hirshberg
  • Born
  • Born
  • craig hirshberg
  • Posts: 4
  • Loc: Asheville, NC

Post 3+ Months Ago

Genious!! That actually worked! Both cross-browser and cross-platform.

The only change I made was gotoAndPlay(frameNo);

and...

I had to hard code the ?frameNo=29 into both the value="" and the src="".

Thanks again for your help - I take back what I said about web standards. Now I have to go apologize in a separate forum as well - c-ya!

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 14 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.