INTRO
I have a website I’m trying to create as a video tutorial site for World of warcraft players. I’ve succesfully integrated some flv files intot he site and load them with buttons currently. I found the design of my site limiting in space so I decided to create a menu that can scroll, and for future purposes have an infiniate number of additions put into it without using alot of manual labour.
See what I’ve got up and working so far at
http://www.zephn.com/wowmovies
THE PROBLEM
I’ve used this menu before to load webistes by opening new pages and loading a site into them. Works great at doing that. Now I’m trying to modify it to instead load swf movies into a specific clip. I’ve had some difficulty converting it. I apologize in advance for not knowing how to make code look all funky and organized like other posters do.
A basic set of source files can be found at
http://www.zephn.com/kirupa/azgul.zip
var menuItems = [“The Gates of AQ”,""];
var siteList = [“aq1.swf”,""];
////////////////////This is the new function I want to make work. I need it to load a .swf into a emtpy movie clip (see below for th eoriginal function)
for (i=0; i<menuItems.length; i++) {
var mc = container.dynamicButton.duplicateMovieClip(“button”+i, i);
mc.menuLabel.text = menuItems*;
mc._y = i*(mc._height-1);
mc.siteToLoad = siteList*;
mc.actualButton.onPress = function() {
///////////////////////////////I tired the below line and nothing happened.
_root.loadmovie.imagelist(siteToLoad);
///////////////////////////////I tried the below code and the screne blanked out.
_root.loadmovie (SiteToLoad,“imagelist”);
///////////////////////////////I tired the below code and nothing happened.
_root.imagelist.loadmovie (siteToLoad);
};
}
/////////////////////// This is the original function to open a seperate page and load a site
//for (i=0; i<menuItems.length; i++) {
// var mc = container.dynamicButton.duplicateMovieClip(“button”+i, i);
// mc.menuLabel.text = menuItems*;
// mc._y = i*(mc._height-1);
// mc.siteToLoad = siteList*;
// mc.actualButton.onPress = function() {
// openWinCentre(this._parent.siteToLoad, “TRPA”, 780, 640, 1, 1, 1, 1, 1, 1, 1);
// };
//}
///////////////This stuff is other various text controlling the menu components. Not sure if they affect much.
var speed = 20;
var scrollUpMax = mask._x;
var scrollDownMax = (mask._x-container._height)+mask._height+1;
MovieClip.prototype.scrollUp = function() {
container.onEnterFrame = function() {
this._y += speed;
if (this._y>=scrollUpMax) {
this._y = scrollUpMax;
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.scrollDown = function() {
container.onEnterFrame = function() {
this._y -= speed;
if (this._y<=scrollDownMax) {
this._y = scrollDownMax;
delete this.onEnterFrame;
}
};
};
up.onPress = scrollUp;
down.onPress = scrollDown;
up.onRelease = down.onRelease=function () {
delete container.onEnterFrame;
};