PDA

Click to See Complete Forum and Search --> : movie changes sections according to the page, how??



Choudry Muhammad Amir
02-22-2007, 08:20 PM
Hi,
I need some help on tihs little issue, i just need to know how can i be able to make my swf capable of detecting what page is currently loaded ?

FOr example i have one swf containing four different sections linking to four different webpages and all those webpages contains this same swf file, then how it is possible to make the swf detect which page is loaded currently into the browser ??

Like page1.htm or page2.htm so that the swf file changes its section according to the webpage, so i will not have to create four different swf files for four different web pages.

Kindly please advice as i am stuck in my project :(

Amir

Genesis F5
02-23-2007, 02:16 AM
So, is it 4 different pages and they all use the same SWF file that needs to go to a specific area within the movie depending on the address, or is it one SWF that needs to load a page and then determine what's been loaded?

If it's the former, I'd suggest using FlashVars if you have four separate embeds for each page.

To use a FlashVar, put this into the HTML embed code: FlashVars="pagenum=1" . Then, in your SWF file, when the movie loads, call variable pagenum to determine what the page is.

whispers
02-23-2007, 05:30 PM
Hi,
I need some help on tihs little issue, i just need to know how can i be able to make my swf capable of detecting what page is currently loaded ?

FOr example i have one swf containing four different sections linking to four different webpages and all those webpages contains this same swf file, then how it is possible to make the swf detect which page is loaded currently into the browser ??

Like page1.htm or page2.htm so that the swf file changes its section according to the webpage, so i will not have to create four different swf files for four different web pages.

Kindly please advice as i am stuck in my project :(

Amir

as stated you could use flashVars to do this...

I think what you need to do is use a variable in the URL query string

page1.html?frameID=1
page2.html?frameID=2
page3.html?frameID=3

each one of these HTML pages each having the same .swf embded into them... when the page loads..the Flash movie 'reads' the frameID var in the URL string and does whatever the flash movie is supposed to do.. in this case, in this case go to a particular frame in the flashMovie...


if you are manually creating these pages.. and emebed the same .swf manually into each page.. you could just add the same frameID= flashVar to the embed code..and it will do the same thing...




<embed src="YOURMOVIE.swf?frameID=2" quality="high" wmode="transparent" bgcolor="#ffffff" width="365" height="142" name="MOVIE TITLE" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />

Choudry Muhammad Amir
02-23-2007, 06:51 PM
Thanks for the help guys.
Both of the methods are working perfect on HTML, but the situation in which i am is under PHP with Joomla, i am not familier with the PHP and Joomla, but i know that can do as the only thing is just to pass the variable from the php file to the swf and then the swf can perform particular action.

Just searching around for the way to pass the variable from php to swf under the JOOMLA cms :(


anyways, thanks a lot guys

whispers
02-23-2007, 08:48 PM
I dont anythign abotu JOOMLA.. and if you have a CMS..you might be limited to what you CAN do..

if you CANT embed the Flash movie using the embed code through your CMS or whatever.. then Im not sure what to tell you.

what does the ditor let you do?..just point & click?

Choudry Muhammad Amir
02-24-2007, 03:35 AM
take a look at this:

http://www.sonnenhof-texel.nl/joomla/


Here you will see a flash header, it is like when you click on any button, it goes up and stays there but due to the page reload, it goes back to the default position, means HOME, instead of showing the related page's button to be up.

I fixed the flash file and it is working perfect if we test it with the html file, but here in this joomla and php environment, i dont know where to put the code in php file :(
Also, when you go and see the links down there you will notice the links are like this:

http://www.sonnenhof-texel.nl/joomla/index.php?option=com_content&task=view&id=17&Itemid=30


I am soo much confused, please advice...


Amir

Choudry Muhammad Amir
02-24-2007, 03:44 AM
I have all those pages but they have no flash header, php is displaying header separately, when i go to the actual sources of these pages, i find no flash tags.

I need to know is it possible that i use javascript and define then get variable?? Instead of using FlashVars under the Flash tags ??

Because i think we can only define FlashVars under the Flash Tags. So, any way around ??


Regards,
Amir

whispers
02-24-2007, 12:05 PM
the URL way I mentioned would do that.. it uses the URL string like you have above..

http://www.sonnenhof-texel.nl/jooml...id=17&Itemid=30&frameID=3

put that in the link that calls the new page(s) and the first solution I provided will let the flash movie grab the var from the URL string...

however you STILL need to create the movie to USE that var correctly.. AND find the place WHERE the Flash Header is embeded into the PHP page.. as you need to embed the flash movie a special way..