root._width : ever bugged

 

- Create a new clip (size 400x400).

- Insert a dynamic text which frame is entirely inside scene.

- Clear the word 'text' in edit field.

- Enter txtdyn in field Name

- In Scene_1, write the following script :
onLoad () { txtdyn=_root._width; }
( we want to display the width of the scene, either 400 )

- Go now in tab Export
Toggle Mask off-stage objects

- Click menu File / Test / Test in player

You'll notice it's the correct value 400 which has been displayed.

- Now, move the dynamic text frame so that it goes outside the scene.

- Test again.

You'll notice it's an upper value which is displayed.

I broke up my mind during 1 hour to understand why a mathematical function didn't cross the (0,0) coordinate. This is why !

 


Si vous aimez le site

 

Select a language if you need :


Page chargée en 0.003 sec.

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

to Google