How can I do this

hi everyone,

I’m making this site (see link) and I want to do it in actionscript rather than how I’m doing it at the moment…i.e motion tweening.

So before you look I’ll explain…when you click a thumbnail the white line moves across to the right and and then comes back to reveal the image and then it happens again when you click another thumbnail…

I suppose the line needs to have an actionscript to the thumbnail to make it go to a; the far right and then to b; the edge of the image on the left and then again for another image a; then b;…

hope this makes sense…and hopefully you can give me some help!!

link

hi postatomic,

I can’t tell you EXACTLY how to do it but i think you should create a rectangle mc. In frame one it has a width of 0.1 and in the last frame it has a normal width. Add a shape tween and a stop action inthe first frame.
Place this mc over the picture mc. In the first frame of the movie(not the mc) add- rectanglemc._visible=0
When the user cliks the button add-

on(press){
rectanglemc._visible=1
rectanglemc.gotoAndPlay(2)
picturemc.gotoAndStop(whatever frame)
}
This is not the full code but i suppose you get the idea:thumb:

Kartik

42 views but only one reply??

well its a start…anymore ideas…does anyone know how to place a movieclip in a certain postion when you click a button…

Can you not make a movieclip got to position A and then to position B by use of actionscript…?

cheers

postatomic

Are your thumbnails buttons? If they are buttons you could use the on(release) function to send movie clip C back to the beginning or whichever frame for the start of that image.

If they are just movie clips themselves you could use the movieclip mousedown event and hittest to determine what is the appropriate jpg to display in movie clip C.

HTH
Liz

Thanks for the reply
Could you explain in a little more detail…I’m thick!!
When you mean send movie clip C back to the begining…what excatly do you mean…

I was hoping that you could make a actionscript box ( the green background) expand to the full length of the frame and then after that back to the edge of the image…Does that make sense…?

I can make a box change shape to a set size from clicking a button, so I suppose I wonder in theory could you make it shrink to a small size and then to a large size…so it has a two part sequence.

this is the link for the expanding boxexpanding box

If I can do that then maybe I could fix the original query…

cheers postatomic

Okay, here goes… I’m not very advanced myself yet so…

How many frames are in the main movie clip? Do you have say 36 12 for each motion tween of your images, or do you load the images dynamically?

I’m curious to see your original .fla to see exactly how you swap the images now (well, before trying to change to the action script).

If you have different frames for displaying each image then what you need to do is put a stop(); function call on the last frame of each motion tween so that once it displays the full picture it stops there.

Then the thumbnails need to be converted into movie clip or button symbols and have an on(release) function which sends the main movie clip to the first frame for that image.

This is probably as clear as mud so I’ll try with an example

main movie called myThreePics.fla
frame 1-12 is first image being shown
frame 13-24 is second image
frame 25-36 is third

thumbnail 1
on(release) {
_root.gotoAndPlay(1);
}

thumbnail 2
on (release) {
_root.gotoAndPlay(13);
}

thumbnail 3
on(release) {
_root.gotoAndPlay(25);
}

Hopefully I have not completely misunderstood what you’re attempting to do.

Liz