Simo
Simo

Reputation: 57

SWF/FLA to HTML5 conversion = Slow animation

Hi there people so i've been trying to convert a .swf animation to html5 , it worked with flash pro cs6 and the Swiffy extension but the animation is slow very slow.

here is the original animation: http://alquilercochestanger.com/equipo.swf

an here is the converted http://www.alquilercochestanger.com/equipo.swf.html

What i do is :
1.Open the original swf file with sothink SFW decompiler
2.Export it to .fla (flash cs6 and flash 8 gave the same result) Actionscript2
3.open the fla with adobe flash pro cs6
4.export to html5 with swiffy

here is the log

  Swiffy Flash Extension for Win v1.1.1 [Swiffy v7.0.3]
    - Warnings -
    The ActionScript class Sound is not supported.
    The ActionScript method Sound.getVolume() is not supported.
    The ActionScript method Sound.setVolume() is not supported.
    The file includes complex animations which may be slow on mobile devices.
    - Info -
    Filters, blend modes and color-adjusted images may render slowly on mobile devices.
    Exported to: C:\Users\Admin\Documents\equipo\~equipo.swf.html

EDIT:

tried converting from swf to fla and then opening wiht adobe pro (publish preview) and it gave me the same error

so i think the answer may be to create the document from scratch

here is the action script

var activo = 0;
var my_profundidad = [0, -79, -54, -57, -61, -60, -70, -73, -47, -76, -51, -67, -83, -43, 14000, -100, 14500];
for (i = 1; i < 17; i++)
{
    this["keko" + i].swapDepths(my_profundidad[i]);
} // end of for
for (j = 1; j < 17; j++)
{
    this["keko" + j].boton.onRollOver = function ()
    {
        trace (this._parent.getDepth());
        this._parent.swapDepths(15000);
        cadena = this._parent._name;
        var _loc2 = cadena.split("keko");
        com.greensock.TweenMax.to(this._parent, 0.500000, {_xscale: 110, _yscale: 110, ease: com.greensock.easing.Cubic.easeOut});
        i = 1;
        if (i >= 17)
        {
            return;
        } // end if
        if (i != _loc2[1] && i != activo)
        {
            com.greensock.TweenMax.to(this._parent._parent["keko" + i], 0.500000, {colorTransform: {tint: 16777215, tintAmount: 0.500000}});
        } // end if
        if (i == _loc2[1])
        {
            com.greensock.TweenMax.to(this._parent._parent["keko" + i], 0.500000, {colorTransform: {tint: null, tintAmount: 0}});
        } // end if
        ++i;

    };
    this["keko" + j].boton.onRollOut = function ()
    {
        cadena = this._parent._name;
        var _loc5 = cadena.split("keko");
        this._parent.swapDepths(my_profundidad[_loc5[1]]);
        com.greensock.TweenMax.to(this._parent, 0.500000, {_xscale: 100, _yscale: 100, ease: com.greensock.easing.Cubic.easeOut});
        i = 1;
        if (i >= 17)
        {
            return;
        } // end if
        if (activo == 0)
        {
            com.greensock.TweenMax.to(this._parent._parent["keko" + i], 0.500000, {colorTransform: {tint: null, tintAmount: 0}});
        } // end if
        if (i == _loc5[1] && activo != 0)
        {
            com.greensock.TweenMax.to(this._parent._parent["keko" + i], 0.500000, {colorTransform: {tint: 16777215, tintAmount: 0.500000}});
        } // end if
        ++i;

    };
    this["keko" + j].boton.onRelease = function ()
    {
        this.enabled = false;
        this._parent.swapDepths(20000);
        cadena = this._parent._name;
        var _loc13 = cadena.split("keko");
        activo = _loc13[1];
        trace (activo);
        com.greensock.TweenMax.to(this._parent, 0.500000, {_xscale: 110, _yscale: 110, ease: com.greensock.easing.Cubic.easeOut});
        com.greensock.TweenMax.to(this._parent, 0.500000, {glowFilter: {color: 6710886, alpha: 1, blurX: 10, blurY: 10}});
        getURL("javascript:cargaPersona(\'" + activo + "\')", "");
        i = 1;
        if (i >= 17)
        {
            return;
        } // end if
        if (i != activo)
        {
            this._parent._parent["keko" + i].boton.enabled = true;
            this._parent._parent["keko" + i].swapDepths(my_profundidad[i]);
            com.greensock.TweenMax.to(this._parent._parent["keko" + i], 0.500000, {colorTransform: {tint: 16777215, tintAmount: 0.500000}});
            com.greensock.TweenMax.to(this._parent._parent["keko" + i], 0.500000, {_xscale: 100, _yscale: 100, ease: com.greensock.easing.Cubic.easeOut});
            com.greensock.TweenMax.to(this._parent._parent["keko" + i], 0.500000, {glowFilter: {color: 6710886, alpha: 0, blurX: 0, blurY: 0}});
        } // end if
        ++i;

    };
} // end of for

Anyone Who had the same problem?

Upvotes: 1

Views: 1012

Answers (1)

mikeziminio
mikeziminio

Reputation: 71

Try this: 1. Convert vector objects to bitmap. 2. Not use any external library. Use native Flash AS2 methods for animation.

Upvotes: 0

Related Questions