|
-
Help with actionscript for scrolling image gallery
I'm building a portfolio site with multiple picture galleries that are each in seperate .swfs and are called in when the user clicks on that gallery. I'm having a little difficulty with my actionscript though. (Using AS2)
I'll bring up one gallery, then scroll through a few images on it, and it works fine. Then when I pull up another gallery, the new one comes up on the same page number in the image sequence as the last one, and so on, like they are all connected somehow.
I think it has something to do with using "_root". Here is my coding:
On the image gallery strip of pictures that scrolls across, I have:
onClipEvent(enterFrame) {
_x += (_root.motionx - _x)/2;
_y += (_root.motiony - _y)/2;
_xscale += (_root.motionScale-_xscale)/5;
_yscale += (_root.motionScale-_yscale)/5;
}
On the buttons that control the picture strip, I have this code, with the x and y value changing accordingly:
on (release) {
_root.motionx = 281.2
_root.motiony = 210.3;
_root.motionScale = 100;
}
I have used this same code in all of the separate .swfs
Thanks for any help
-
Try relative paths: this, _parent, _parent._parent. etc.
read this
gparis
-
So I see why it's not wise to use _root now. I'm still not understanding how to incorporate _parent or 'this' into this code though. Do you have a link with info on these?
-
on the link i gave you, there's another one called 'understanding target paths'. You'll get the info there.
gparis
-
Error 404, page not found.
Do you have any other links explaining it?
Would I simply replace all instances of "_root" with "_parent"?
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|