• Content count

  • Joined

  • Last visited

Community Reputation

1 Newbie

About Sam

  • Rank
  • Birthday 12/02/1974

Contact Methods

Profile Information

  • Gender
  • Location
    Chicago Area
  1. For the scale, I have added to the updateScale method in the TransformManager: /** @private **/ private function updateScale($x:Boolean = true, $y:Boolean = true):void { var ti:Object = _trackingInfo; //to speed things up var mx:Number = _parent.mouseX - ti.mouseOffsetX, my:Number = _parent.mouseY - ti.mouseOffsetY; if (_bounds != null) { if (mx >= _bounds.right) { mx = _bounds.right - 0.02; } else if (mx <= _bounds.left) { mx = _bounds.left + 0.02; } if (my >= _bounds.bottom) { my = _bounds.bottom - 0.02; } else if (my <= { my = + 0.02; } } if ( _snapScaleTo ) { mx = (((mx + (_snapScaleTo / 2)) / _snapScaleTo) >> 0) * _snapScaleTo; my = (((my + (_snapScaleTo / 2)) / _snapScaleTo) >> 0) * _snapScaleTo; } The _snapScaleTo variable is a public Number that I added as well. Whenever snap is turned on or the size of the grid is changed I update the transformManager.snapScaleTo to equal the grid value and set it to 0 if the grid or snap are turned off.
  2. First off, thanks for this. It was exactly the breadcrumbs that I needed to get a snap to grid function working. The transformManager appears to have a public updateSelection() method now so all that was required to get it function for position was to listen for the TransformEvent.MOVE, adjust the position and update the selection. Where I'm running into challenges is getting the snap to work on the TransformEvent.SCALE. Adjusting the display object, like in the move above, doesn't adjust the TransformManagers handles. So the display object snaps to the scale but the handle position remains unadjusted and is out of position with the display object. Any suggestions?
  3. Hello again! I am looking for more precise control over the positioning of an asset in the FlexContentDisplay when the scalemode is set to one of the proportional options. Currently there are options to set the position by alignment. Your VAlign and HAlign stuff. I'd like to be able to grab the image and drag it to a position withing the bounding box. I imagine it's someting like getting access to the wgap and vgap but I am not sure if there are pitfalls to this that I am not seeing. Can you help?
  4. Well I'll be. I'll need to find another way to trim the loaded audio then. Thanks Jack.
  5. For the record there is audio. It is loaded properly and a play call results in sound issuing forth from my speakers. I am even able to do an extract on that same content and manipulate the resulting byteArray. I am just not getting the SampleDataEvents.
  6. I am trying to access the SampleDataEvent for a sound that has been loaded by the MP3Loader. I had assumed that this would be as easy as adding an event listener to the content of the loader like so: ( ( _loader as MP3Loader ).content as Sound ).addEventListener( SampleDataEvent.SAMPLE_DATA, onSampleData ); ... but I am not seeing any events. Help Please
  7. RTFM. For the next slow poke... transformItem.scaleMode = TransformManager.SCALE_WIDTH_AND_HEIGHT now to get the ContentDisplay object to update as it is being scaled...
  8. I am trying to use the TransformManager in combonation with the LoaderMax ContentDisplay. In my application I expose the ContentDisplay scaleMode options to the user (ProportionalInside, ProportionalOutside, and Stretch). Attaching the TransformManager to the ContentDisplay works just fine for rotation and position but it is misleading for scale. The TransformManager scale warps the ContentDisplay. When the ContentDisplay scaleMode is set to Stretch this makes perfect sense but when the ContentDisplays scaleMode is set to either of the Proportional settings it seems like it should change the bounding box width instead. That way the image continues to fill maintain proportion according to the scaleMode. I attempted the TransformManagers constrainScale and this guarantees that the original fitHeight and fitWidth aspect ratio are maintained which helps in the cases where the scaleMode is set to proportional but sacrifices the ability to change the shape of the bounding box. I guess that is my question: Is there a way to make the TransformManager change the ContentDisplay bounding box? Thoughts, feelings, assistance?
  9. Adobe just release 11.2 of the flash player that appears to really mess up the seek function on netstream objects. I didn't delve very far into the issue but I wrote a little test app to confirm the issue. I have attached the project to help. The summary is that I tested seeking to each frame of a video in a loop and got the following results: ----------------------------------------------------- flash version: MAC 10,3,183,18 ----------------------------------------------------- complete - ready to loop through seek on 1273 frames starting seek through video at: 4614 ending seek through video at: 4617 total time: 3ms starting seek through video at: 6907 ending seek through video at: 6910 total time: 3ms starting seek through video at: 9134 ending seek through video at: 9137 total time: 3ms starting seek through video at: 11349 ending seek through video at: 11353 total time: 4ms ----------------------------------------------------- flash version: MAC 11,1,102,64 ----------------------------------------------------- complete - ready to loop through seek on 1273 frames starting seek through video at: 4288 ending seek through video at: 4291 total time: 3ms starting seek through video at: 6560 ending seek through video at: 6563 total time: 3ms starting seek through video at: 7045 ending seek through video at: 7048 total time: 3ms starting seek through video at: 7752 ending seek through video at: 7754 total time: 2ms ----------------------------------------------------- flash version: MAC 11,2,202,228 ----------------------------------------------------- complete - ready to loop through seek on 1273 frames starting seek through video at: 2528 ending seek through video at: 3443 total time: 915ms starting seek through video at: 5690 ending seek through video at: 6629 total time: 939ms starting seek through video at: 8136 ending seek through video at: 9064 total time: 928ms starting seek through video at: 10419 ending seek through video at: 11347 total time: 928ms Hope this helps.
  10. Better yet I am extending the class in order to dispatch an update event and hooking onto that. You might consider this as an alternative feature request.
  11. Couldn't hurt to ask. I am doing option 1 but I have to completely override the _update call so I am essentially copying that function and then removing that piece. A little easier than merging but still with the some maintenance concerns. #2 is undesirable for a slew of reasons that are unique to my situation. Anyhow, thanks for the fast reply.
  12. Hi Jack, I'd like to make a feature request for the FlexContentDisplay & ContentDisplay classes. In your _update call you are drawing a, normally transparent, rectangle: protected function _update():void { var left:Number = (_centerRegistration && _fitWidth > 0) ? _fitWidth / -2 : 0; var top:Number = (_centerRegistration && _fitHeight > 0) ? _fitHeight / -2 : 0; graphics.clear(); if (_fitWidth > 0 && _fitHeight > 0) { graphics.beginFill(_bgColor, _bgAlpha); graphics.drawRect(left, top, _fitWidth, _fitHeight); graphics.endFill(); } I remember something from the docs about this being to insure mouse interactions would function properly. My request is to have a var that tells it *not* to do this. I would like to draw these backgrounds myself but updates were interfering. I extended the class but it sure would be nice to not have to check/maintain it each time I update my greensock. My thoughts are something like: protected function _update():void { var left:Number = (_centerRegistration && _fitWidth > 0) ? _fitWidth / -2 : 0; var top:Number = (_centerRegistration && _fitHeight > 0) ? _fitHeight / -2 : 0; if ( !manualBg ) { graphics.clear(); if (_fitWidth > 0 && _fitHeight > 0) { graphics.beginFill(_bgColor, _bgAlpha); graphics.drawRect(left, top, _fitWidth, _fitHeight); graphics.endFill(); } } With the appropriate getters and setters for manualBg. I can pass along what I have done if you like but I assume you'd like to do it your own way. Thanks! Sam
  13. Thanks for the info Jack, I'm not complaining, just trying to understand where my time is going. It does look like the profiler must include the netstream in their [tincan]. I profile my app without videos and the [tincan] method goes away. I have gone through a bunch of optimization and have managed to increase the [tincan]s consumed time to around 80%. In some cases the app is trying to play 3+ videos simultaneously maintaining some sync so it's no big surprise that load for decompression would be high. BTW, I am highly disappointed in the lack of low level hooks that the netstream gives for operating between iframes. I would have expected a step operation there. Another glaring hole seems to be a settable FPS. Everything my research has turned up thus far in these areas looks like these *might* be possible if I am willing to invest in a FMS and only handle content that I serve from there.
  14. Hi Jack, This is more of a grasping at straws question. I am profiling an application that I have using loaderMax for all of the load and display of images and videos. We are having issues with the framerate dropping into the single digits and are trying to track down the issue. The profiler (flex) claims that >50% of the cumulative time spent is in a method cryptically named "[tincan]". Googling around dug up the following: Information on this is pretty sparse so I am not sure how much I trust it to not be a dozen guys all quoting each other but I have not found another explanation and it's at least consistent with the profiler doc on bracketed methods ( The reason I brought this to your door is that I was lead to believe that the loaderMax library would not use the RTMP methods. So either they were incorrect or I am doing something I shouldn't be in my code. Either way, I am at an impasse. I'd like to figure out where half my time is going. Am I using your library incorrectly? Does tincan include the base netstream and video objects? Any hints you could provide, or directions you could set me off in would be useful. Thanks!
  15. Yup, I included the com directory in there in case I am a couple days out of date.