Hello,
I am using AfterEffects to create a Typing effect. I have created png sequences out of After Effect and have turned them into a Sprite Sheet using the Free Version of Texture Pack.
After adding my sprite sheet to the app, the animation seems to scroll in from the top of the text field and while the animation is playing, it scrolls down and leaves from the bottom of the text field. I have tried to capture this using a few screen shots.
Why does it act like this?
I have also attached my Lua file, the Sprite Sheet png.
Below is my main.lua
local ground = display.newRect(display.contentCenterX, display.contentHeight, display.contentWidth\*2,display.contentHeight\*2 ) ground:setFillColor( 1, 1, 1) ground.name = "ground" local fieldText = { width = 572, height = 55, numFrames = 94, sheetContentWidth = 1722, sheetContentHeight = 1824 } local fieldTextArt = graphics.newImageSheet ( "textAnimation.png", fieldText ) local sequenceData = { { name = "sequence", sheet = fieldTextArt, start = 1, count = 94, time = 1000, loopCount = 0 } } local myAnimation = display.newSprite ( fieldTextArt, sequenceData ) myAnimation.x = display.contentWidth / 2 myAnimation.y = display.contentHeight / 2 myAnimation:play()
and below is my spritesheet lua
-- -- created with TexturePacker (http://www.codeandweb.com/texturepacker) -- -- $TexturePacker:SmartUpdate:39bede1c98c00ad0e964e53c84084c1d:b0f2c169266b5913b62cf09297fb63eb:fbca484c047ba281fc3488c69958a3fe$ -- -- local sheetInfo = require("mysheet") -- local myImageSheet = graphics.newImageSheet( "mysheet.png", sheetInfo:getSheet() ) -- local sprite = display.newSprite( myImageSheet , {frames={sheetInfo:getFrameIndex("sprite")}} ) -- local SheetInfo = {} SheetInfo.sheet = { frames = { { -- Text\_00000 x=1, y=1, width=572, height=55, }, { -- Text\_00001 x=575, y=1, width=572, height=55, }, { -- Text\_00002 x=1149, y=1, width=572, height=55, }, { -- Text\_00003 x=1, y=58, width=572, height=55, }, { -- Text\_00004 x=575, y=58, width=572, height=55, }, { -- Text\_00005 x=1149, y=58, width=572, height=55, }, { -- Text\_00006 x=1, y=115, width=572, height=55, }, { -- Text\_00007 x=575, y=115, width=572, height=55, }, { -- Text\_00008 x=1149, y=115, width=572, height=55, }, { -- Text\_00009 x=1, y=172, width=572, height=55, }, { -- Text\_00010 x=575, y=172, width=572, height=55, }, { -- Text\_00011 x=1149, y=172, width=572, height=55, }, { -- Text\_00012 x=1, y=229, width=572, height=55, }, { -- Text\_00013 x=575, y=229, width=572, height=55, }, { -- Text\_00014 x=1149, y=229, width=572, height=55, }, { -- Text\_00015 x=1, y=286, width=572, height=55, }, { -- Text\_00016 x=575, y=286, width=572, height=55, }, { -- Text\_00017 x=1149, y=286, width=572, height=55, }, { -- Text\_00018 x=1, y=343, width=572, height=55, }, { -- Text\_00019 x=575, y=343, width=572, height=55, }, { -- Text\_00020 x=1149, y=343, width=572, height=55, }, { -- Text\_00021 x=1, y=400, width=572, height=55, }, { -- Text\_00022 x=575, y=400, width=572, height=55, }, { -- Text\_00023 x=1149, y=400, width=572, height=55, }, { -- Text\_00024 x=1, y=457, width=572, height=55, }, { -- Text\_00025 x=575, y=457, width=572, height=55, }, { -- Text\_00026 x=1149, y=457, width=572, height=55, }, { -- Text\_00027 x=1, y=514, width=572, height=55, }, { -- Text\_00028 x=575, y=514, width=572, height=55, }, { -- Text\_00029 x=1149, y=514, width=572, height=55, }, { -- Text\_00030 x=1, y=571, width=572, height=55, }, { -- Text\_00031 x=575, y=571, width=572, height=55, }, { -- Text\_00032 x=1149, y=571, width=572, height=55, }, { -- Text\_00033 x=1, y=628, width=572, height=55, }, { -- Text\_00034 x=575, y=628, width=572, height=55, }, { -- Text\_00035 x=1149, y=628, width=572, height=55, }, { -- Text\_00036 x=1, y=685, width=572, height=55, }, { -- Text\_00037 x=575, y=685, width=572, height=55, }, { -- Text\_00038 x=1149, y=685, width=572, height=55, }, { -- Text\_00039 x=1, y=742, width=572, height=55, }, { -- Text\_00040 x=575, y=742, width=572, height=55, }, { -- Text\_00041 x=1149, y=742, width=572, height=55, }, { -- Text\_00042 x=1, y=799, width=572, height=55, }, { -- Text\_00043 x=575, y=799, width=572, height=55, }, { -- Text\_00044 x=1149, y=799, width=572, height=55, }, { -- Text\_00045 x=1, y=856, width=572, height=55, }, { -- Text\_00046 x=575, y=856, width=572, height=55, }, { -- Text\_00047 x=1149, y=856, width=572, height=55, }, { -- Text\_00048 x=1, y=913, width=572, height=55, }, { -- Text\_00049 x=575, y=913, width=572, height=55, }, { -- Text\_00050 x=1149, y=913, width=572, height=55, }, { -- Text\_00051 x=1, y=970, width=572, height=55, }, { -- Text\_00052 x=575, y=970, width=572, height=55, }, { -- Text\_00053 x=1149, y=970, width=572, height=55, }, { -- Text\_00054 x=1, y=1027, width=572, height=55, }, { -- Text\_00055 x=575, y=1027, width=572, height=55, }, { -- Text\_00056 x=1149, y=1027, width=572, height=55, }, { -- Text\_00057 x=1, y=1084, width=572, height=55, }, { -- Text\_00058 x=575, y=1084, width=572, height=55, }, { -- Text\_00059 x=1149, y=1084, width=572, height=55, }, { -- Text\_00060 x=1, y=1141, width=572, height=55, }, { -- Text\_00061 x=575, y=1141, width=572, height=55, }, { -- Text\_00062 x=1149, y=1141, width=572, height=55, }, { -- Text\_00063 x=1, y=1198, width=572, height=55, }, { -- Text\_00064 x=575, y=1198, width=572, height=55, }, { -- Text\_00065 x=1149, y=1198, width=572, height=55, }, { -- Text\_00066 x=1, y=1255, width=572, height=55, }, { -- Text\_00067 x=575, y=1255, width=572, height=55, }, { -- Text\_00068 x=1149, y=1255, width=572, height=55, }, { -- Text\_00069 x=1, y=1312, width=572, height=55, }, { -- Text\_00070 x=575, y=1312, width=572, height=55, }, { -- Text\_00071 x=1149, y=1312, width=572, height=55, }, { -- Text\_00072 x=1, y=1369, width=572, height=55, }, { -- Text\_00073 x=575, y=1369, width=572, height=55, }, { -- Text\_00074 x=1149, y=1369, width=572, height=55, }, { -- Text\_00075 x=1, y=1426, width=572, height=55, }, { -- Text\_00076 x=575, y=1426, width=572, height=55, }, { -- Text\_00077 x=1149, y=1426, width=572, height=55, }, { -- Text\_00078 x=1, y=1483, width=572, height=55, }, { -- Text\_00079 x=575, y=1483, width=572, height=55, }, { -- Text\_00080 x=1149, y=1483, width=572, height=55, }, { -- Text\_00081 x=1, y=1540, width=572, height=55, }, { -- Text\_00082 x=575, y=1540, width=572, height=55, }, { -- Text\_00083 x=1149, y=1540, width=572, height=55, }, { -- Text\_00084 x=1, y=1597, width=572, height=55, }, { -- Text\_00085 x=575, y=1597, width=572, height=55, }, { -- Text\_00086 x=1149, y=1597, width=572, height=55, }, { -- Text\_00087 x=1, y=1654, width=572, height=55, }, { -- Text\_00088 x=575, y=1654, width=572, height=55, }, { -- Text\_00089 x=1149, y=1654, width=572, height=55, }, { -- Text\_00090 x=1, y=1711, width=572, height=55, }, { -- Text\_00091 x=575, y=1711, width=572, height=55, }, { -- Text\_00092 x=1149, y=1711, width=572, height=55, }, { -- Text\_00093 x=1, y=1768, width=572, height=55, }, }, sheetContentWidth = 1722, sheetContentHeight = 1824 } SheetInfo.frameIndex = { ["Text\_00000"] = 1, ["Text\_00001"] = 2, ["Text\_00002"] = 3, ["Text\_00003"] = 4, ["Text\_00004"] = 5, ["Text\_00005"] = 6, ["Text\_00006"] = 7, ["Text\_00007"] = 8, ["Text\_00008"] = 9, ["Text\_00009"] = 10, ["Text\_00010"] = 11, ["Text\_00011"] = 12, ["Text\_00012"] = 13, ["Text\_00013"] = 14, ["Text\_00014"] = 15, ["Text\_00015"] = 16, ["Text\_00016"] = 17, ["Text\_00017"] = 18, ["Text\_00018"] = 19, ["Text\_00019"] = 20, ["Text\_00020"] = 21, ["Text\_00021"] = 22, ["Text\_00022"] = 23, ["Text\_00023"] = 24, ["Text\_00024"] = 25, ["Text\_00025"] = 26, ["Text\_00026"] = 27, ["Text\_00027"] = 28, ["Text\_00028"] = 29, ["Text\_00029"] = 30, ["Text\_00030"] = 31, ["Text\_00031"] = 32, ["Text\_00032"] = 33, ["Text\_00033"] = 34, ["Text\_00034"] = 35, ["Text\_00035"] = 36, ["Text\_00036"] = 37, ["Text\_00037"] = 38, ["Text\_00038"] = 39, ["Text\_00039"] = 40, ["Text\_00040"] = 41, ["Text\_00041"] = 42, ["Text\_00042"] = 43, ["Text\_00043"] = 44, ["Text\_00044"] = 45, ["Text\_00045"] = 46, ["Text\_00046"] = 47, ["Text\_00047"] = 48, ["Text\_00048"] = 49, ["Text\_00049"] = 50, ["Text\_00050"] = 51, ["Text\_00051"] = 52, ["Text\_00052"] = 53, ["Text\_00053"] = 54, ["Text\_00054"] = 55, ["Text\_00055"] = 56, ["Text\_00056"] = 57, ["Text\_00057"] = 58, ["Text\_00058"] = 59, ["Text\_00059"] = 60, ["Text\_00060"] = 61, ["Text\_00061"] = 62, ["Text\_00062"] = 63, ["Text\_00063"] = 64, ["Text\_00064"] = 65, ["Text\_00065"] = 66, ["Text\_00066"] = 67, ["Text\_00067"] = 68, ["Text\_00068"] = 69, ["Text\_00069"] = 70, ["Text\_00070"] = 71, ["Text\_00071"] = 72, ["Text\_00072"] = 73, ["Text\_00073"] = 74, ["Text\_00074"] = 75, ["Text\_00075"] = 76, ["Text\_00076"] = 77, ["Text\_00077"] = 78, ["Text\_00078"] = 79, ["Text\_00079"] = 80, ["Text\_00080"] = 81, ["Text\_00081"] = 82, ["Text\_00082"] = 83, ["Text\_00083"] = 84, ["Text\_00084"] = 85, ["Text\_00085"] = 86, ["Text\_00086"] = 87, ["Text\_00087"] = 88, ["Text\_00088"] = 89, ["Text\_00089"] = 90, ["Text\_00090"] = 91, ["Text\_00091"] = 92, ["Text\_00092"] = 93, ["Text\_00093"] = 94, } function SheetInfo:getSheet() return self.sheet; end function SheetInfo:getFrameIndex(name) return self.frameIndex[name]; end return SheetInfo