Jump to content

Search the Community

Showing results for tags 'as3'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 / JS
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 124 results

  1. Hi! If I use multiple times without a variable reference //var myVar = TweenLite.delayedCall(); TweenLite.delayedCall(); If I do not call the .kill(), it will increase my memory? Or the delayedCall() have an onComplete() Event to be able to kill() after the calling.? I use the delayedCall() in a loop multiple times with different parameters... Thanks a lot.
  2. Hey everyone so I am moving a Movie Clip across the stage using Animate CC/AS3 and I was wondering which way is faster or if it even matters? The initial method I would use was straight forward using an ENTER_FRAME Event Listener like so addEventListener(Event.ENTER_FRAME, platformLoop); private function platformLoop(e:Event):void { this.x -= 8.0; } the Second Method which i am currently using now is like so: private function init():void { TweenLite.delayedCall(0.001, moveChar); } private function moveChar():void { TweenLite.delayedCall(0.001, moveChar); this.x -= 8.5; } This method using Greensock works just fine and moves the player across the screen pretty smooth. But I was thinking does it even matter is one faster or more efficient than the other?
  3. When I spinning the reel using tween-Lite plugin reel spinning is not look smooth specially when movement is slow(Slot Game). when reels slow its show jerky kind of movement in reel spinning.Any help or suggestion please welcome.
  4. Hello all, Long time reader, first time poster. I've been using GreenSock for Flash quite happily for a number of years now but we've just had an update to Animate CC and now I can't get it work at all! For example the following code: import com.greensock.*; stop(); function setPage(){ boxOver.addEventListener(MouseEvent.MOUSE_OVER, showInfo); boxOver.buttonMode = true; } setPage(); function showInfo(e:MouseEvent){ boxOver.removeEventListener(MouseEvent.MOUSE_OVER, showInfo); boxOver.addEventListener(MouseEvent.MOUSE_OUT, hideInfo); TweenLite.to(showInfo, 0.5, {alpha:0}); //reduce alpha with GreenSock } function hideInfo(e:MouseEvent){ boxOver.addEventListener(MouseEvent.MOUSE_OVER, showInfo); boxOver.removeEventListener(MouseEvent.MOUSE_OUT, hideInfo); TweenLite.to(showInfo, 0.5, {alpha: 1}); //increase alpha with GreenSock } Produces this output: ReferenceError: Error #1069: Property alpha not found on builtin.as$0.MethodClosure and there is no default value. at com.greensock.core::PropTween() at com.greensock::TweenLite/_initProps() at com.greensock::TweenLite/_init() at com.greensock::TweenLite/render() at com.greensock.core::SimpleTimeline/render() at com.greensock.core::Animation$/_updateRoot() I've got the COM folder in with the .FLA as normal and I'm a bit stumped. Any help you could give me would be great. Many thanks!
  5. hey , Hi Hello ... I have read your answer to this topic : that's awesome and a smart guy developed it a little bit (tnx to a user asked about the same problem) ... add saving what swf lastly loaded (using shared object) and fade in loading swf etc ... Now it's all great but I faced a big problem in my output : Error 2006 The Supplied Index is Out of Bounds How can I get ride of this ... any help is appreciated... stackoverflow is a mess to solve this ... tnx for your help carl the code : import flash.events.FullScreenEvent; import flash.display.StageScaleMode; stage.scaleMode = StageScaleMode.EXACT_FIT; stage.displayState = StageDisplayState.FULL_SCREEN; import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.LoaderEvent; import flash.display.MovieClip; import flash.events.Event; import flash.events.MouseEvent; import flash.net.SharedObject; import flash.events.MouseEvent; var mySO:SharedObject = SharedObject.getLocal("saver"); var loaderIndex:Number = -1; loaderIndex = mySO.data.my_vis; if (!mySO.data.my_vis) { loaderIndex = -1; } if (mySO.data.my_vis == 1) { loaderIndex = 0; } if (mySO.data.my_vis == 2) { loaderIndex = 1; } if (mySO.data.my_vis == 3) { loaderIndex = 2; } if (mySO.data.my_vis == 4) { loaderIndex = 3; } progress_mc.scaleX = 0; var currentLoader:SWFLoader; var swfs:LoaderMax = new LoaderMax({onComplete:completeHandler,onProgress:progressHandler,onChildComplete:childCompleteHandler}); swfs.append(new SWFLoader("part1.swf", {container:this.stage, autoPlay:false})); swfs.append(new SWFLoader("part2.swf", {container:this.stage, autoPlay:false})); swfs.append(new SWFLoader("part3.swf", {container:this.stage, autoPlay:false})); swfs.append(new SWFLoader("part4.swf", {container:this.stage, autoPlay:false})); function progressHandler(e:LoaderEvent):void { progress_mc.scaleX = e.target.progress; } function childCompleteHandler(e:LoaderEvent):void { trace(e.target + " loaded"); e.target.content.visible = false; } function completeHandler(e:LoaderEvent):void { trace("all swfs loaded"); progress_mc.visible = false; initCurrentLoader(); addEventListener(Event.ENTER_FRAME, trackSWFPlayback); } function initCurrentLoader() { loaderIndex++; trace(loaderIndex); mySO.data.my_vis = loaderIndex; mySO.flush (); if (loaderIndex == swfs.numChildren) { //reset back to 0 if the last swf has already played //loaderIndex = 0; //can't show stuff that was unloaded so lets stop mySO.clear(); loaderIndex = -1 swfs.load(); trace("all done everyone gone"); removeEventListener(Event.ENTER_FRAME, trackSWFPlayback); } else { //dynamically reference current loader based on value of loaderIndex currentLoader = swfs.getChildAt(loaderIndex); trace(currentLoader); trace(loaderIndex); //make the content of the current loader visible currentLoader.content.visible = true; //fade it in TweenLite.from(currentLoader.content, 0.1, {alpha:1}); //tell the current loader's swf to to play currentLoader.rawContent.gotoAndPlay(1); } } function trackSWFPlayback(e:Event):void { //trace(currentLoader.rawContent.currentFrame); //detect if the loaded swf is on the last frame if (currentLoader.rawContent.currentFrame == currentLoader.rawContent.totalFrames) { trace("swf done"); //hide and stop current swf currentLoader.content.visible = false; currentLoader.rawContent.stop(); //unload the swf that just played currentLoader.unload(); //set up and play the next swf initCurrentLoader(); } } this.addEventListener(Event.ENTER_FRAME, loadSWFs) function loadSWFs(e:Event):void{ load_btn.visible = false; swfs.load(); this.removeEventListener(Event.ENTER_FRAME, loadSWFs) } /* Click to Hide an Object Clicking on the specified symbol instance hides it. Instructions: 1. Use this code for objects that are currently visible. */
  6. Since I've updated my AIR runtime to 27.0.0.124, I'm experiencing a crash in any project that uses ImageLoader / LoaderMax to load images from the local file system. This is a brand new issue that has just started today and is consistent with all my previous projects. The code is: var queue:LoaderMax = new LoaderMax( { onComplete:onBitmapsLoaded, onError:onBitmapsError } ); for (var i:int = 0; i < _imagesToLoad.length; i++) { queue.append(new ImageLoader(_imagesToLoad[i].path, {name:_imagesToLoad[i].id})); } queue.load(); At the point of calling LoaderMax to load, the application crashes with the following report: Log Name: Application Source: Application Error Date: 27/09/2017 14:30:50 Event ID: 1000 Task Category: (100) Level: Error Keywords: Classic User: N/A Computer: DESKTOP-L18EOIN Description: Faulting application name: adl.exe, version: 26.0.0.118, time stamp: 0x592be5a1 Faulting module name: SS2DevProps.dll, version: 0.0.0.0, time stamp: 0x58873503 Exception code: 0xc0000005 Fault offset: 0x00009522 Faulting process ID: 0x2534 Faulting application start time: 0x01d33794d41287f9 Faulting application path: C:\Users\ben\AppData\Local\FlashDevelop\Apps\flexairsdk\4.6.0+26.0.0\bin\adl.exe Faulting module path: C:\Program Files\ASUSTeK COMPUTER INC\SS2\UserInterface\SS2DevProps.dll Report ID: c4b45f2f-183b-470f-95df-1a1a28134578 Faulting package full name: Faulting package-relative application ID: Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name="Application Error" /> <EventID Qualifiers="0">1000</EventID> <Level>2</Level> <Task>100</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2017-09-27T13:30:50.246338200Z" /> <EventRecordID>6764</EventRecordID> <Channel>Application</Channel> <Computer>DESKTOP-L18EOIN</Computer> <Security /> </System> <EventData> <Data>adl.exe</Data> <Data>26.0.0.118</Data> <Data>592be5a1</Data> <Data>SS2DevProps.dll</Data> <Data>0.0.0.0</Data> <Data>58873503</Data> <Data>c0000005</Data> <Data>00009522</Data> <Data>2534</Data> <Data>01d33794d41287f9</Data> <Data>C:\Users\ben\AppData\Local\FlashDevelop\Apps\flexairsdk\4.6.0+26.0.0\bin\adl.exe</Data> <Data>C:\Program Files\ASUSTeK COMPUTER INC\SS2\UserInterface\SS2DevProps.dll</Data> <Data>c4b45f2f-183b-470f-95df-1a1a28134578</Data> <Data> </Data> <Data> </Data> </EventData> </Event> Is this just my local system? I've redownloaded and replaced the .SWC component but the problem remains. Thanks, Ben
  7. Hello, I'm on a project created in Flash Builder 4.7 and Flash Professional CS6, nice. I need the project load's a SWF in the "preloaded SWF", the first SWF, loads a second SWF, and this second would be the "Home" of the project. At this point, work's perfectly. but when the home try to load secondaries SWF sends me The code of the first SWF: package { import flash.display.DisplayObject; import flash.display.Loader; import flash.display.MovieClip; import flash.events.Event; import flash.events.IOErrorEvent; import flash.events.ProgressEvent; import flash.net.URLRequest; public class InitialSWF extends MovieClip { private var _loader_:Loader; private var _applicationContent_:DisplayObject; private var _loaderContent_:MovieClip; private var _loaderIcon_:MovieClip; public function InitialSWF() { super(); _loader_ = new Loader(); _loader_.contentLoaderInfo.addEventListener(Event.COMPLETE,_onComplete_,false,0,true); _loader_.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,_onIoError_,false,0,true); _loader_.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,_onProgress_,false,0,true); _loader_.load(new URLRequest("Home.swf")); } private function _onComplete_(param1:Event) : void { _applicationContent_ = _loader_.content; _applicationContent_.visible = true; stage.addChild(_applicationContent_); _applicationContent_.addEventListener("onApplicationComplete",_onApplicationComplete_,false,0,true); _loader_.contentLoaderInfo.removeEventListener(Event.COMPLETE,_onComplete_); _loader_.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR,_onIoError_); _loader_.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,_onProgress_); _loader_.unload(); _loader_ = null; } private function _onApplicationComplete_(tmpEvt:Event) : void { _applicationContent_.removeEventListener("onApplicationComplete",_onApplicationComplete_); _loaderContent_.addEventListener("loaderOut",_onLoaderOut_,false,0,true); // do something } private function _onLoaderOut_(param1:Event) : void { _loaderContent_.removeEventListener("loaderOut",_onLoaderOut_); _applicationContent_.visible = true; stage.removeChild(this); } private function _onIoError_(tmpError:IOErrorEvent) : void { trace(tmpError); } private function _onProgress_(param1:ProgressEvent) : void { var _progress_:Number = Math.round(param1.bytesLoaded / param1.bytesTotal * 100); //Do animation loading } } } And the HomeSWF: package { import flash.display.DisplayObject; import flash.display.Loader; import flash.display.MovieClip; import flash.display.Sprite; import flash.events.DataEvent; import flash.events.Event; import flash.events.IOErrorEvent; import flash.events.ProgressEvent; import flash.events.HTTPStatusEvent; import flash.net.URLRequest; public class SecondarySWF extends Sprite { private var _loader_:Loader; private var _loaderContent_:MovieClip; private var _loaderIcon_:MovieClip; private var _applicationContent_:DisplayObject; public function SecondarySWF() { this.addEventListener(Event.ADDED_TO_STAGE,this._GoLogin_,false,0,true); } public function _GoLogin_(tmpEvent:Event) { _loader_ = new Loader(); _loader_.contentLoaderInfo.addEventListener(Event.COMPLETE,_onComplete_,false,0,true); _loader_.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,_onIoError_,false,0,true); _loader_.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,_onProgress_,false,0,true); _loader_.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, httpStatusHandler); _loader_.load(new URLRequest("SecondarySWF.swf")); } private function httpStatusHandler(event:HTTPStatusEvent):void { trace(event); } private function _onComplete_(param1:Event) : * { _applicationContent_ = _loader_.content; _applicationContent_.visible = true; stage.addChild(_applicationContent_); _applicationContent_.addEventListener("onApplicationComplete",_onApplicationComplete_,false,0,true); _loader_.contentLoaderInfo.removeEventListener(Event.COMPLETE,_onComplete_); _loader_.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR,_onIoError_); _loader_.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS,_onProgress_); _loader_.unload(); _loader_ = null; this.removeEventListener(Event.ADDED_TO_STAGE,this._GoLogin_); } private function _onApplicationComplete_(param1:Event) : void { _applicationContent_.removeEventListener("onApplicationComplete",_onApplicationComplete_); _loaderContent_.addEventListener("loaderOut",_onLoaderOut_,false,0,true); // .. } private function _onLoaderOut_(param1:Event) : void { _loaderContent_.removeEventListener("loaderOut",_onLoaderOut_); //_applicationContent_.visible = true; //stage.removeChild(this); } private function _onIoError_(tmpError:IOErrorEvent) : void { trace(tmpError); } private function _onProgress_(param1:ProgressEvent) : void { var _progress_:Number = Math.round(param1.bytesLoaded / param1.bytesTotal * 100); // .. } } } This is an image of the Google console.log, and catch this: -start InitialSWF -Load HomeSWF -Complete loaded of HomeSWF -Start HomeSWF -The link of the Secondary SWF, I deleted the link in the image because contains data of me... -Load SecondarySWF - ERROR I don't know why the SecondarySWF is 100% loaded but return an error... Regards!
  8. Hi again forum. So we've been noticing this for several months, and it's in both Flash and GSAP. When we use from tweens, whether it be TweenLite, TweenMax, or TweenNano, the elements initially load in their starting position, before the .from positions are initiated, giving a poor load experience. An example would be: http://codepen.io/GreenSock/pen/yyBGYg Notice all the elements pop onto stage, then go to their starting positions. It seems to be mostly an issue in Chrome. It's strange, because I've built many a unit previously that this never would happen in, and then one day it just started happening. I must prefer using from tweens vs to tweens so this error does cause extra work. Any ideas?
  9. Hello, been using Greensock for years but never required posting on the forum before since all the information I've ever needed I've been able to find in one form or another online – mostly on these forums. However, this time I'm at a loss. I appear to be the only one who's had this issue!! I'm currently animating a single text field with the following code (simplified): var mainTimeline:TimelineMax=new TimelineMax(); var stf:SplitTextField = new SplitTextField(obj, SplitTextField.TYPE_CHARACTERS); mainTimeline.insertMultiple(TweenMax.allFrom(stf.textFields,0.6,{autoAlpha:0,scaleX:2,scaleY:2},0.2)); I'm getting a strange effect I've never encountered before: the text "ghosting". See the attached screenshot. This happens while animating on a couple of the letters, but only sticks around on the last one and doesn't go away even when the animation has finished. What's going on? Is there a way around this? I've never come across it before. Thanks in advance!
  10. I have a movie clip that contains a lot of other MCs inside and actually too much to put them all in array. In old SWF times (AS2) I would just Export this movie clip as - Export for Acton Script with a Linkage to my .AS file (see the code that is now in .AS file). And then all of the inside movie clips (items) would animate as shown below. import com.greensock.*; import com.greensock.easing.*; class animate extends MovieClip { public function onLoad():Void { var item; for (item in this) { var mc = this[item]; TweenLite.from(mc, 1, {_alpha:0, _x:mc._x + 30, _xscale:5, delay: mc._x * 3/1000, ease:Circ.easeOut}); } } } Today, in HTML5 this linkage is not possible anymore. I'm trying to put this code into timeline to achieve the same effect. Is this even possible in for HTML5 ? I know that the tweenMax code needs to be adjust for AS3 usage, but that is not the issue here.
  11. Hey !! I am new at Actinscript, I'm working with Adobe Animate CC and I have a project based on AIR for Android. I want a code that can run and play an AS3 external SWF flash game in full screen with auto-resize to support different android screen sizes. Can you help me with the code please.
  12. Hi Greensock 1. Why is 2 movieclips both rotated from -90 to 190 going cw using TweenMax.to and ccw using TweenMax.from? 2. Is there a way to make .from go CW in this example? note: both going cw when var rotateTo <=180 in example below //HippieSvin import com.greensock.easing.*; import com.greensock.plugins.*; import com.greensock.TweenMax; var rotateTo:Number = 190; var rotateFrom:Number = -90; // CCW // RED : TM animating FROM -90 to 190 var c1:MovieClip = new MovieClip(); this.addChild(c1); c1.x = 275; c1.y = 200; c1.rotation=rotateTo; var red:MovieClip = new boxRed(); c1.addChild(red); red.x=-50; TweenMax.from(c1, 3, { delay:1.0, rotation:rotateFrom, ease:Quad.easeInOut }); // CW // GREEN : TM animating TO 190 from -90 : this goes CW var c2:MovieClip = new MovieClip(); this.addChild(c2); c2.x = 275; c2.y = 200; c2.rotation=rotateFrom; var green:MovieClip = new boxGreen(); c2.addChild(green); green.x=-50; TweenMax.to(c2, 3, { delay:1.0, rotation:rotateTo, ease:Quad.easeInOut });
  13. Hi, Check out this new Greensock tutorial that shows how to create smaller, faster HTML5 ads from Adobe Animate with GSAP. http://www.fla-exporter.com/GreenSock-Tutorial-Smaller-Faster-HTML5-Ads-with-FlaExporter-and-Adobe-Animate/ Topics covered-- Using GreenSock with Adobe Animate (Flash) Using ActionScript (AS2 or AS3) or JS for HTML5 ads Automatically optimizing your assets with one click Working with clickTags Retina/High DPI asset setup Handle multiple exits on buttons with onClick Handle rollovers with onMouseOver/Out Call JavaScript on the page from timeline code in the FLA Show an ad preloaded Test and validate the ad http://www.fla-exporter.com/GreenSock-Tutorial-Smaller-Faster-HTML5-Ads-with-FlaExporter-and-Adobe-Animate/
  14. Hello, I am trying to remove some items from the taregetObjects list using array but it's removing only one item! Code sample: var my_item:TransformItem = t_manager.addItem(my_mc); my_item.addEventListener(TransformEvent.SELECT, addToList); function addToList(event:TransformEvent):void { selectedArray = new Array; for (var t:int = 0; t<t_manager.selectedTargetObjects.length; t++) { selectedArray.push(t_manager.selectedTargetObjects[t]); } ///selectedArray = t_manager.selectedTargetObjects; ///selectedArray = t_manager.selectedItems; } //// Remove items from targetObjects array: index = 0 for(var i:int = 0; i< selectedArray.length; i++) { ///////// some code here index++ //trace(index) // output: 4 if (index == selectedArray.length) { for (var t:int = 0; t < index; t++) { t_manager.removeItem(selectedArray[i]); } } } it's removing one item only!
  15. Transform Manager works GREAT in general, first off. But, when I apply a ColorMatrixFilter to a container - in this case taking the whole design area and applying a greyscale effect - the TransformManager selection box / handles show up offset up and left from the actual target. The filter applied looks like- _greyScaleEnabled == true; var matrix:Array = new Array(); matrix=matrix.concat([0.5,0.5,0.5,0,0]);// red matrix=matrix.concat([0.5,0.5,0.5,0,0]);// green matrix=matrix.concat([0.5,0.5,0.5,0,0]);// blue matrix=matrix.concat([0,0,0,1,0]);// alpha var greyscaleFilter:ColorMatrixFilter=new ColorMatrixFilter(matrix); applyCanvasMatrixFilter(greyscaleFilter) applied to the layers container (where all the interactive objects are in child containers for different layers) public function applyCanvasMatrixFilter( $matrixFilter:ColorMatrixFilter ):void { if (!_myFilters) { _myFilters = []; } _myFilters.push($matrixFilter); _layersContainer.filters = _myFilters; } From this point on, after the TransformTool had been positioned perfectly up until this point, it will now be offset significantly up and left. It seems there may be some kind of translation from child x,y position to the stage position / transform tool container (localToGlobal or similar?) that might not be working right when a filter like this is applied to a grandparent of the target object. Scale is at play too of both the target object and the container object as well. Is this a known bug, or are there configurations for the TransformTool that will help correct offset? Does applying a filter to a parent container wipe out location data of child objects in flash somehow? Thanks so much for any insight on how to fix this...
  16. I have created a rss feed ticker in as3 with TweenLite. Flash FPS is 24. When I run this, the scroll animation is not smooth. If I change the FPS to 120, it appears very smooth. There are many different movieclips on stage which may have their own animation, so I can not change the Flash FPS. Is there any way available in TweenLite where I can change FPS for this movie clip only?
  17. Hi, I am trying to edit the "onKeyPress" function to allow deleting the text fields by pressing two keys (Shift & Backspace), private static function onKeyPress($e:KeyboardEvent):void { _keysDown[$e.keyCode] = true; if ($e.keyCode == Keyboard.DELETE || _keysDown[Keyboard.SHIFT] && _keysDown[Keyboard.BACKSPACE]) ... The code above will not work unless I set the "hasSelectableText" Boolean to false: newVars.hasSelectableText = ($targetObject is TextField) ? false : $hasSelectableText; But now I am not able to highlight the text! how to solve that please? can you point me to the line where I can set the selected object as a text field or "hasSelectableText"? Or if I added the text field inside a movieClip is there any way to use "SCALE_WIDTH_AND_HEIGHT" function instead of the normal scale mode? Thanks.
  18. Hi there, I'm making an installation piece which has a stagesize of 7770x1080 (basically 4 HD touchscreen monitors in a row with 30 px space between each ). I've been looking for a supersimple throwprops example that would just let me drag a movieclip along the x-axis for this, but I can't find one apart from the one on the site, and that one uses blitmask. I'm guessing a blitmask would be counterproductive covering such a stage-size. Is there an example somewhere that you know of that would just permit me to see the syntax for as3 throwprops the way it's featured in the js version of it? I just need to be able to throw a movieclip around the stage to understand it, I think. Basically I would be out of trouble if I understood draggable and throwprops in as3, and I'm pretty lost just using the docs. any help would be appreciated! cheers edit: Oh wow, a mind boggling blitmask of that size isn't such a cpu eater afterall. This is amazing stuff you've built here. I used your example and threw something together I can use. You gentlemen came up with some rather jaw-dropping stuff here. All Hail the Green Sock !
  19. Hello, I'm trying to loop a video and the video loops, but not at the end of the video, it's cut at approx 50% of the video. The video is 4 seconds long and at the half it just jumps to the end and starts the loop again. Any idea in how to prevent that? I'm loading the video with this line: var lVideoPlayer:VideoLoader = new VideoLoader("assets/myVideo.flv", {name:myVideo.flv,container:videosParents[_videoNdx], autoPlay:false, requireWithRoot:this.root, deblocking:1, repeat:(_videoNdx==1?-1:1),onComplete:_onConnect }); I would need perfect seamless loop, but hopping that way is hard. At the same time, the video triggers 2 events, right now I'm tracking that events using VideoLoader.PLAY_PROGRESS but perhaps it would be more efficient using cues? Well, thank you in advance, Toni
  20. GSAP doesn't update Tweenlite for Flash about a year. Do you longer support Flash ??
  21. Hi there, is is possible to retrieve the current character being tweened as part of a SplitTextField timeline animation? Essentially I'm using it to simulate some text being typed out and I would like a separate object (the cursor) to follow the last character alpha'd in. Perhaps I can get this form the onUpdate ? Sample code below : _AnimationTimeline.append(TweenMax.allFrom(stf.textFields, 2, {autoAlpha:0, onUpdate:moveCursor, onUpdateParams:[ "pass the current character here" ]}, 0.06)); function moveCursor () : void { //// reposition the cursor based on the current characters XPos ??? } Thanks in advance.
  22. My group of coders build/deploy flash games to several different sites, and it's usually fairly straightforward. One of these sites used to have a flash-based container that would load in our games, and it worked fine. But the people on that team who knew AS3 left, so they made a new container that is primarily javascript, with a thin AS3 shim to load in the games. This works fine for debug builds, but things slow down to a crawl when we try release builds (load times go from 30 seconds or so to over ten minutes). Their old container doesn't have an issue with release builds. This week was our company's hackathon, so I decided to delve into this and see what I could find. We do our game asset loading using XMLLoader to load in a couple xmls (one at a time) that have MP3Loaders and SWFLoaders in them. The behavior I was seeing in the release builds was that it would load the xml, wait about 90 seconds, then audit the child loaders for size, wait another 90 seconds or so, then load in the children, sometimes taking breaks between children. Prior to this week, none of them had estimatedBytes vars in the loader definitions in the xml. So, I added estimatedBytes to the first file that just had a MP3Loader wrapped in a LoaderMax block, and it zipped right along, leading me to believe that I'd found at least a way to fix things. But adding estimatedBytes to the second xml where all the children were individual SWFLoaders didn't reduce the lag with the second file at all. I tried updating the greensock swc on the games side (we had a version from late 2013), and besides requiring some very minimal refactoring based on changes in the api, that didn't appear to help the issue either. I also tried upping the maxConnections for the second XMLLoader, grouping all the SWFLoaders into a single LoaderMax bundle, and turning off the integrateProcess flag for the SWFLoaders (though this may or may not have been done in the right place, will probably try adding this to the xml lines next), but all to no avail. As these are very large projects, copying and pasting snippets seems unproductive, but I'm just wondering if you have any other ideas I should be trying. I know the JS layer is using greensock for something, but after sifting through the codebase for it, nothing jumped out at me as even remotely related. Any of this sound even remotely familiar to something you've run across?
  23. Hello, I am trying to rotate a 2D star three or four consecutive times on its y-axis, and while the rotation is happening the star is moving away from the viewer in space. Essentially the star is larger as the animation begins because it's closer to the viewer, and as it rotates it gets smaller because it's moving away from the viewer in space. Hopefully this makes sense. In terms of creating the rotation effect, I've tried the ShortRotationPlugin, but that causes the star looks a little warped as it rotates. Any help would be appreciated. Thanks in advance!
  24. Hello. I am in need of serious help with this problem I'm facing. First off let me tell you what I want to achieve with my code. On click of a button at the top-center of my screen, 4 fishes are to be tweened with bezier movements to simulate 'swimming' through water. They have other functions but this is the part that I need to get working. function tweenFish():void { var numY:Array = new Array; for (var count:Number = 1; count < 5; count++) { numY.push(count+8); } numY.reverse(); trace(tweenArr, round); for (var numX:Number = 0; numX < 4; numX++) { var randomStart:Number = (Math.floor(Math.random() * (460 - 140 + 1)) + 140); _difficulty[numX].y = randomStart; _difficulty[numX].x = -50; if (round == 1) { tweenArr[numX] = TweenMax.to(_difficulty[numX], (numY[numX]/round), {bezier:{curviness:2, autoRotate:true, values:[{x:50, y:randomStart+5}, {x:150, y:randomStart-5}, {x:250, y:randomStart+5}, {x:350, y:randomStart-5}, {x:450, y:randomStart+5}, {x:550, y:randomStart-5}, {x:770, y:randomStart+5}]}, ease:Cubic.easeInOut}); } } tMax.add(tweenArr); } This is the function I use to setup the tweens for the fishes. Each fish (set in an array called _difficulty) is given a set x value (offscreen) and a random y value so that each run they will 'swim' across the stage. This works perfectly. In fact, all of it runs perfectly...until I try to run it again. This is my initialization which basically stops the round if the fishes make it off the stage without being clicked (intended functionality). var tMax:TimelineMax = new TimelineMax({onComplete:endRound}); And this is the function it calls. function endRound():void { GoFishing.removeEventListener(MouseEvent.CLICK, fish); while (tweenArr.length > 0) { tweenArr.length = 0; } // tMax.clear(); POSSIBLE CODE? gotoAndStop("endGameResults"); scoreBox.text = "Your score is: " + points; gameResultsBG.width = 1; gameResultsBG.height = 1; TweenLite.to(gameResultsBG, 1.5, {scaleX:1.1, scaleY:1.1}); TweenLite.to(gameOverText, 3, {autoAlpha:1}); TweenLite.to(playAgain, 2, {visible:true}); timerX.stop(); timerX.removeEventListener(TimerEvent.TIMER, clock); playAgain.addEventListener(MouseEvent.CLICK, function(e:MouseEvent):void { MovieClip(root).gotoAndStop(1); GoFishing.addEventListener(MouseEvent.CLICK, fish); round = 0; } ); } Don't mind the commented line at the top. Anyway, this function leads to frame 2 where it's an end-game screen and it allows you to retry. 'playAgain' would take you to frame 1 and play the tween again when the button at the top is clicked, or so I thought. This is where the fishes are frozen off screen (I expanded the window and saw), and they do not move when the function is called, BUT the timer for the timeline STILL RUNS. Know why? The timeline takes 10 seconds to run each time at first. On the second run, 10 seconds pass and it leads me to the end-game screen. So clearly the timeline is running as I would expect it to, but the fishes aren't being moved. Is there something wrong with my code here? Do I need a different approach? Also I just thought of this: Would disabling these fishes, or switching to another frame at any point mess up the tween functionality? Thank you for your help.
  25. Hi, I am getting a bit confused after looking at all the different restart of a tween examples... All I would like to do is store one tween (myTween) in a variable and later restart that tween. Here is my code: import com.greensock.TweenMax; import com.greensock.TimelineLite; import com.greensock.easing.*; var tl = new TimelineLite(); var myTween:TweenMax = new TweenMax(card, .5, {x:148, y:168, scaleX:1, scaleY:1, blurFilter:{blurX:0, blurY:0, remove:true}}); //runs the card unblur function .2 seconds into the previous tween tl.add([cardReg], "-=0.1") tl.to(txt1, 1, {alpha:1}, "+=1") .to(card, .4, {alpha:0, scaleX:3, scaleY:3}, "+=1") .restart(myTween); stop(); Please advise. Thanks!