does anyboy know how to do this? i think i need it to determine what web page your on so that button will become "lit also"
does anybody know what i mean and can help me?
thank you
depends on which method you want to take... there are two links in my footer that cover the sharedObject and the URL > FLASH links will helps.. also if you search there was a method posted on how to use the swfObject as well
launchpad76 posted in.. I was in the thread as well..
<script type="text/javascript">
var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
so.addVariable("variable1", getQueryParamValue("variable1"));
so.addVariable("variable2", getQueryParamValue("variable2"));
so.write("flashcontent");
</script>
will grab variables variable1 & variable2 from the URL/query string.. these will automatically be loaded/available in _root of your document once the movie loads.
either the javaScript way (like the URL > FLASH link in my footer) or the swfObject way (posted above)..
once you have done this the variable in the URL/QUERY string will be loaded and ready for you to use on _root. before you movie even starts.
heres a quick example..
1.) create your header/navigation FLASH movie.. so that it can accept a VARIABLE when the movieLoads..and then that movieClip will play/trigger (looking like its activated/down)
so make your nav... each button is a movieClip.. with two frames... both frames have stop actions.
frame 1: button text in BLACK
frame 2: button text in ORANGE
do this for all the buttons you want.
use this code in the main timeline:
if(_root.pageID == "home"){
link1.gotoAndStop(2);
}
if(_root.pageID == "about"){
link2.gotoAndStop(2);
}
if(_root.pageID == "email"){
link3.gotoAndStop(2);
}
save/publish your .swf & HTML page..
go to the HTML you just published and create a copy..
edit the source code and embed your .swf using this code..
Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>swfObject_varCheck</title>
</head>
<body bgcolor="#ffffff">
<!--url's used in the movie-->
<!--text used in the movie-->
<!-- saved from url=(007)about:internet -->
<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">
This text is replaced by the Flash movie.
</div>
<script type="text/javascript">
var so = new SWFObject("swfObject_varCheck.swf", "URL_varCheck", "395", "125", "8", "#FFFFFF");
so.addVariable("pageID", getQueryParamValue("pageID"));
so.write("flashcontent");
</script>
</body>
</html>
ok i tried really really hard to do this on my own, i feel like a pest. but anyway i cannot get the urls like that! i downloaded the file and uploaded it to my host i tried everything i could think of (without coding something) and nothing worked, on another forum i use for webdeveloping help i asked and what they game me didnt really help. thats like all i need and i think (until i start making my flash header) all i will need. do you think you can explain to me what im doing wrong, or should i just give up lol?
ok i tried really really hard to do this on my own, i feel like a pest. but anyway i cannot get the urls like that! i downloaded the file and uploaded it to my host i tried everything i could think of (without coding something) and nothing worked, on another forum i use for webdeveloping help i asked and what they game me didnt really help. thats like all i need and i think (until i start making my flash header) all i will need. do you think you can explain to me what im doing wrong, or should i just give up lol?
apparently you cannot edit a post on here, so i just wanted to say that i figured it out! can you believe it! i just needed to change one little thing, instead of having it search for the pageID i just set it what i wanted it to be right into the embed script.
thank you for all of your help!
Im not sure what the problem is..you arent giving us much..just 'cant do it' and 'wont work' basically..LOL
That header I uploaded works fine.. but it needs a variable in the URL...
the banner will do NOTHING unless it has a variable in the URL string called pageID
and pageID has to have the value of one of the pages coded in the .fla (home, about, email..etc)
I dont understand what you mean by:
but anyway i cannot get the urls like that! i downloaded the file and uploaded it to my host i tried everything i could think of
you just type that at the end.. thats all..
on all the buttons.. in FLASH.. and all the HTML links.. (basically any button or link that will change/load a new page) need to have the
?pageID=home
?pageID=about
?pageID=email
etc..etc..
at the end..
if you have your code on a FLASH button that looks like this:
apparently you cannot edit a post on here, so i just wanted to say that i figured it out! can you believe it! i just needed to change one little thing, instead of having it search for the pageID i just set it what i wanted it to be right into the embed script.
thank you for all of your help!
glad it all worked out...
you can do it either way.. (as mentioned in both links in my footer)