# Piece of code not working when exported to Player 7

**URL:** <https://forum.kirupa.com/t/piece-of-code-not-working-when-exported-to-player-7/151672>\
**Category:** flash\
**Created:** [June 17, 2005, 4:52am UTC](https://forum.kirupa.com/t/piece-of-code-not-working-when-exported-to-player-7/151672 "2005-06-17T04:52:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kolorvize](https://avatars.discourse-cdn.com/v4/letter/k/5f8ce5/32.png) [@kolorvize](https://forum.kirupa.com/u/kolorvize)\
**Post date:** [June 17, 2005, 4:52am UTC](https://forum.kirupa.com/t/piece-of-code-not-working-when-exported-to-player-7/151672/1 "2005-06-17T04:52:38Z")

</div>

Greetings.

I have a preloader code that gives me easing on the loadbar which makes a pretty nice effect, BUT… only when exported to Flash Player 6 (AS2)…

```auto

onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percentage -= (percentage-((loading/total)*100))*.25;
per1 = int(percentage);
load_bar._width = per1*1.5;
if (percentage>99) {
_parent.gotoAndPlay(2);
}
}

```

When i do export to Player 7 the bar doesnt move neither the movie plays to frame 2… on 6 works like a charm!

This would be fine to export always to 6 but then some other code stops working when i do it. :pa:  
I’m not much into deprecated code & all, so I really cant find the cause of incompatibility.

Maybe one of you gurus knows :tb:

Thanks in advance!

Jaime
