|
Prev: Flash in Mac Widgets
Next: Strange error?
From: -pk- on 26 Jan 2006 18:02 I'm trying to do a nav bar (with one big photo) for a website and the idea would be to have the photo change depending on where you are at in the site. For instance, about us would have photo a, contact would have photo b, etc. I think that this nav is likely to change, and if it is ONE .swf file, that's only one place to change it and it's updated site wide. The trouble is that if I'm only using one .swf, then when I go to contact us, the .swf has no way of knowing where you are at in X document. I hesitate to use frames, which would be a workaround, but can't figure out how else to do this. I was hoping that someone would know a way to teach the flash movie if I'm here (i.e. about us) then I display this photo, but If I'm here (i.e. contact us) then I display this other photo. That would be the ideal solution, but I don't know how to do this, or even it it's possible. Anyone able to help? Much appreciated if you have any bright ideas here.
From: oceanfeeling on 26 Jan 2006 18:54 Hi there, You can use a movie clip where you will place you nav buttons in there. Let's say you name it nav_mc and inside this clip there for i.e. the aboutus_mc which acts like a button Also, create an empty movie clip in the library On the stage, place the nav_mc at the top and the holder mc somwewhere beneath. Then, in a proper frame you can place the following script nav_mc.aboutus_mc.onRelease = function() { _root.holder.loadMovie("imageA.jpg"); } Write the same for the other buttons too. This way, when the user hits a button, the proper image will load in the holder movie clip. I hope it helps
|
Pages: 1 Prev: Flash in Mac Widgets Next: Strange error? |