Jump to content
GreenSock

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

scotbord

Members
  • Posts

    22
  • Joined

  • Last visited

scotbord's Achievements

0

Reputation

  1. Hello, I am very sorry for the delay. I was into my work and completely forgot I posted a message here. The problem was coming from my code. The click off event is launched when deleting an item. I added an event listener that called the deselectAll() function, hence causing the bug described above. Thank you
  2. Hello, I have a problem when using the function deleteSelection. When I use it with one item, everything is fine. But when I delete several item at the same time (multiple selection) it deletes only one item and throws an error (cannot access object of null reference). So for instance we have 2 items: On the first looping it deletes the first item. On the second looping, item = _selectedItems[i] only points to null because _selectedItems is empty (while there were 2 items in it on the first looping) Do you have any idea where that might come from ? Thank you
  3. As usual the application has achieved epic size and to send an example is just too time consuming/difficult... Just to say however that I have noticed that this is happening with the graphics set with 9-slice scaling enabled (well here's a thing I've got the guides enabled - what does this mean?) So just to recap, I have a movieClip authored in Flash Professional which I am bringing as a class in my script (not setting any 9-slice scaling there) then I get behaviour as one would expect with constrainScale set to true and odd behaviour when set to false. Sorry for the length in reply - thankfully very busy currently (hurrah) Alan
  4. Hi, I'm having issues with toggle constrainScale, I am dealing with text, image and vector graphics in different ways calling the manager.constrainScale= differently for each one. (false,true and false respectively) All is fine with the text and image (loaded with some new fangled Loader classes) but with what were quite complicated movieClips and now very simple Sprites (with drawRect) the Sprite when scaled 'pops' down to a constrained size when deselected (using deselectAll()). This is a legacy project and I have been using TransformManager for a couple of years (very happily) now and not seen this before - the legacy projects that I have no problems with are version 1.72. I first noticed when going to 1.931. Just btw in updating I now load all the liquid stage classes too. Thanks in advance Alan
  5. Well, most of times im interested in manipulating images. Those images are Loaded with an ImageLoader. It is convenient for me to create a class that has all the functionalities I want with this image. If I am using a loader. I have to add the content of the loader to my class: loader = new ImageLoader("path to the image.jpg",vars); var image:Image = new Image() image.addChild(loader) This makes me having a sprite sitting on another sprite on which sits rawContent. I'd rather have the ContentDisplay available right away and with which I can use my own method if needed.
  6. Several time in my application I need to use an ImageLoader but do lot of things on the contentdisplay. I therefore made classes that extend ContentDisplay and add the ImageLoader in the constructor. It seems ImageLoader creates its own contentdislpay and forget about mine. When I use the setContentDisplay function it almost works. Images are added but not with the correct fitWidth or fitHeight I set. Could you add a variable that allow setting the contentdisplay? Thanks
  7. Hello, I am using an application where I have to scale objects only up and down. They cannot move, and scale on X is disable. I was wondering if it'd be possible to display the scaleCursor over all the handles when lockPosition is true ? Thanks
  8. Hello, I am using FlashBuilder so I cannot make fla with that. It gives the same result for me as well. But it's during the initialisation of the ImageLoader. override public function addChild(child:DisplayObject):DisplayObject { trace(child.width) // give 0 with child being a ContentDisplayObject return _browser.addChild(child) } public function loadImage(file:FileData):void { var vars:ImageLoaderVars = new ImageLoaderVars; vars.autoDispose = false vars.bgColor = ColorLibrary.LIGHT_MIDGREY vars.bgAlpha = 1 vars.width = _pictureSize vars.height = _pictureSize vars.scaleMode = "proportionalInside" vars.name = file.name vars.context = NEditor.CONTEXT vars.container = this vars.smoothing = true var loader:ImageLoader = new ImageLoader(file.path,vars); trace(loader.content.width) // give same value as _pictureSize loader.load(); trace(loader.content.width) // give same value as _pictureSize } May be it's not a bug and a design decision. But I thought the point of giving it a size at the begining (especially when you give it a background color) was that the display object will right away size to the dimension that were given. No?
  9. Hello, I am loading images for a gallery, and I need them to have a predefined background. So I set the parameters height and width in the vars variable. I am also using the container parameter to add the pictures straight to the container. However when the ContentDisplayObject is being added to the container the object width and height report 0. Do you know what might cause the problem? Thank you
  10. Thanks for your prompt and helpful reply
  11. Hello I am extending LoaderItem to use with a class called AMFLoader for loading data from AMF services. package nashi.amf { import flash.net.Responder; import flash.net.NetConnection; import nashi.amf.AMFService; import com.greensock.events.LoaderEvent; import com.greensock.loading.core.LoaderItem; import flash.events.NetStatusEvent; public class AMFLoader extends LoaderItem { private var _gateway:String private var _parameters:Object; private var _serviceName:String private var _netconnection:NetConnection public function AMFLoader(gateway:String,serviceName:String,parameters:Object=null,vars:Object=null) { super(vars); _type = "AMFLoader" _gateway = gateway _parameters = parameters==null?{}:parameters _serviceName = serviceName _netconnection = new NetConnection } override public function load(flushContent:Boolean=false):void { super.load(flushContent) _netconnection.addEventListener(NetStatusEvent.NET_STATUS,onNetStatusEvent) _netconnection.connect(AMFService.GATEWAY_ADDRESS); _netconnection.call(_serviceName,new Responder(onResponse,onFail),_parameters) } private function onNetStatusEvent(e:NetStatusEvent):void { _netconnection.removeEventListener(NetStatusEvent.NET_STATUS,onNetStatusEvent) if(e.info.level=="error"){ _netconnection.close() var loader:AMFLoader = new AMFLoader( AMFService.GATEWAY_ADDRESS_DEBUG, AMFService.DEBUG_SERVICE_getErrorLog, {}, {onComplete:onDebugComplete, onFail:onDebugFail} ) } } private function onResponse(response:Object):void { _content = response _netconnection.close(); dispatchEvent(new LoaderEvent(LoaderEvent.COMPLETE,this)); } private function onFail(fail:Object):void { _content = fail.toString() _netconnection.close(); dispatchEvent(new LoaderEvent(LoaderEvent.FAIL,this)); } private function onDebugComplete(evt:LoaderEvent):void { dispatchEvent(new LoaderEvent(LoaderEvent.ERROR,this,"Could not load data from service <"+_serviceName+"> see log:\n"+_content)) (evt.target as AMFLoader).netconnection.close() } private function onDebugFail(evt:LoaderEvent):void { dispatchEvent(new LoaderEvent(LoaderEvent.ERROR,this,"Could not get error log for service <"+_serviceName+">")) (evt.target as AMFLoader).netconnection.close() } public function get netconnection():NetConnection { return _netconnection; } } } The problem is that when I use this loader the completeEvent is not listened by the internal mechanism of LoaderItem. If I do this: _loader = new AMFLoader( AMFService.GATEWAY_ADDRESS, AMFService.FILE_SERVICE_listDir, {path:"assets/images/"}, {onComplete:completeHandler}); _loader.load() The completeHandler function does not launch. But if I go: _loader = new AMFLoader( AMFService.GATEWAY_ADDRESS, AMFService.FILE_SERVICE_listDir, {path:"assets/images/"}, {onComplete:completeHandler}); _loader.load() _loader.addEventListener(LoaderEvent.COMPLETE,completeHanlder); The compleHandler function does work Any idea?
  12. Sorry, this is quite a big project and is a bit hard to do a sample Project. The problem disappeared. It was due to a bit of code that I commented out to debug. Sorry for that, thx for your time.
  13. I checked and everything I add to the TransformManager is added to the stage before, I am 200% sure. However it seems the "innited" parameter stays to false (im not sure what it is doing) in the the function initParent($parent:DisplayObjectContainer) shouldn't " if(!_initted && _parent == null) be if (!_initted || _parent == null) instead ? It works much better for me like this
  14. I saved all items in an array and then added them using addItem but it now throws an error when i click on items Error("Key class has yet been initialized."); I do not understand this one
×