Rounded TurnPage

 

The purpose is to simulate turning a page rounded using a script.
This example, based upon 2 images, is not so easy as you may think
We 'll use beginGradientFill and sprites.

⇒ animation ⇐

At first, download images.  

Mathematical basis

This is the framework you 'll get at bottom left corner of the stage.

tourne page

Basic variables :
     R : ray circle.
     xc : X-coordinate circle center.
Parameters reckoned :
     - Tangential point T.
      angle θ = 45°
     - point A
      distance = xT + yT

Creating Objects

1 - Set up general size of the scene 240x320 (any background color).
Frame Rate 100.

2 - Insert image organp1.jpg in the middle of the scene. ( Menu Insert / Image )

3 - Insert image organp2.jpg in the middle of the scene. ( Menu Insert / Image )
Toggle Target. Name it image2. Convert to Sprite.
Outline 'd look like

tourne page

Script

Method :
     - Hexadecimal colors for gradient.
     - Create empty clip named coin : CreateEmptyMovieClip
     - et up array ( should have same items number :
           colors, alphas, ratios.
     - set up an array to limt gradient sizes..
     - fill in : beginGradientFill
     - draw border.
     - end filling.

In Outline, select Scene_1. Enter the following script :

Et voilà, that 's it.
Of course, this example is pretty basic. It's up to you to place many images. It 'll be quite tough.

BTW : I took this pictures in South Arizona, close to Mexican border. (Organ Pipes Cactus Nat. Mon.)

 


Si vous aimez le site

 

Select a language if you need :


Page chargée en 0.004 sec.

Dernière Modification : Mer 25 Janvier 2017 8:56
Copyright © 1999-2017 Jean-Paul Molina Tous droits réservés.

to Google