bjv211
asked on
Actionscript for FLash to Fadein larger pics on MOUSE DOWN. 500 POINTS!!
I have the followin flash at http://homepages.nyu.edu/~bjv211 The FLA is http://homepages.nyu.edu/~bjv211/slide_rev.fla . I would like the photos to enlarge when you click on them and then go back when you click again. Any thoughts!!! thanks
Oops, i forgot
on(press){
if(_global.sized == 0){
this._xscale = 100;
this._yscale = 100;
_global.sized = 1;
}else{
this._xscale = 80;
this._yscale = 80;
_global.sized = 0;
}
}
on(press){
if(_global.sized == 0){
this._xscale = 100;
this._yscale = 100;
_global.sized = 1;
}else{
this._xscale = 80;
this._yscale = 80;
_global.sized = 0;
}
}
It is better to initialize the variable before use
Add this line beforehand
_global.sized = 0;
Vicker
Add this line beforehand
_global.sized = 0;
Vicker
ASKER
My flash file has moved...you can download my fla from http://homepages.nyu.edu/~bjv211/slide.fla I am trying to use the fadin and fadeout functions I defined in Scene1 layer actionscript on each movieclip when I click.
bjv211,
Change this:
onClipEvent (mouseDown) {
fadein(pic4_big);
}
to
onClipEvent (mouseDown) {
_root.fadein(pic4_big);
}
See if it helps~~ :)
Vicker
Change this:
onClipEvent (mouseDown) {
fadein(pic4_big);
}
to
onClipEvent (mouseDown) {
_root.fadein(pic4_big);
}
See if it helps~~ :)
Vicker
bjv211,
sorry~
It should be
onClipEvent (mouseDown) {
_root.fadein(_root.pic4_bi g);
}
That would be safer
However I found that the fade in function don't work
in this line
target.onEnterFrame = function()
I am thinking why is it like that~
Vicker
sorry~
It should be
onClipEvent (mouseDown) {
_root.fadein(_root.pic4_bi
}
That would be safer
However I found that the fade in function don't work
in this line
target.onEnterFrame = function()
I am thinking why is it like that~
Vicker
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Oh negatyve, you amaze me once again, and thanks to everyone else for getting this going...Negatyve you rock
ASKER
ok Negatyve, sorry to jump to conclusions, at first glance the fading was working, however if I click anywhere on the bar of movieclips the same picture comes up, it is not recognizing individual clips I assume?
I didn't know what kind of effect you are exactly trying to achieve. You want to fadein the proper image at the first click on the proper thumb, and then.....?
ASKER
thats correct and then fadeout on second click. To recap: The movie scrolls, the user clicks once on the image, it fades in the larger image and remains until the user clicks again?
Have you tried using the _xscale and _yscale property of the movie clip? You can have it something like this:
on(press){
if(_global.sized == 0){
this._xscale = 100;
this._yscale = 100;
}else{
this._xscale = 80;
this._yscale = 80;
}
}
try using that, you can change it to suit your needs.
--trigger-happy