Jump to content
GreenSock

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

bartpop

Members
  • Posts

    31
  • Joined

  • Last visited

bartpop's Achievements

0

Reputation

  1. I found a way to get this working, it just required a little research into the AS3 Video constructor. Apparently, the Video class constructor uses 320x240 as the default width and height when instantiated. You can use the actual dimensions of your video to implicitly set these values so that the scaleX and scaleY are correctly interpreted, which results in LiquidArea correctly scaling the object. ORIGINAL _video = new Video(); FIXED _video = new Video(960,500); Hope that helps someone else!
  2. Looking at those numbers, it seems that AS3 wants to set the scaleX and scaleY based on a video sized at 320x240. Since my video doesn't follow the same proportions, the scaleX and scaleY are different values. Looking at what LiquidArea ScaleMode.PROPORTIONAL_OUTSIDE is doing, it's adjusting the scale to fill the space, but making the scaleX and scaleY equal values, which throws off the aspect ratio. Does anyone know of a way to make Gaia/LiquidArea and Video play nice together?
  3. Unfortunately I'm using the Gaia framework so I can't easily post a simple example. I traced my Video object metaData and the width and height were correctly reported as 960 x 500. Next, I traced my Video object properties BEFORE and AFTER attaching to my LiquidArea object. BEFORE LiquidArea _video.width = 960 _video.height = 500 _video.scaleX = 3 _video.scaleY = 2.08333333335 AFTER LiquidArea _video.width = 960 _video.height = 720 _video.scaleX = 3 _video.scaleY = 3 Any idea why the scaleX and scaleY wouldn't initially be 1? That would seem to be the intuitive value for an unscaled video.
  4. I'm running into a problem that I think is a bug, but perhaps I'm missing something. I'm trying to used LiquidArea to resize a video clip, but when I use "ScaleMode.PROPORTIONAL_OUTSIDE", my video is being stretched vertically out-of-proportion My video clip is 960x500 (FLV format, encoded with square pixels). Here's my LiquidStage code: var ls:LiquidStage = new LiquidStage(this.stage, 960, 500, 960, 500); var la:LiquidArea = new LiquidArea(this, 0, 0, 960, 500); la.attach(_video, ScaleMode.PROPORTIONAL_OUTSIDE); ls.update(); If I use ScaleMode.NONE, my video displays with the correct aspect ratio (but doesn't scale when the window is resized). If I use ScaleMode.PROPORTIONAL_OUTSIDE my video is being stretched vertically (960 x 610) out-of-proportion. I can't figure out why this would be stretched so I'm assuming that this is a bug? Does anyone know if FLV's cause a problem with LiquidStage?
  5. Thanks Jack, I figured the tearing was part of a flashplayer problem, but was curious if anyone had encountered the issue or discovered a solution.
  6. I'm working with Liquidstage and DynamicPinPoints and have a question regarding whether I'm using these awesome classes to their full potential. Let's say that I've created a DynamicPinPoint myPin based on the bottom right corner of a Sprite, mySprite. I then position myTarget and attach it to the DynamicPinPoint. Now suppose I want to tween the position of mySprite. Is there a parameter to handle updating the pin position during the tween? I added an onUpdate:ls.update parameter to the TweenLite instance to force the LiquidStage object to update. Technically this worked but resulted in some "pixel-splitting" on the tweened object (see attached). The top row of pixels (of myTarget Sprite) stays attached to the DynamicPinPoint, but the rest of the Sprite's pixels lag behind the updated position by 10 pixels or so... in this case probably one frame's worth. I'm curious if my method is this the most efficient technique to keep a DynamicPinPoint's position updated during a Tween?
  7. I finally came upon a combination that worked: var temp = myContainer.getChildAt(0); temp.getChildAt(0).myFunction();
  8. I'm having trouble figuring out the correct syntax to access my content. I'm hoping you can set me straight I have a SWFLoader that loads it's content into a container Sprite that I created, like so: myContainer = new Sprite(); addChildAt(myContainer,0); var myLoader:SWFLoader = new SWFLoader(mySWF.swf, {name:"mySWF", container:myContainer}); myLoader.load(); I'm trying to access a public function that was part of the mySWF class definition, but can't figure out the syntax to get at it. myContainer.getChildAt(0).name returns "mySWF", (type = "ContentDisplay"). How would I access a function "myFunction" that's part of the mySWF class? I've tried every combination I can think of: myContainer.getChildAt(0).myFunction, myContainer.getChildAt(0).content.myFunction, myContainer.getChildAt(0).rawContent.myFunction... just can't seem to find the correct path.
  9. Well, that would do it I guess! Is there a quick explanation as to why the e.target object needs to be cast as LoaderCore? I compulsively like to know how things work.
  10. _myLoader.remove(e.target as LoaderCore); I gave that a shot but got the following errors:
  11. I tried this code: import com.greensock.*; import com.greensock.loading.*; import com.greensock.events.*; var _myLoader:LoaderMax = new LoaderMax({name:"XMLQueue", onError:onXMLError}); _myLoader.append(new XMLLoader("http://www.fakesite.com/fake.php", {name:"myFakeXML"})); _myLoader.load(); function onXMLError (e:LoaderEvent) :void{ trace("onXMLError() : " + e.target); //_myLoader.remove(e.target); } In the onXMLError function, the trace result is: but uncommenting the _myLoader.remove(e.target); line results in the following error: I can force the remove method to work by adding this code: _myLoader.remove(e.target as XMLLoader); But that's impractical if I don't know what kind of loader is throwing the error.
  12. I'm trying to determine how to remove an XMLLoader from the LoaderMax queue when the XMLLoader encounters an error. I've set-up an onErrorHandler to use the LoaderMax.remove method, but can't determine the syntax to target the XMLLoader that threw the error. Here's what I'm trying: private function onXMLError (e:LoaderEvent) :void{ _XMLLoader.remove(e.target); } But the e.target code returns "null". I should point out that "_XMLLoader" is my LoaderMax queue. Does anyone know what I'm missing?
  13. Just about every class I write includes code in the constructor that delays the construction of the object until the it's added to the stage. if (!stage) { this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage); } else { init(); } I guess that what's obscuring the VideoLoader from LoaderMax? I have to admit, I've never worked with a class that parses through nested swf's before they're added to the display object and I really don't know how LoaderMax works it's magic. I'll try moving the creation of the videoLoader ahead of the pause in the constructor and see if that solves the problem.
  14. For the record, I'm using LoaderMax version 1.19. The app I'm building relies on a pretty extensive library of classes so it becomes difficult to share the exact code I'm using. Time permitting I'll work on building out a simplified model. Pesky deadlines seem to get in the way of everything. Not having gone through the inner workings of the LoaderMax classes, I've got a couple of theories as to what's going on with some of the problems I'm experiencing. As far as the relative paths go, I've got a class that helps set the relative path based on whether the swf is being viewed in a browser or in the standalone player, by referencing the Capabilities.playerType. The playerType seems to have switched somewhere between the VideoLoader auditing and loading functions, causing the difference in the relative paths. I don't know the details of how LoaderMax audits the child SWFs looking for nested Loaders, but came up with a theory on why the VideoLoader wasn't being included while watching the file loading activity. Initially with maxConnections:2 I could fairly easily watch which files were being added to the loader. When I saw my 35k SWF file start loading, it appears to have finished loading before the video even got added to the queue. My theory is that the main LoaderMax queue loaded the SWF file so quickly, that it thought that it had finished and fired the onComplete event before it knew there was a nested loader inside the SWF. Tracing through my code, the video file would have been the last file added to the queue; nested inside the last SWF added. Possible? I tried increasing the maxConnections to 5, hoping that another process would give LoaderMax the time to detect the nested VideoLoader but that wasn't successful.
  15. I had to raise one more question. After reading this again: I set the estimatedBytes on all of my Loaders, but it looks as if my files were being audited anyway (I was seeing double loads). The strangest issue I noticed while monitoring the double file loads in my browser was that when I used a relative path to my video file in VideoLoader, the first call to the file (auditSize call) would use the correct path. During the second call (the actual load) the path had changed (was moved up one folder relatively), causing the file to not be found. Once again, I solved the issue by manually setting the auditSize:false in my LoaderMax queue but thought I should report the issue.
×