PDA

View Full Version : Is there a way fgor Flash to grab an idenitfier at the end of a url?


lelales
09-26-2004, 07:50 PM
I have a Flash Navigation and the rest is html.

The problem is that when I go to a new page, the navigation reloads.

I want the navigation to present a picture in reference to the page being displayed.

I could solve this by using tables but I prefer not to use tables.

Here's an example of a url (tkae note of the catid:)

http://robertbrunogallery.com/robertbrunogallery2/AboutUs.php?catid=6

Is there a way for Flash to grab the Catid and display a picture accordingly?

If so then how?

thanks

bas1c
09-26-2004, 08:06 PM
you could make a FlashVar that tells the flash what picture to display.

You need to give your movieclip instance names and export them for actionscript.
the instance names i use in this example is 1, 2, 3, 4 etc...

in your html output:
<object>......
...
<param name="FlashVars" value="page=3"
<embed src="yourfile.swf"..... FlashVars="page=3" ....

</object>

and in the flash file you could add something like

_root.attachMovie(page,"new clip",100);


hope this helps.

Xeef
09-26-2004, 08:13 PM
a="http://robertbrunogallery.com/robertbrunogallery2/AboutUs.php?catid=6"
trace(a.slice(a.indexOf("?")+1,a.length));
trace(a.slice(a.indexOf("=")+1,a.length));

bas1c
09-26-2004, 09:29 PM
yes. it does make alot of sense. the bottom image should be the attachMovie clip in my example.

the only thing you need to do is to dynamically generate the html output via php.
if its catid=3 then the variables should be page=3 and if it is catid=6 it should be page=6.

if you have problems with the leveling you could just make a layer beneath the images that appear on rollover and load the movie inside that movieclip on stage.