# \[Flash 8\] 3d animation stops after 4 seconds

**URL:** <https://forum.kirupa.com/t/flash-8-3d-animation-stops-after-4-seconds/203485>\
**Category:** flash\
**Created:** [October 11, 2006, 1:32pm UTC](https://forum.kirupa.com/t/flash-8-3d-animation-stops-after-4-seconds/203485 "2006-10-11T13:32:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lolomedia](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@lolomedia](https://forum.kirupa.com/u/lolomedia)\
**Post date:** [October 11, 2006, 1:32pm UTC](https://forum.kirupa.com/t/flash-8-3d-animation-stops-after-4-seconds/203485/1 "2006-10-11T13:32:15Z")

</div>

[SIZE=2]Hello guys,

How can I make this 3d animation stop after 4 seconds?

Here is the code and I’m attaching the .fla so you can see what I’m talking about.

```
 ActionScript Code:
 [FONT=Courier New][LEFT][COLOR=#000000] **var** [/COLOR] sensitivity:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]2[/COLOR];

```

[COLOR=#808080]_//Sensitivity of movement_[/COLOR]  
[COLOR=#000000] **var** [/COLOR] followmouse:[COLOR=#0000ff]Boolean[/COLOR] = [COLOR=#000000] **false** [/COLOR];  
[COLOR=#808080]_//Turn with the mouse?(true or false) true = yes, false = no_[/COLOR]  
[COLOR=#000000] **var** [/COLOR] XRadius:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]220[/COLOR];  
[COLOR=#808080]_//How wide to make the X spread_[/COLOR]  
[COLOR=#000000] **var** [/COLOR] YRadius:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]50[/COLOR];  
[COLOR=#808080]_//How wide to make the Y spread_[/COLOR]  
[COLOR=#000000] **var** [/COLOR] Xpos:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#0000ff]Stage[/COLOR].[COLOR=#0000ff]width[/COLOR]/[COLOR=#000080]2[/COLOR];  
[COLOR=#808080]_//The X point to move around_[/COLOR]  
[COLOR=#000000] **var** [/COLOR] Ypos:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]300[/COLOR];  
[COLOR=#808080]_//The Y point to move around_[/COLOR]  
[COLOR=#000000] **var** [/COLOR] ballNumber:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]1[/COLOR];  
[COLOR=#808080]_//The number of the first ball_[/COLOR]  
[COLOR=#000000] **var** [/COLOR] perspective:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]100[/COLOR];  
[COLOR=#808080]_//Set the perspective, best between 0 and 150, varying with the Ypos_[/COLOR]  
[COLOR=#808080]_//However, it will require tinkering until you happy with it_[/COLOR]  
[COLOR=#000000] **var** [/COLOR] root:[COLOR=#0000ff]MovieClip[/COLOR] = [COLOR=#0000ff]this[/COLOR];  
[COLOR=#808080]_//Store the parent as the root variable_[/COLOR]  
[COLOR=#0000ff]MovieClip[/COLOR].[COLOR=#0000ff]prototype[/COLOR].[COLOR=#000080]setBall[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#0000ff]this[/COLOR].[COLOR=#000080]deg[/COLOR] = amount;  
[COLOR=#808080]_//Sets the starting degrees to the “amount” argument_[/COLOR]  
[COLOR=#000000] **var** [/COLOR] thisShad:[COLOR=#0000ff]MovieClip[/COLOR] = [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]duplicateMovieClip[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]“shadow”[/COLOR]+[COLOR=#0000ff]getNextHighestDepth[/COLOR]COLOR=#000000[/COLOR], [COLOR=#0000ff]getNextHighestDepth[/COLOR]COLOR=#000000[/COLOR], [COLOR=#000000]{[/COLOR][COLOR=#0000ff]\_alpha[/COLOR]:[COLOR=#000080]60[/COLOR], [COLOR=#0000ff]\_yscale[/COLOR]:-[COLOR=#000080]100[/COLOR][COLOR=#000000]}[/COLOR][COLOR=#000000])[/COLOR];  
[COLOR=#808080]_//duplicate it to make a shadow_[/COLOR]  
[COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]onEnterFrame[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#0000ff]this[/COLOR].[COLOR=#000080]ang[/COLOR] = [COLOR=#000000]([/COLOR][COLOR=#0000ff]this[/COLOR].[COLOR=#000080]deg[/COLOR] += COLOR=#000000[/COLOR]/[COLOR=#000080]100[/COLOR]_sensitivity[COLOR=#000000])[/COLOR]_[COLOR=#0000ff]Math[/COLOR].[COLOR=#0000ff]PI[/COLOR]/[COLOR=#000080]180[/COLOR];  
[COLOR=#808080]_//Rotate the angle_[/COLOR]  
thisShad.[COLOR=#0000ff]\_xscale[/COLOR] = [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]\_xscale[/COLOR]=[COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]\_yscale[/COLOR]=COLOR=#000000[/COLOR]/COLOR=#000000[/COLOR]_[COLOR=#000080]100[/COLOR];  
[COLOR=#808080]_//Scale the MovieClip depending on it’s position\*[/COLOR]  
thisShad.[COLOR=#0000ff]\_yscale[/COLOR] = -[COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]\_yscale[/COLOR];  
[COLOR=#808080]_//Scale the shadow_[/COLOR]  
thisShad.[COLOR=#0000ff]\_x[/COLOR] = [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]\_x[/COLOR]=[COLOR=#000000]([/COLOR]XRadius\*[COLOR=#0000ff]Math[/COLOR].[COLOR=#0000ff]sin[/COLOR]COLOR=#000000[/COLOR]_[COLOR=#000000]([/COLOR]followmouse ? -[COLOR=#000080]1[/COLOR] : [COLOR=#000080]1[/COLOR][COLOR=#000000])[/COLOR][COLOR=#000000])[/COLOR]+Xpos;  
[COLOR=#808080]_//Move along the X\*[/COLOR]  
[COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]swapDepths[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#808080]_//Put the depth to it’s Y scale_[/COLOR]  
thisShad.[COLOR=#0000ff]swapDepths[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#808080]_//Put the shadow’s depth to it’s Y scale_[/COLOR]  
thisShad.[COLOR=#0000ff]\_y[/COLOR] = [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]\_y[/COLOR]=YRadius\*[COLOR=#0000ff]Math[/COLOR].[COLOR=#0000ff]cos[/COLOR]COLOR=#000000[/COLOR]+Ypos;  
[COLOR=#808080]_//Move along the Y_[/COLOR]  
[COLOR=#000000]}[/COLOR];  
[COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]onRollOver[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#808080]_//The rollOver actions_[/COLOR]  
thisShad.[COLOR=#0000ff]gotoAndStop[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#808080]_//Set shadow to the rollOver Frame_[/COLOR]  
[COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]gotoAndStop[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#808080]_//Go to the rollOver Frame_[/COLOR]  
[COLOR=#000000]}[/COLOR];  
[COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]onRollOut[/COLOR] = [COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]onReleaseOutside[/COLOR]=[COLOR=#000000] **function** [/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
[COLOR=#808080]_//The rollOut actions_[/COLOR]  
thisShad.[COLOR=#0000ff]gotoAndStop[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#808080]_//Set shadow to the rollOver Frame_[/COLOR]  
[COLOR=#0000ff]this[/COLOR].[COLOR=#0000ff]gotoAndStop[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#808080]_//Go to the rollOut Frame_[/COLOR]  
[COLOR=#000000]}[/COLOR];  
[COLOR=#000000]}[/COLOR];  
[COLOR=#808080]_// \<!------ Note: This Is Automatic Spacing Only, Not required Otherwise [/COLOR]  
[COLOR=#0000ff]while[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
ballNumber++;  
[COLOR=#000000]}[/COLOR]  
[COLOR=#808080]//Scan for all ball Movie Clips_[/COLOR]  
[COLOR=#0000ff]for[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#000000] **var** [/COLOR] i:[COLOR=#0000ff]Number[/COLOR] = [COLOR=#000080]1[/COLOR]; i\<ballNumber; i++[COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]  
root[COLOR=#000000][[/COLOR][COLOR=#ff0000]“ball”[/COLOR]+i[COLOR=#000000]][/COLOR].[COLOR=#000080]setBall[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#000000]}[/COLOR]

bar.[COLOR=#0000ff]swapDepths[/COLOR]COLOR=#000000[/COLOR];  
[COLOR=#808080]\*//Put the bar’s depth to it’s 300000 \*[/COLOR]

[/LEFT]  
[/FONT]

Please help! ☹  
[/SIZE]
