Jump to content

Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

About mikaL

mikaL's Achievements


Newbie (1/14)



  1. Yes, well, the disappointment is easy to bear. It'll be simple enough for me to use onUpdate, but I just wanted to check if there was a better way. Thanks for your help!
  2. Hi all, I need to do some calculations after timeline (TimelineMax) duration changes. I take it can change because of number of things, i.e. adding or removing tweens, changing repeat values, etc. etc. There are a number of components in my application that could cause the change, so I'm looking for a method to somehow intercept or detect the change... hopefully there's a callback or something that I've just missed in the docs...:) -Mika
  3. This is kind of old but since I just started with a similar project, thought I'd chip in... In React, just put this below your imports & above your react component declaration: const T = TweenLite; // eslint-disable-line , and then in your component use it as T.to() ... etc. = only 1 eslint-disable line.
  4. Yes, that clarifies it. I just had some older code using TimeLineMax (v. 11 maybe?), and now that I downloaded the new versions I found that what used to be useFrames had changed to usesFrames , totalDuration to totalDuration(value: Number = NaN) , etc. I suppose there's a reason to these changes, but now I need to go through everything to check I'm not using the old versions anywhere where the compiler doesn't catch them.
  5. which one is correct http://api.greensock.com/as/com/greensock/TimelineLite.html#usesFrames() or http://www.greensock.com/as/docs/tween/com/greensock/TimelineLite.html#useFrames it's a bit confusing that after downloading new version old code started producing errors. Is the parameter in the constructor still useFrames ? Thanks.
  6. I tried all that, even removing every possible call (get videoTime etc.) to the videoLoader, but only removing addEventListener(VideoLoader.PLAY_PROGRESS, onPlayProgress); got rid of the errors, even when the handler contained no code. I suspected there was something with my cleanup code since I really don't understand all the dispose nuances, so I changed (_videoDisplay is a ContentDisplay) _videoDisplay.dispose(true, true); to _videoDisplay.dispose(true, false); ... problem solved. Mika
  7. Hi again, Back to this issue after a long time. I still have no clue how I could be calling anything after disposing the video. I do something like video.dispose(true); video = null; ...and then everywhere when I call a method of the video I check if (video) . . . Wouldn't I see something else on the call stack when the erro is thrown too, not just the 2 lines? Mika
  8. Hi, I have a VideoLoader that I use to play videos, so that when changing between them (either because of user action or video completing) , I try to clean up everything before loading the next file. I remove all video playback event listeners, and then call VideoLoader.dispose(true). Then, when the next video plays, I get a lot of these: TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.greensock.loading::VideoLoader/get videoTime() at com.greensock.loading::VideoLoader/_playProgressHandler() So I looked through the gs code & found this: override public function addEventListener(type:String, listener:Function, useCapture:Boolean=false, priority:int=0, useWeakReference:Boolean=false):void { if (type == PLAY_PROGRESS) { _dispatchPlayProgress = true; } super.addEventListener(type, listener, useCapture, priority, useWeakReference); } But there was nothing that would set _dispatchPlayProgress to false, so I added this: override public function removeEventListener(type:String, listener:Function, useCapture:Boolean=false):void { if (type == PLAY_PROGRESS) { _dispatchPlayProgress = false; } super.removeEventListener(type, listener, useCapture); } That seemed to solve the problem - but I'm still not sure if that actually was the problem, or was it maybe my clean up code. Another problem I have is that sometimes PLAY_PROGRESS doesn't happen at all, or there are long periods (~10 sec) that it doesn't. The video still plays just as usual. Mika
  9. Thanks, I already found out that a lot of things come from netStream, and most of netStream's functions don't work out without FMS. Mika
  10. Hi, In Flash docs I found a method NetStream.step() http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#step() ...but it't not there: it's doesn't show up in FlashDevelop code hint, and if I try to use it type casting to Object I get ReferenceError: Error #1069: Property step not found on flash.net.NetStream and there is no default value. Any idea? Mika
  11. Hi, I have a link to an external site that has some mp4 videos I need to play in Flash. If the address was http:// etc. then no problem, but because this is a password-protected ftp site it becomes difficult. I found out that Flash doesn't load anything trough ftp protocol, so I tried a small php proxy script that reads the file. This works well with text files and DataLoader, but when I try it with mp4 & VideoLoader I get "NetStream.Play.FileStructureInvalid" errors. This is not really a video loader problem, but if anyone knows a solution it would be great. Mika
  12. Thanks, I'll try that. Actually that 1/3 thing is not what I'm after, it was just something I tried at first to get the hang of things. What I need to do is something like this: I have a UI control A ("left pane") that may resize, both when the user drags its edge, and when the whole stage gets resized, it could maintain some relative size, such as 1/3 . Then I have controls B, C, D whose left edges should stay 10 pixels to right from A's left edge. B, C, D are stacked vertically so that B's top is at stage top, D's bottom is at stage bottom, and C fills the space between B and D. And it gets more complicated than this (e.g. I also need some items to be evenly spaced, and the controls contain other controls whose positions are relative to the container) but the general idea is that I need to have my UI controls chained together so that moving some edge moves others. I probably haven't quite understood the way that Areas and Pinpoints work: I find it a little awkward to specify top_left and bottom_right to constrain an area, and then attach a DisplayObject to the area. Instead, or additionally, I'd like to use guidelines, that you could attach a DisplayObject's edge to. Maybe I could implement a dynamic guideline system using PinPoints, dynamic or static?
  13. Hi, I'm just getting started with LiquidStage. I just can't figure this out, & didn't find anything in forums or demos: Let's say I want a pane, with some UI controls, on the left side of the screen (=stage). It should always be 40 pixels from top, 60 pixels from bottom, and be 1/3 of the screen width. Minimum size is 100x100 pixels. So I created a LiquidArea: area = new LiquidArea(stage, 0, 40, stage.stageWidth / 3, stage.stageHeight - 60, 0xFF0000, 100, 100, 99999999, 99999999, false, null, true); and 2 pinpoints: topLeft = new PinPoint(0, 40, stage); bottomRight = new DynamicPinPoint(stage, getBottomRight); and a getter function: private function getLeftPaneBR(): Point { return new Point(stage.stageWidth / 3, stage.stageHeight - 60); } and then attach a UIComponent to the area area.pinCorners(topLeft , bottomRight, true, 0, null, true); area.attach(_leftPane, ScaleMode.STRETCH); ...but no matter what I change the strict, reconcile, et. etc. values, when I scale the player window the area gets scaled somehow proportionally: the 60 pixels from bottom doesn't stay 60, and 1/3 becomes about a half when the stage gets larger??? thanks, Mika
  14. Thanks, You probably meant request.data.xml = data.toXMLString(); ? , but it still doesn't work: the server can't handle it and nothing is uploaded. I really have no idea what POST and multipart/form-data etc. actually mean, but could that be the problem? I mean, does this request.contentType = 'multipart/form-data'; work with URLVariables? Of course I can go back to using Flash classes for this, but I'd prefer LoaderMax since the download part works so well.
  15. Hello, I tried this with DataLoader (it works with Flash URLLoader class): public function save(url: string, data: XML): void { var request = new URLRequest(url); request.contentType = 'multipart/form-data'; request.data = data.toXMLString(); // <== if this is commented out, no error request.method = 'POST'; new DataLoader(request, { name: 'saveXML' } ); //... and then .load() etc. ... } But I get this error in DataLoader constructor: TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.greensock.loading.core::LoaderItem/_setRequestURL() at com.greensock.loading.core::LoaderItem() at com.greensock.loading::DataLoader() If I comment out request.data = data.toXMLString(); then it doesn't throw the error. Any idea? Mika