Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

need help to activiate the buttons on a menu scroll??

Status
Not open for further replies.

tippytarka

Programmer
Jul 19, 2004
115
GB
i successfully created a scroll menu from a tutorial... but the tutorial failed to instruct how to apply the geturl to each button.

the menu vertically scrolls with a mouse over.... each button was placed into a movie clip and the actionscript scrolls the movie clip. but where do i place the getURL on each button... i've played around a bit but no success??

i've attached the zipped .fla files for your assistance.... please help!!!


tek_tip_video.fla (saved as flash mx 2004)
tek_tip_video2.fla (saved as flash mx)

the idea of the button getURL is to launch a centered pop up html window that plays a quicktime mov. you'll see the actionscript for this inside the files

i'm trying to activate the first button 'fallacy', and you'll find the small video file for this inside the folder 'video'

cheers!
 
had a very quick look at the mx version

havent tried any of this but suggest but suggest you give the button instance names of the full url you wish to call then add to main timeline

Button.prototype.onRelease = function(){
getURL(this._name)
}

just adapt the getURL statement to your needs

dont see any reason why the above wont work
 
hi bill, do you know how i would adapt your code around mine? .... my code opens a pop-up window...

this is what i place on the button...

Code:
// open centred pop up window
on  (release)  { 
address  =  "videos/fallacy.php";
target_winName  =  "nomad: fallacy";
width  =  176;
height  =  156;
toolbar  =  0;
location  =  0;
directories  =  0;
status  =  0;
menubar  =  0;
scrollbars  =  0;
resizable  =  0;
//sends data back to the function 
openWinCentre(address,  target_winName,  width,  height, toolbar,  location,  directories,  status,  menubar, scrollbars,  resizable);
}



and this is what i place on the actions window...

Code:
// pop up window
_root.openWinCentre  =  function (url,  winName,  w,  h, toolbar,  location,  directories,  status,  menubar, scrollbars,  resizable)  { 
getURL  ("javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open('" +  url  +  "','"  + winName  +  "','"  +  "width="  +  w  +  ",height="  +  h  + ",toolbar="  +  toolbar  +  ",location="  +  location  + ",directories="  +  directories  +  ",status="  +  status +  ",menubar="  +  menubar  +  ",scrollbars="  + scrollbars  +  ",resizable="  +  resizable  + ",top='+((screen.height/2)-("  +  h/2  + "))+',left='+((screen.width/2)-("  +  w/2  +  "))+'"  + "')}else{myWin.focus();};void(0);");
}
 
well at its simplest there is no need to alter the code i gave...assuming that the variables like height and width etc are the same then just use your getURL statement with the values you want hard coded and url replaced this._name


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top