In this example we are going to work with both images and get Image2 to expand and sqeeze Image1 basicaly a combination of Shrink Right to Left and Stretch Right to Left. First I am going to set the initial possitions and also change the properties of the 2 images so that both images are stretched to fit the size of the image controls.
All we have to do is stretch Image2 and shrink Image1 at the same time moving Image2 left.
Notice that I use the width of the layout control Layout1 to calculate the decrement value. This is because it is the only static value available. Image1/2.Width changing each IeTimer1 is called. You could enhance the timer routine to display random images on each face of the fake rotating cube. To do this you need to declare an array variable outside of any routine and fill it with your images. It can be any size but for simplicty I will make it 3 images big. Obviously though with 3 images it will not be very random.
What happens here is that instead of dissabling the timer at the end, the image on Image2 (the big one) is put on Image1(the little one), a random image is set on Image2 and the OnLoad routine is called to reset the image controls to their initial state (making Image1 big). |
© 1997 Chris Bayes For ClubSBN. All Rights Reserved.