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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a better sliding photo/menu tutorial?

Status
Not open for further replies.
Indeed!

Thanks - suprised I missed it I frequent Kirupa.com a lot in my travels for Flash knowledge...

Question, Im trying to use this to have 'buttons' that contain action script like

Code:
on( press )
{
	mcImage.loadMovie( txtImageURL.text );	
}

or

Code:
on (rollOver) {
	
_root.createEmptyMovieClip("container", 2);
loadMovie("image1.jpg", "container");
container._x = 150;
container._y = 150;
}

on (rollOut) {
unloadMovie("container")	
}


... but I cant get the image to load... what am I missing?

Thanks for the link to the tutorial!
 
try

mybtn.onRollOver = function(){
_root.createEmptyMovieClip("container", 2);
_root.container.loadMovie("image1.jpg")
_root.container._x = 150;
_root.container._y = 150;
}
code on main timeline (not on button) and button with instance name mybtn

if that dont work check the path to the image is correct and that the jpg is not progressive
 
I get this error... what should I nest the mybtn.onrollover function within?


heres the error I get:

Symbol=clip instance 1, Layer=Layer 1, Frame=1: Line 2: Statement must appear within on handler
mybtn.onRollOver = function() {

Thanks!
 
yep its on the main timeline but based on the error it appears (with my limited action script knowledge) that it needs to be within some on command of some type...

 
Take a look at my file - tell me what Im doing wrong... I was able get yours to work and added onrollOut function to make the image dissappear as well... but my movie still doesnt work using the same code.

note: buttons are named btn1, btn2, etc... btn1 is the one Im using in my efforts to get this to work though.


Thanks for all your help.
 
welcome back bill!

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top