Jump to content
GreenSock

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

TheCosmonaut

Members
  • Posts

    9
  • Joined

  • Last visited

TheCosmonaut's Achievements

0

Reputation

  1. Hey there! I've got an interesting thing going on with Transform Manager: I load an image into the transform manager, then I run a filter on it that removes white from the background. This works fine. However, if I transform the image at all, I get an extra 1px gray border around the bounds of the transformed item. The border exists in random places if the size of the scaled image is anything but its original image size. If you want to see a test example: 1. Go to this URL: http://www.thecosmonaut.com/webtrix/rri/ 2. Click the #3 example under "loadImageByURL(myValue)" 3. Click "Remove White Background" 4. Note that you will see no gray border. Now scale the image -- the gray border will appear. Any ideas what could be causing this and/or any workarounds? Thanks! --eric
  2. Wow - it's always the simplest thing that causes the biggest problems. Thanks much!!
  3. I've got a really weird problem: I have XML that's getting loaded via XMLLoader. When I assign it to an XML object, I can not access any of the nodes inside it. Here's the code: // XML (inside an external file) var myLoader:XMLLoader = new XMLLoader(_settings.loadDataURL, {name:"loadData", onComplete:onLoadData, onError:onLoaderError}); myLoader.load(); private function onLoadData(e:LoaderEvent):void { trace("Main::onLoadData()"); var _dataXML:XML = e.target.content; trace(_dataXML); // Outputs the correct XML trace(_dataXML.angle[0]); // Outputs "undefined" trace(_dataXML.children()); // Outputs both of the angle nodes correctly trace(_dataXML.angle.length()); // Outputs 0 } So although the XML data is getting loaded, and it's getting added to _dataXML, but whenever I try to access anything directly inside _dataXML, Flash thinks it doesn't exist. WTF? I feel like I'm missing something obvious but I've been banging my head against this for hours. Any ideas why this would be happening? Thanks in advance, --eric
  4. Yup! Upgraded to the latest version and still seeing it. Do you have a Private Message I can send the files to?
  5. Hey there! Unfortunately, I AM talking about the bounding box (with handles) that TransformManager creates. It's a strange bug - I've tested on other platforms (Mac Safari, Mac Chrome) and it only appears to happen on Mac Firefox 4. Have you seen this type of behavior before? I've got three different TransformManagers on my stage - would that potentially be causing the issue? Best, --eric
  6. Hi there! I've got an application with multiple transform managers overlapping. Users upload an image into a transform manager and can then resize and reposition the various managers. The managers are not forced to front and I have autoDeselect set to true. Everything is working like a charm. The only strange behavior is that if I resize an element, move it, and then click click anywhere else in the swf, the bounding box does disappear entirely. Sometimes half the box disappears, sometimes the whole box remains. I can't seem to do anything to force the bounding boxes to disappear entirely - I've tried forcibly deselecting the items using Actionscript, I've tried forcibly moving the selection boxes slightly... nothing seems to work. Is this something that anyone has seen before? Any tips on steps I can take to fix it? Thanks in advance, --eric BTW: I'm compiling using CS5 on a Mac, testing using Firefox 4.
  7. I've coded myself into a corner again and could use some help. Take a look at this code: var myIntro:Intro = new Intro(); //-- add image var myIntroBitmap:ContentDisplay = _myContentLoader.getContent("introImage"); myIntro.myBitmapHolder.addChild(myIntroBitmap); var introManager = new TransformManager({targetObjects:[myIntro.myBitmapHolder]}); var myIntroXML:XML = new XML(_myXML.intro.imageXML.item.toXMLString()); introManager.applyItemXML(myIntroXML); Line by line, here's a breakdown of what I'm doing: 1. I create a new instance of my custom class Intro, which is basically a movie clip container. 2. I create a variable myIntroBitmap which is a ContentDisplay 3. I add the ContentDisplay object to a "holder' movie clip inside the Intro. 4. I create a new TransformManager in order to transform the "holder" movie clip 5. I properly format the item XML which I'm receiving from my database 6. I apply the item XML to the transform manager I created The goal is to load an image and then transform it according to the information in the XML. However, this isn't happening -- instead, the bitmap image stays in the upper left corner and a gray box appears which has the proper positioning and dimensions of the transform manager. (see attached) So basically it appears that the transform manager is getting added, and the item XML is getting applied, but neither are manipulating the image itself. Any pointers on what I'm doing wrong? I've tried using the raw content, the main ContentDisplay itself, its parent, and more. I've tried adding the transform manager AFTER I add the Intro to the stage. No matter what I try, I end up with that gray box
  8. Tinkered around and found the problem. The XML was not properly formatted and was therefore coming through as null. This code ended up working: var thisImageXML:XML = new XML(myXML.imageXML.item.toXMLString()); _imgManager.applyItemXML(thisImageXML); Thanks anyway!
  9. Hey there! I've been going through the documentation and can't find any examples of exportItemXML and applyItemXML in action. Here's what I'm trying to do: I've got one SWF where users will load an image (using ImageLoader). Once it's loaded, I create a transform manager and apply it to the image. Users can transform the image. When they're done, I export the XML as a node inside a larger XML structure, and then save it all to a database. This all appears to be working without a problem. Now imagine that the user wants to transform the image again. So they load up the page, we retrieve the item XML from the database, and then apply it to the transform manager. This is where the problem happens: I get the error "TypeError: Error #1009: Cannot access a property or method of a null object reference." This is the XML that we've got on load: Here's the code I'm using to apply the XML: _imgManager.applyItemXML(myXML.imageXML.item as XML); And the error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at com.greensock.transform::TransformManager/applyItemXML() at com.thecosmonaut.view::Builder/onContentInit() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at com.greensock.loading.core::LoaderCore/_completeHandler() Any idea what I'm doing wrong? Thanks in advance, --eric
×