...

View Full Version : How to interpret this AS2 script, please?



SteveH
01-23-2008, 10:42 AM
Hello

I have bought a Flash template and I am trying to break it down, so to speak, so that I am able to customise it. I have asked the vendor, but they want to charge me huge chunks of money for what I would call snippets of information.

I have uploaded a screenshot of the file I would be grateful for help on.

http://www11.brinkster.com/stevehigham/coding.html

In the screenshot, next to Layer1 and Layer2 there are two small green icons (but they are not identical). What do they mean, please?

Then, when I on a thumnail (symbol 136), I can see the following in my Action Script panel.

onClipEvent(load) {
_root.scrollY=this._y;
_root.scrollN=1;
}
onClipEvent(enterFrame) {
a=((_root.scrollN-1)*121+_root.scrollY);
dx=a-this._y;
if ((dx<1) and (dx>-1)) {
dx=0;
this._y=((_root.scrollN-1)*121+_root.scrollY);
} else {
this._y+=dx/4;
}
}


What seems a little strange, is that although there is script in the Action Script panel, there is no little 'a' in the frame timeline.

Anyway, what does the code mean, please? In the movie, when I click on a thumnail, it takes me to a larger image. Is this larger image (or its location) indicated in the script above?

Many thanks.

Steve

gnomeontherun
01-24-2008, 12:28 AM
The actionscript has been applied directly onto the movieclip, and not on the frame. This means that it doesn't execute based on the timeline but rather on these onClipEvents (load or enterFrame which is deceptive).

What it does is hard to say, but it is changing the location properties (_y) of scrollY and scrollN.

If you double click on an item in the movie, if it has a subtimeline (like a movieclip) it will open up the timeline for just that item.

SteveH
01-24-2008, 02:38 PM
Hello Jeremy

Thank you for replying.

I will try double clicking on an item (in the movie or fla file?) and see if it gives me a subtimeline. I have MX 2004, not sure if that makes a difference.

What happens when I click on a thumbail in the movie is that it takes me to a larger image, so maybe the x and y etc in the script I posted, relate to resizing an image?

The difficulty I have is that the same text is applied to all images (which slide), so I might have a photo of Mariyn Monroe next to a text on beauty creams, then I will click on a thumbnail of say, a picture of Mike Tyson. That takes me to a larger image of him, but accompanied by the same text on beauty creams!!

Cheers again for posting.

Steve

sstalder
01-24-2008, 05:50 PM
In the screenshot, next to Layer1 and Layer2 there are two small green icons (but they are not identical). What do they mean, please?

Layer 2 is a "Mask" for Layer 1.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum