# Preloader & transition query

**URL:** <https://forum.kirupa.com/t/preloader-transition-query/292999>\
**Category:** Uncategorized\
**Created:** [July 21, 2009, 9:38pm UTC](https://forum.kirupa.com/t/preloader-transition-query/292999 "2009-07-21T21:38:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xeophex](https://avatars.discourse-cdn.com/v4/letter/x/c37758/32.png) [@Xeophex](https://forum.kirupa.com/u/Xeophex)\
**Post date:** [July 21, 2009, 9:38pm UTC](https://forum.kirupa.com/t/preloader-transition-query/292999/1 "2009-07-21T21:38:51Z")

</div>

I’m using a ‘percentage and bar’ preloader from the following tutorial: [http://portfolio.sticktacular.com/resource.php?creation=224](http://portfolio.sticktacular.com/resource.php?creation=224)

```auto

[COLOR=#333333][COLOR=#0000FF]bytes_loaded = Math.round(this.getBytesLoaded());
 bytes_total = Math.round(this.getBytesTotal());
 getPercent = bytes_loaded/bytes_total;
 this.loadBar._width = getPercent*100;
 this.loadText = Math.round(getPercent*100)+"%";
 if (bytes_loaded == bytes_total) {
 this.gotoAndPlay(3);
 }[/COLOR]
[/COLOR]

```

I want a transition to play out after the whole thing’s preloaded, _but only if it has to preload_. So if it has already been loaded into the viewers cache it will check if it’s already preloaded and skip ahead, bypassing the ‘loaded’ transition.

I suspect this is possible and fairly commonplace, but with my existing knowledge, I’m trying to get my head around how. If anyone could shed any light on this, I’d be very grateful!

Regards,
