# Unchecking 'Export in first frame' glitch..?

**URL:** <https://forum.kirupa.com/t/unchecking-export-in-first-frame-glitch/258537>\
**Category:** flash\
**Created:** [April 24, 2008, 8:04pm UTC](https://forum.kirupa.com/t/unchecking-export-in-first-frame-glitch/258537 "2008-04-24T20:04:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iceflyin](https://avatars.discourse-cdn.com/v4/letter/i/9de053/32.png) [@iceflyin](https://forum.kirupa.com/u/iceflyin)\
**Post date:** [April 24, 2008, 8:04pm UTC](https://forum.kirupa.com/t/unchecking-export-in-first-frame-glitch/258537/1 "2008-04-24T20:04:00Z")

</div>

Flash CS3-AS3. In order to get my movie to preload correctly… I unchecked ‘Export in first frame’ on all my game elements, and set my export frame to 2 in publish settings.

I get this error…

ReferenceError: Error #1065: Variable defaultGameTile is not defined.  
at global/flash.utils::getDefinitionByName()  
at farmGame\_fla::MainTimeline/addTile()

```auto

function addTile(i, cellX, cellY, tileType) {
    var newTile = new (getDefinitionByName(tileType))();
    game.addChild(newTile);
}

```

If I check ‘Export in first frame’, the error goes away… What gives? My game is on frame 2, I even tried frame 3…

Edit: Tried creating a class to make sure it wasn’t a problem with flash not generating classes. Didn’t help. 😕 Is it a problem with getDefinitionByName needing stuff to be exported in first frame???

This technote didn’t help… My movie doesn’t skip the export frame.  
[http://kb.adobe.com/selfservice/viewContent.do?externalId=kb401348](http://kb.adobe.com/selfservice/viewContent.do?externalId=kb401348)

Why are my classes missing unless they are exported in first frame… ahhhhhhhhhhhh Ahhhhh! _tears hair out_

Note: I even set the publish setting to export in frame 1 and my classes are missing, however if the box is checked on the movieclip in the library… They work??? Wtf…
