-
still having trouble with navigation
i have five different slideshow pages(swfs/html pages)... each has a buttons(movie clips) that i would like to link to corresponding pages to pull up the new slideshow page into _self... unfortunately when i've tried getURL it doesn't seem to work... i've done it using absolute and relative paths... i'm sure it's something silly and little that i'm missing...
if anyone has any ideas it would be much appreciated...
thanks...
-
FK's Geezer Mod
on(release){
getURL("http://www.yoursite.com/slide1.html", "_self");
}
-
oops i better explain myself a little better... each page has a bunch of code that makes buttons grow and shrink... using an array... a added the nav buttons to the array because i wanted them to have the simultaneous grow/shrink... there's a long long list of:
btn1.myMovie= "porpics/por1.swf"
btn2.myMovie and so on and so forth
and there's a doClick function and an activeBtn variable that tells the swf what to load at the end... to which i have added:
_root.holder.loadMovie(this.myMovie)
so that which ever button is pressed, the corresponding myMovie loads into the holder... (an empty movie clip created in ActionScript)...
this all works well except the nav buttons... i can't seem to get the path/code right to have them load the other html pages into _self...
i tried using porBtn.navMovie... and assigning a different action to navMovie than myMovie... but i'm obviously getting something wrong...
so any help would be great...
thanks in advance...
-
-
FK's Geezer Mod
The code is the getURL line I posted above. That is going to have to be there somewhere, whether you use a function to trigger the on handler or just regular button code.
-
I tried to put getURL in the list of "navMovies" and that didn't work... then i tried to put it in the function... i'm definately getting something wrong... maybe the path??? i put question marks in the code where i got lost...
here's the code:
onLoad (load("ckp_shared_lib.swf"))
// create an array of all nav buttons in group
var groupinfo:Array = [ocebtn1,ocebtn2,ocebtn3,ocebtn4,ocebtn5,ocebtn6,oc ebtn7,ocebtn8,
porbtn,landbtn,crbtn,contbtn];
// create constants to define start and stop of grow and shrink sequences
// (shrink should be exactly the same sequence as grow, in reverse frame order)
var GROWSTART:Number = 15;
var GROWSTOP:Number = 30;
var SHRINKSTART:Number = 31;
var SHRINKSTOP:Number = 45;
ocebtn1.myMovie= "ocepics/oce1.swf";
ocebtn2.myMovie= "ocepics/oce2.swf";
ocebtn3.myMovie= "ocepics/oce3.swf";
ocebtn4.myMovie= "ocepics/oce4.swf";
ocebtn5.myMovie= "ocepics/oce5.swf";
ocebtn6.myMovie= "ocepics/oce6.swf";
ocebtn7.myMovie= "ocepics/oce7.swf";
ocebtn8.myMovie= "ocepics/oce8.swf";
porbtn.navMovie= ?????
crbtn.navMovie= ?????
lantbtn.navMovie= ?????
contbtn.navMovie= ?????
// center photos and load first movie
var container:MovieClip = _root.createEmptyMovieClip ("container", 1);
container._x = 660;
container._y = 340;
var holder:MovieClip = _root.container.createEmptyMovieClip ("holder", 1);
onLoad(_root.holder.loadMovie(ocebtn1.myMovie));
container.onEnterFrame = function ()
{
holder._x = (-this._width / 2);
holder._y = (-this._height / 2);
};
// create a variable to track the currently selected button
var activebtn:MovieClip;
// doRollOver: start the rollover action or process,
// unless the button is currently selected
function doRollOver() {
if (this != activebtn) {
// if shrinking, send to corresponding frame in grow
if (this._currentframe > SHRINKSTART && this._currentframe < SHRINKSTOP) {
this.gotoAndPlay(GROWSTART + SHRINKSTOP - this._currentframe);
} else {
this.gotoAndPlay(GROWSTART);
}
}
}
// doRollOut: start the rollout action or process,
// unless the button is currently selected
function doRollOut() {
if (this != activebtn) {
// if growing, send to corresponding frame in shrink
if (this._currentframe > GROWSTART && this._currentframe < GROWSTOP) {
this.gotoAndPlay(SHRINKSTART + GROWSTOP - this._currentframe);
} else {
this.gotoAndPlay(SHRINKSTART);
}
}
}
// doClick: 1) return previously selected button to normal, 2) show visual
// indication of selected button, 3) update activebtn
function doClick() {
activebtn.gotoAndStop(SHRINKSTOP); // return previously selected to normal
this.gotoAndStop(GROWSTOP); // change appearance of selected mc
activebtn = this; // update pointer to current selection
// make each button correspond with each photo
_root.holder.loadMovie(this.myMovie);
??????????????
}
// assign functions to each event for each button in the group
function init() {
for (var mc in groupinfo) {
groupinfo[mc].onRollOver = doRollOver;
groupinfo[mc].onRollOut = doRollOut;
groupinfo[mc].onRelease = doClick;
}
}
init();
perhaps if it isn't easy i should just turn them into regular buttons and not have them as part of the array???
-
FK's Geezer Mod
Ya, I can't make sense of that. First try just adding the code I gave above to the button or movie clip. It might still work. It's not supposed to , but I've seen it work. Other than that, You'll have to just make it a regular button, unless someone else comes along who can hash out that code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|