Search the Community
Showing results for tags 'array'.
-
hi, i have one doubt regarding adding animation array in timelinemax. Is it efficient if i add array of animation in timelinemax or i add one animation at a time? ..What will it make difference?
-
I have set a TimelineMax var and inside of this I create Tweens with an array of MovieClips. It works fine, so far. But I need to avoid the first MovieClip in the array on the reverse. So far I can't find a solution. Any Idea ?
-
I need some help. I'm new to ActionScript and my code looks too long. If I make more button and checkbox, it would be much longer. I'm sure there is some way to make it shorter. So if anyone can help me, it would be much appreciated. Here is my code. var checks:Array = [check01,check02,check03,check04,check05,check06,check07,check08,check09,check10,check11,check12,check13,check14,check15,check16,check17,check18,check19]; var btnENums:Array = ["btnE01","btnE02","btnE03","btnE04","btnE05","btnE06","btnE07","btnE08","btnE09","btnE10","btnE11","btnE12","btnE13","btnE14","btnE15","btnE16","btnE17","btnE18","btnE19"]; addEventListener(Event.ENTER_FRAME, checkBoxHandler_1); function checkBoxHandler_1(event:Event):void { if (btnspeak.currentLabel == "btnE02" && check02.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE03" && check03.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE04" && check04.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE05" && check05.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE06" && check06.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE07" && check07.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE08" && check08.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE09" && check09.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE10" && check10.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE11" && check11.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE12" && check12.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE13" && check13.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE14" && check14.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE15" && check15.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE16" && check16.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE17" && check17.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE18" && check18.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } else if (btnspeak.currentLabel == "btnE19" && check19.selected == false) { btnspeak.gotoAndStop("btnS01-1"); MovieClip(parent).control.playandstop.gotoAndStop(1); } if (btnspeak.currentLabel == "btnS01-1") { removeEventListener(Event.ENTER_FRAME, checkBoxHandler_1); } }
-
Hey folks, maybe it's that I am blind, or just an idiot, but how can I get the moment when the last element of the (staggerTo) array starts tweening? I tried getTweensOf and all kinds of workarounds, but I failed My example: TweenMax.staggerTo(stepArray, tweenSpeed, {alpha:1, scaleX:1.5, scaleY:1.5, dropShadowFilter:{blurX:15, blurY:15, distance:5, alpha:0.33}, ease:Cubic.easeInOut, onComplete:tweenScaleDown, onCompleteParams:["{self}"]}, stepStaggerAmount); Sorry if that's a dumb question, but I tried stuff for hours now and cant get it. TIA, Lasercode
-
Ok well I know I can tween one object in my array like so: // tween y prop of ball.position object TweenMax.to(balls[0].position, 1, {y: 50}); I am trying to tween all of my objects in an array like so. // try to tween all balls y prop of position object - DOESN'T WORK TweenMax.to(balls, 1, {position:{y: 50}}); The reason I thought this would work is because it is similar to css syntax on the site: //tweens multiple objects simultaneously TweenLite.to([e1, e2, e3], 1, {css:{autoAlpha:0}}); What is the syntax for this, I don't want to store "ball.position" in the array, just the ball. Thanks Neil
-
Hello all, I'm trying to add multiple images to a blank movie clip on my stage using the addChild method in an array. After many hours I got it almost working. The only problem now is that all of my arrayed images tween at the same time. They don't stagger. Is there any way to take the code that I have done and have each image tween, then the next, and so forth? I also need the timeline to repeat indefinately after all arrayed images have finished (which is why I have nested timelines). Thank you! var myTimelineCardMain:TimelineMax = new TimelineMax({repeat:-1}); var sArray:Array = [] var imgBD:BitmapData=new card_28(315,355); var card1:Bitmap=new Bitmap(imgBD); card1.x = -315; card1.y = -355; var img1BD:BitmapData=new card_21(315,355); var card2:Bitmap=new Bitmap(img1BD); card2.x = -315; card2.y = -355; sArray.push(card1,card2); for(var i:int = 0; i < sArray.length; i++) { card_main.addChild(sArray[i]); } var myTimelineCard:TimelineLite = new TimelineLite(); myTimelineCard.insertMultiple([new TweenLite(card_main, 0, {y:467, x:920}), new TweenLite(card_main, 3, {rotation:-9, ease:Back.easeOut}), new TweenLite(card_main, 3, {delay:3, rotation:200, ease:Back.easeOut})], 0, "sequence"); myTimelineCardMain.insertMultiple([myTimelineCard], 0, TweenAlign.SEQUENCE, 3);
- 1 reply
-
- array
- insertMultiple
-
(and 1 more)
Tagged with: