# Variables not working when strict data typing

**URL:** <https://forum.kirupa.com/t/variables-not-working-when-strict-data-typing/245607>\
**Category:** flash\
**Created:** [December 1, 2007, 7:30pm UTC](https://forum.kirupa.com/t/variables-not-working-when-strict-data-typing/245607 "2007-12-01T19:30:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![clubzero](https://avatars.discourse-cdn.com/v4/letter/c/ed655f/32.png) [@clubzero](https://forum.kirupa.com/u/clubzero)\
**Post date:** [December 1, 2007, 7:30pm UTC](https://forum.kirupa.com/t/variables-not-working-when-strict-data-typing/245607/1 "2007-12-01T19:30:13Z")

</div>

Have the following code that does’t work when angle and speed uses strict data typing. Hope someone can help me understand …

```php
 
init();
function init():Void{
angle = -40; // does't work if ''var angle:Number = -40;''
speed = 5; // does't work if ''var speed:Number = 5;''
ball = attachMovie ("ball", "ball",0);
ball._x = Stage.width / 2;
ball._y = Stage.height / 2;
}
function onEnterFrame():Void{
var radians:Number = angle * Math.PI / 180;
var vx:Number = Math.cos(radians) * speed
var vy:Number = Math.sin(radians) * speed
ball._x += vx;
ball._y += vy;
}

```
