Groups | Blog | Home
all groups > flash actionscript > may 2004 >

flash actionscript : Can a nice person help me with some script?


March4Revenge
5/5/2004 11:50:59 PM
Hi there,

So, I have this really complicated animation that I'm doing for a
photographer. In the photo gallery, when you click on a pic, he wants a
border around the pic to resize to the size of the pic you clicked on. I have
two types of pics in the gallery:

A) Portrait size (300 pxls high)
B) Landscape size (250 pxls high)

My problem is that I need to make Flash recognize [b]which type of pic has
been clicked and to play the appropriate border animation.[/b]

The fla. is attached with an explanatory wordpad doc.

Here is the script I have placed on the buttons for [b]Portrait Pics[/b]:

on (release) {
_global.Portrait = "press";
if (Portrait == "press") {
_root.holder.scenicpics_mc.gotoAndPlay("portrait");
} else if (port == "yes") {
_root.holder.scenicpics_mc.gotoAndPlay("pback");
} else if (scape == "yes") {
_root.holder.scenicpics_mc.gotoAndPlay("lback");
}
}
jmack007
5/6/2004 12:29:44 AM
Hello --

I have done this before but did it a different way.

I made an Xscale and Yscale attribute inside of an XML document with
references to the image to display.
I then used an enterFrame event to +- the _xscale and _yscale values
dynamically to make a frame/ transition animation to read in the incoming
dimensions of the picture called by a press.

--jmac
March4Revenge
5/6/2004 1:21:09 AM
Wow - I kinda know what you mean but a lot of that is over my head. I follow
you with the x and y scale but I'm not familiar with xml techniques. So, it's
difficuly for me to visualize this. Maybe you could elaborate because it
sounds more efficient.
March4Revenge
5/6/2004 3:08:48 PM
March4Revenge
5/6/2004 11:26:04 PM
AddThis Social Bookmark Button