Jump to content
Search Community

retropunk last won the day on April 16 2015

retropunk had the most liked content!

retropunk

Members
  • Posts

    181
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by retropunk

  1. Hey Jack,m I am using the following: var manager : TransformManager = new TransformManager( {bounds:new Rectangle( IMAGE_VIEWPORT.x, IMAGE_VIEWPORT.y, IMAGE_VIEWPORT.width, IMAGE_VIEWPORT.height )} ); var crop : Crop = new Crop( _imageContainer, manager ); crop.cropMode = true; manager.selectItem( crop ); and it works PERFECT. The mask fits perfectly to the loaded image. And the bounds are perfectly set. What I am wondering is if I can set the properties of the crop area afterwards? For instance could I set the crop so its half the size of the loaded image and centered in the middle, while keeping my bounds? Does that make sense? Thanks append so I searched through the Crop.as and the forum and modified the Crop.as a tiny bit to include the ability to pass in a Rectangle. It would be SO killer if I could use configureCropMode() to assign the values after the fact. I'm sure there is a better way to implement this idea. I'm attaching my modified Crop.as file I apologize if this already exists! Either way it was empowering to add a small thing to your code and have it work! Curious to hear our thoughts Thanks Jack - Patrick - Patrick
  2. Ha! I didn't think to look at the manager! I was looking to the crop for the method. DOH! Thanks Jack! This tool is really amazing. Patrick
  3. I tried that first but I only see the mask without the resize handles...is there another method to launch the handles as well? Thanks
  4. I am wondering if I can have the crop auto select without having to DOUBLE_CLICK I am using your example at the moment: var manager:TransformManager = new TransformManager({bounds:new Rectangle(0, 0, 1100, 850)}); var crop:Crop = new Crop(_imageContainer, manager); I remember doing something like that in the AS2 version of the Transform Tool...but that didn't do cropping I don't think. Thanks for the help - Patrick
  5. Thanks Carl. Using copyPixels is great but the Memory thing is baffling. I can destroy the bitmaps from memory but the memory seems to increase even after I destroy the bitmaps. For example: 1. Flash starts and memory is at 80 2. I load 10 bitmaps and use copyPixels. the memory is at 200 3. I destroy all 10 bitmaps and the memory is 90 4. I load 10 bitmaps again and use copyPixels. the memory is at 220 etc Not sure how to pin pint the leak. Might be a garbage collection thing Thanks for the insight though rock on
  6. Hey there, I am wondering if I can use BlitMask for this idea. I have a series of PNG files that when played in sequence is a 360 rotation of an engine. I have code that lets the user click and drag which plays the sequence forward/backward. It's basically a poor mans QTVR. So it doesn't scroll as much as it updates the rect with a new bitmap I am creating another version for the iPad that uses copyPixels and cloning. It works great on the desktop but I was curious if BlitMask will do what I've described. I am having memory issues so I am exploring alternatives to my own copyPixels and cloning solutions. Thanks! - Patrick
  7. Using Local Connection is the answer! Pretty easy to setup and works like a charm with SWFLoader. Thanks!
  8. Hey guys, I have 4 separately built SWF projects that I need to load from one UI. What I need help with is how do I unload a SWF after it is loaded? Now of course there is the unload method, but the problem is once the SWF is loaded I need to hide the UI. So I need to call the unload from inside one of the other loaded SWFs. So my question is: Can I dispatch an event from a loaded SWF out to the UI that loaded the SWF so the UI can perform the unload method? Am I looking at a Local Connection solution? SWF talking to SWF? I hope that makes sense. Thanks guys!
  9. Yeah it's the latter. I've been doing for loops with unique tweens for each for a while but the allFromTo seemed so close to what I was thinking. Thanks Carl!
  10. Hey guys, I was wondering if I could do something like this: TweenMax.allFromTo(contentArray, .3, {alpha:0, x:0}, {alpha:1, x:[0, 20, 50]}, 0.2); Where the x value in the "from" vars would be 0 and the "to" vars would be an array of positions? Now I know that this code doesn't work but my question is can I get that to work another way? Normally I would use a for loop and loop through the array using TweenLite. But I was just messing around with allFromTo and it seems so close! Thanks - Patrick
  11. Jamie: It seems that warning is a separate issue not related to my initial question. So thanks for making me look twice! I'll need to set aside time to look at these assets I've been given and see whats up. There might be som funky Illustrator stuff going on. Thank you! Carl: Thanks for the multiple solutions #2 is EXACTLY what I was looking for. I was originally using Object but I knew it was wrong. Thanks a million!
  12. Yeah I'm not sure why I'm getting that warning. What I'm trying to do is just to have a global variable with a tween type private var tweenStyle:Object = Quad.easeInOut; Because in this particular file there are about 60 animations all using the same tween type. So instead of find and replace every time, I could use a variable. I just don't know what to set as the type. Make sense?
  13. Hi guys, check it out. I am working on an animation and I need to declare the animation style in a global variable like this: private var tweenStyle:Object = Quad.easeInOut; setting tweenStyle as an Object doesn't seem right. It works but I get this warning in Flash: "Warning: Filter will not render. The DisplayObject's filtered dimensions (53687120, 20132662) are too large to be drawn." I tried setting it as a String, but that doesn't work. private var tweenStyle:String = "Quad.easeInOut"; Any ideas? Thanks! - Patrick
  14. oh nice! I didn't even think of that! Thanks! The reason I did it the reverse way is because in the example I have there are panels with info on them. So when someone rolls over the flash the animation will pause so they can read the slide. Then when the roll out the animation will continue. Check out my file, you'll see what I mean. Either way your solution seems perfect. Check out my solution so far. http://retropunk.com/files/Carousel-Microsite.zip This is still a prototype but I am trying to get the scroller to be as dynamic as possible but fairly easy to update (xml, external files etc). I also need to figure out how to use a small nav (4 little white boxes) to be able to jump gracefully from slide to slide....tricky! I've done this in the past plenty of times but not using Greensock. I've been wanting to use TimelineMax and I'll make any excuse to learn the Greensock libraries more! You're infinite scroller gave me the idea to give it a try so thanks! Let me know what you think.
  15. Hey Carl , yeah I tried exactly what you suggested already but the reset goes crazy if you roll off an on a couple of times. It's fine that the tween finishes if it has already started but I need to interrupt the delays inbetween. I'm gonna try and implement TimelineMax into this scenario. I think thats my best bet. If I run into a problem with that I'll post again I'll post my solution later. I think this rotator I am working on will be useful for other people. I am also building a nav so you can skip to any slide in the array of movieclips. Thanks for responding so fast!
  16. Hey guys, been a while! I am using a snippet of code from SnorklTV's infinite scroller along with Greensock of course and I am trying to implement a pause function when the user rolls their mouse in and out of focus of the Flash. I have the detection working but I am not sure how to pause the Tweens. Do I need to wrap this into a Timeline? Any ideas? Thanks! var isPaused:Boolean; this.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseOn); this.stage.addEventListener(Event.MOUSE_LEAVE, mouseOff); function mouseOn(evt:MouseEvent):void { this.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseOn); traceText.text = "mouse on the stage"; isPaused = true; } function mouseOff(evt:Event):void { this.stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseOn); traceText.text = "mouse off the stage"; isPaused = false; } function scrollIt() { TweenMax.to(parent_mc, 1, {x:String(distanceToScroll), onComplete:resetDelay}); for each (var mc in parent_mc) { if (mc.x <= -395) { mc.x += lastItemX; } } } function resetDelay() { TweenLite.delayedCall( 1, reset ); } function reset() { for each (var mc in parent_mc) { mc.x += distanceToScroll; } parent_mc.x = startX; TweenLite.delayedCall(1, scrollIt); } TweenLite.delayedCall( 1, scrollIt );
  17. DOH! I didn't think to look there...got em! Thanks Jack. Totally helpful.
  18. Hi Jack, I'm messing around with the demo swf for TweenProxy3D....very very cool. Is there any other documentation on TweenProxy3D? Thanks! - Patrick
  19. I tripled checked to make sure my AS files were ok but then I went back and checked my SWFLoader code...since I'm new at using it I added the container and now it's working! so this var _swfLoader = new SWFLoader("main.swf", {noCache:true, estimatedBytes:900000, onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); became this var _swfLoader = new SWFLoader("main.swf", {container:this, noCache:true, estimatedBytes:900000, onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); I'm still learning your classes...thanks for the fast help. My bad!
  20. I just started getting this error when I used LoaderMax for the first time. I have a base.swf with the LoaderMax code that loads a main.swf. main.swf works fine on it's own but when I use the base.swf to load it I get the Error #1069: Property cachedOrphan not found. This is my first time using SWFLoader...any thoughts? import com.greensock.*; import com.greensock.easing.*; import com.greensock.events.LoaderEvent; import com.greensock.loading.*; import com.greensock.loading.display.*; import com.greensock.plugins.*; // SWF goes here var _swfLoader = new SWFLoader("main.swf", {noCache:true, estimatedBytes:900000, onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler}); var _progressDisplay = new ProgressCircleLite({radius:25, thickness:4, color:0x000000, textColor:0x000000, trackColor:0xFFFFFF, trackAlpha:0.9, trackThickness:4, autoTransition:true, smoothProgress:0}); addChild (_progressDisplay); _progressDisplay.mouseEnabled = false; _progressDisplay.x = stage.stageWidth / 2; _progressDisplay.y = stage.stageHeight / 2; _progressDisplay.addLoader ( _swfLoader ); _swfLoader.load( true ); function progressHandler (event:LoaderEvent):void { //trace ("progress: " + event.target.progress); } function completeHandler (event:LoaderEvent):void { removeChild ( _progressDisplay ); addChild ( event.target.content ); } function errorHandler (event:LoaderEvent):void { trace ("error occured with " + event.target + ": " + event.text); }
  21. YES! That was it! I added this before the draw() and now it works perfectly! var rect:Rectangle = new Rectangle(0, 0, 800, 600); bmd.fillRect(rect, 0x00FFFFFF); Thanks for helping! - P
  22. Hey guys, I am stuck on a small bit of code and I'm hoping to get some help. I am using the Transform Manager to create a Virtual Post card creator. The problem happens when I try to create a screen shot of the postcard using draw() I am able to snap the screenshot just fine but I am unable to remove the previous screen shot when a new one is created. Check the link below. Maybe there is a better way to do it? 1. Add just one image to the stage from the right nav and click NEXT to see the screen shot 2. Then go back and move the image to another spot and click NEXT again 3. You'll see the updated screen shot but you'll also see the previous one. This is where the problem is. I need to remove the previous one. You'll see how I am trying to use removeChild but maybe I am using it wrong? http://www.z100.com/common/patrick/combos/combos-v1.0.html var bmd:BitmapData; bmd = new BitmapData( 800, 600, true, 0xF5780E ); var bitmap:Bitmap = new Bitmap( bmd ); var resetTheScreenShot = false; function screenGrab():void { if(resetTheScreenShot){ // this isn't working properly -- need to fix the screen shot grab MovieClip(parent).mcSelectFlavor.screengrab.removeChild( bitmap ); } resetTheScreenShot = true; MovieClip(parent).mcSelectFlavor.screengrab.addChild( bitmap ); dropArea.managerObj.deselectAll(); bmd.draw(dropArea); } btw - I realize that this problem has nothing to do with the Transform Manager... Hopefully someone can still point me in the right direction. Thanks guys - Patrick
  23. jeez I must need sleep tonight. I didn't think I needed the "this" in front...oof Thanks man, kick ass
  24. Hey guys - Sorry for the lame post but I need to turn this redundant code: timeline.append( new TweenMax(clip1.clip, speedIn, {y:"-130", ease:easeInType}) ); timeline.append( new TweenMax(clip1.clip, speedOut, {y:"130", delay:.6}) ); timeline.append( new TweenMax(clip2.clip, speedIn, {y:"-130", ease:easeInType}) ); timeline.append( new TweenMax(clip2.clip, speedOut, {y:"130", delay:.6}) ); timeline.append( new TweenMax(clip2.clip, speedIn, {y:"-130", ease:easeInType}) ); timeline.append( new TweenMax(clip2.clip, speedOut, {y:"130", delay:.6}) ); etc... into something like this: var targetClip = ["clip1"].clip; // I know this line is wrong but you see where I'm going? timeline.append( new TweenMax(targetClip, speedIn, {y:"-130", ease:easeInType}) ); timeline.append( new TweenMax(targetClip, speedOut, {y:"130", delay:.6}) ); I have a dozen or so animations happening the way I want but I need to be able to control the targetClip value. The targetClip value will be constantly changing. Thanks in advance for the help! - P
  25. YES! Awesome work guys. I am going to take a long lunch and watch the rest now.
×
×
  • Create New...