Help: Tween array conflicting with background movie clip (.gif)
firstly, new (under 2 months) ooc programming. developing basic objective class space-shooter style flash game in as3, started out hobby, , progressing piece portfolio. contained 1 layer 6 key frames each stage in swf (loading screen, main menu, game, controls, etc.) friend encouraged me add background layer make more presentable.
that when ran current issue. completed following steps, in adding background:
new layer named background
drag below game layer in timeline
insert new symbol, make movieclip
import library
drag .gif bitmap onto layer
drag symbol onto background layer
the background layer shows behind of objects, buttons , symbols on every keyframe, when test swf, background black (the solid set game layer).
i tweeked script in first frame of game layer "noting out" tweenin(); , stop(); commands, , suprisingly background .gif appears, isn't animating through subsequent frames of .gif. if unnote stop();, same results. however, if unnote tweenin();, issue resumes , background layer invisible. not receiving errors or warnings in compiler errors or output.
these results of troubleshooting led me believe tweenin function isn't written correctly or doesn't play nicely other layers on frame. here current script. took liberty in noting every line, there isn't confusion in understanding logic.
private function tweenin() { // make tweens new array tweens = new array(); // loop through on screen content (var i=0; i<numchildren; i++) { // make reference current object var ob = getchildat(i); // make tween current object var tw:tween = new tween(ob, // object tween "x", // property tween regular.easeinout, // easing function use ob.x - stage.stagewidth*2, // starting value ob.x, // end value 15+(i*30)) // time take // add tween list of tweens tweens.push(tw); } }
my friend said array, couldn't find way use tween without using array.
i appreciate offer expertice, opinion and/or words of encouragement.
thank you, kindly,
alex
it's more start , end tween parameters.
example, has x property=0, tween x=-stage.stagewidth*2 x=0.
More discussions in Adobe Animate CC - General
adobe
Comments
Post a Comment