         if (!_toPublish.add(movie)) return;
         for each (var layer :LayerMold in movie.layers) {
             for each (var kf :KeyframeMold in layer.keyframes) {
-                function adjustPivot (tex :SwfTexture) :void {
-                    // Texture symbols have origins. For texture layer keyframes,
-                    // we combine the texture's origin with the keyframe's pivot point.
-                    kf.pivotX += tex.origin.x;
-                    kf.pivotY += tex.origin.y;
-                };
+                var swfTexture :SwfTexture = null;
                 if (movie.flipbook) {
-                    adjustPivot(SwfTexture.fromFlipbook(this, movie, kf.index));
+                    try {
+                        swfTexture = SwfTexture.fromFlipbook(this, movie, kf.index)
+                    } catch (e :Error) {
+                        addTopLevelError(ParseError.CRIT, "Error creating flipbook texture from '" + movie.id + "'");
+                        swfTexture = null;
+                    }
+
                 } else {
                     if (kf.ref == null) continue;
                     kf.ref = _libraryNameToId.get(kf.ref);

// Flump - Copyright 2013 Flump Authors

package flump.xfl {

import flash.filesystem.File;
import flash.utils.ByteArray;
import flash.utils.Dictionary;

import com.adobe.crypto.MD5;

import flump.SwfTexture;
import flump.Util;

import flump.mold.MovieMold;
import flump.mold.TextureGroupMold;

public class XflLibrary
{
    use namespace xflns;
