LoadMovie using FlashVars

I thought I had a working solution to a question that I had, and I'm sure I probably have a partially correct solution gererously provided by Billysytx in another Thread.  Unfortunately it seems he may be away from his computer over the weekend, and I'm unfortunately on a deadline.

You can go over everything that is has been covered in the following thread:

 http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_21406303.html

Sorry to post this again, but I'm in a bind trying to get this done over the weekend.

Thanks so much,

JB
LVL 1
jb1013Asked:
Who is Participating?
 
BillystyxConnect With a Mentor Commented:
try this:
if (_root.slideshow == "calendar") {
     left.loadMovie ("calendar_left.swf");
     right.loadMovie ("calendar_right.swf");
     gotoAndStop(4);
     }
else if (_root.slideshow == "contact") {
     left.loadMovie ("contact_left.swf");
     right.loadMovie ("contact_right.swf");
     gotoAndStop(4);
     }
else if (_root.slideshow == "store") {
     left.loadMovie ("store_left.swf");
     right.loadMovie ("store_right.swf");
     gotoAndStop(4);
     }
else if (_root.slideshow == gallery) {
     left.loadMovie ("gallery_left.swf");
     right.loadMovie ("gallery_right.swf");
     gotoAndStop(4);
     }
else if (_root.slideshow == "moments") {
     left.loadMovie ("moments_left.swf");
     right.loadMovie ("moments_right.swf");
     gotoAndStop(4);
     }  // end if

(enclose the values in quotes)

Billystyx
0
 
blue-genieCommented:
what's not happening?
0
 
jb1013Author Commented:
There are external .swfs that are supposed to load into the two windows depending on which section of the site your in.  If you go to the Calendar page or the Moments page, there should be slideshows loading into to the black targets.  Thanks so much for looking at the thread, I'll be back in an hour.

For example its sort of working here:

http://www.themarquistheater.com/temp.htm

But this page I have not even set the FlashVars to tell it which .swfs to load, its just loading the first ones from the if statements for some reason.  One of the reasons I'm getting quite confused.

slideshow is the FlashVar in the object tag of the HTML.

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="760" height="200">
        <param name="movie" value="../header.swf" />
        <param name="quality" value="high" />
          <param name="bgcolor" value="#800000" />
          <PARAM NAME=FlashVars VALUE="slideshow=calendar"/>
        <embed src="../header.swf" Flashvars="slideshow=calendar" quality="high" bgcolor="#800000" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="760" height="200"></embed>
      </object>

Here's the if statements on line one of the timeline.

if (_root.slideshow == calendar) {
     left.loadMovie ("calendar_left.swf");
     right.loadMovie ("calendar_right.swf");
     gotoAndStop(4);
     }
else if (_root.slideshow == contact) {
     left.loadMovie ("contact_left.swf");
     right.loadMovie ("contact_right.swf");
     gotoAndStop(4);
     }
else if (_root.slideshow == store) {
     left.loadMovie ("store_left.swf");
     right.loadMovie ("store_right.swf");
     gotoAndStop(4);
     }
else if (_root.slideshow == gallery) {
     left.loadMovie ("gallery_left.swf");
     right.loadMovie ("gallery_right.swf");
     gotoAndStop(4);
     }
else if (_root.slideshow == moments) {
     left.loadMovie ("moments_left.swf");
     right.loadMovie ("moments_right.swf");
     gotoAndStop(4);
     }  // end if
0
 
jb1013Author Commented:
Thanks Billystyx,

Hope you don't thank I was getting too impatient by starting a new thread, I'm on a deadline to finish this before I leave for vacation so I was getting a bit worried that you might actually take a day or two off.  ;)

Anyway some more points for you.

Thanks so much, this was a great learning experience.  I have two more sites that I think I'm going to use the same method on.

Sincerely,

JB
0
 
BillystyxCommented:
Yeah, I spend too much time here as it is:)
Thanks for the points and good luck,
Billystyx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.