Loading specific flash movies for specific pages

This is a discussion on "Loading specific flash movies for specific pages" within the Flash & Multimedia Forum section. This forum, and the thread "Loading specific flash movies for specific pages are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 22nd, 2007, 16:29
New Member
Join Date: May 2007
Location: Indiana
Age: 24
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Loading specific flash movies for specific pages

Hi! Here's what I'm trying to achieve - I want a single flash movie to load other specific flash movies with a specific page of my Web site loads. For example, train.swf would load when train.html loaded, and car.swf would load when car.html loaded.

Is this possible?

I'm trying to avoid just place seperate movies on the seperate pages as I want this to function in a template.

Any help is appreciated! Thank you!
Reply With Quote

  #2 (permalink)  
Old May 22nd, 2007, 16:51
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: Loading specific flash movies for specific pages

Yes it is possible. Give me a few minutes to find you a resource. About to go to lunch and I am hungry!
Last Blog Entry: Yay!? (Oct 8th, 2007)
Reply With Quote
  #3 (permalink)  
Old May 22nd, 2007, 16:55
New Member
Join Date: May 2007
Location: Indiana
Age: 24
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Loading specific flash movies for specific pages

Thank you for your reply! Take your time!
Reply With Quote
  #4 (permalink)  
Old May 22nd, 2007, 17:23
Multimedia Specialist
Join Date: Apr 2007
Location: Arizona
Age: 25
Posts: 666
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Sgaspar11
Re: Loading specific flash movies for specific pages

Alright, you ready for this? I built something like this for our company website that dynamically loads in different skylines depending on which or our markets sites the user goes to(the asp in the actual renderring of the page sets the variable)...but we can force the variable on the page. This same concept will work with .swf's but I will explain on drawback that I am not sure how to fix on your end.

First the HTML/Embed information:

You need to declare the FlashVars on your page, and set the value of a variable.(which we will define and call later in the actual flash file.

Here it is:
Code: Select all
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub...ersion=8,0,0,0" width="500" height="160" id="test" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="FlashVars" value=ShortName=home" "/>
<param name="movie" value="070215-test1.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="test.swf" quality="high" bgcolor="#ffffff" width="500" height="160" name="070215-test1" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" FlashVars="ShortName=home" />
</object>
You would then change the "home" to the appropriate page name, aka. aboutus, contact, gallery, etc...for each page.

Now in the flash file. There will need to be an empty movieclip named let's say "test_mc".

Actionscript will look like this:

Code: Select all
 
//pull in variable from website home, aboutus, contact, etc
var ShortName:String = _level0.ShortName;
 
//pull in page specific .swf this code creates the content path and grabs the ShortName variable off of the html page which we delcared a flashVar for and puts it into _root(main timeline)test_mc(empty movieclip)
loadMovie("http://scottgaspar.com/flash/ + ShortName + ".swf", _root.test_mc);
Make sure to change this path: http://scottgaspar.com/flash/ + ShortName + ".swf - to whatever your file directory is for it to work.

There you have it!

Drawbacks - I'm not sure if you will have this issue but internet browsers cache flash files fairly hard, so what might happen is that since the flash file is actualy the "same" file with just a peice of the file being loaded externally. It may cache the first page you go to(home) with that specific .swf and any other page you go to may load that exact same .swf since it is cached...make sense?

You'll have to test it out and let me know.
Last Blog Entry: Yay!? (Oct 8th, 2007)

Last edited by Sgaspar11; May 22nd, 2007 at 17:26.
Reply With Quote
Reply

Tags
movie loading

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Get value from specific cells yuenli JavaScript Forum 0 Jun 27th, 2007 09:12
Loading external movies typeofdoug Flash & Multimedia Forum 4 Mar 7th, 2007 19:43
Resolution specific delivery Mike Henson JavaScript Forum 9 May 15th, 2006 11:36
Specific Linking daygon Web Page Design 4 Apr 29th, 2006 20:03
css div percentages and loading content in specific divs antonyx Web Page Design 3 Dec 24th, 2005 15:45


All times are GMT. The time now is 19:45.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43