Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by scotbord

  1. 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

  2. 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)



  3. 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



  4. 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()


    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.

  5. 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?



  6. 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 ?



  7. 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
                           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?

  8. 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

  9. 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)
    		_type = "AMFLoader"
    		_gateway = gateway
    		_parameters = parameters==null?{}:parameters
    		_serviceName = serviceName
    		_netconnection = new NetConnection
    	override public function load(flushContent:Boolean=false):void
    		_netconnection.call(_serviceName,new Responder(onResponse,onFail),_parameters)
    	private function onNetStatusEvent(e:NetStatusEvent):void
    			var loader:AMFLoader = new AMFLoader(
    	private function onResponse(response:Object):void
    		_content = response
    		dispatchEvent(new LoaderEvent(LoaderEvent.COMPLETE,this));
    	private function onFail(fail:Object):void
    		_content = fail.toString()
    		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(

    The completeHandler function does not launch. But if I go:

    _loader = new AMFLoader(

    The compleHandler function does work

    Any idea?

  10. 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)


    if (!_initted || _parent == null)

    instead ?

    It works much better for me like this

  11. Hello,


    I have a bug in my application which is entirely flash based (not Flex)) that seems to come from TransformManager.

    Let me explain:


    I have a container on which I add a Textfield, a SimpleButton and an Image, in this order (that's important).


    However when I loop over the list of my container to add those object with addItem(). The image is not there anymore but instead a TextField named "_tmProxy" is there. It has the same x, y, width, and height as my Textfield but has not text on it.


    If I shuffle the order on which I add the objects, for example, Image, Textfield and SImpleButton this works fine. The problem appears ONLY when Textfield is the first element to be added to the transform manager. Even following Textfields added to the TransformManager do not have this problem.


    Thanks for your help

    PS: I am using

    VERSION: 1.914 of TransformManager

    VERSION: 1.91 of TransformItem

  12. Sorry, I still have the same error (when I call content property it claims it is null while it should be a Sprite). But when I steped into your code, I could not find where you assign content to be a new Sprite; Is that normal? Sprit is only mentioned in the ASdoc but is not actually in the code.


    Thank you

  13. I have another problem with ImageLoader.


    I want to be able to load images on the background and to add them to DisplayContainer whenever I want. I should be able to add or remove the image from the container even if it's not fully loaded. The class Loader seems to do that very well.


    For instance I click on a button to display an image that should be loading on the background. The image is not loaded yet, but still added to the container. The user changes his mind, and click on another button, the current image content should be removed from DisplayContainer but keep loading (since it's a Loader), and display the new image (still even if it's not complete). I want to avoid doing multiple request to get image content all the time if a user press buttons many times.


    My images are on the current domain, i.e. ImageLoader content will return a Bitmap, but I want a Loader even with scriptAccessDenied set to false.

    Besides if I try to get content from an image that is not completely loaded it return null.



    Is it possible to add a features to handle the case where I want Loader only, not bitmap.

    Thank you

  14. When executing to load an SWF file, I got this error "ReferenceError: Error #1069: cannot find property stop on ".

    I guess that's because it's assume my SWF is a movie clip, the thing is that it's not. Is it possible to make a Loader that Load swf that are not MovieClip, unless this is just a bug in SWFLoader.


    Here is the code I call

    fontsLoader.append(new SWFLoader("fonts/"+font.@name+".swf",{name:font.@name,autoPlay:false,context:contextLoader}));


    Thank you

  15. Hello,


    [bUG in demo]

    When loading elements in the demo, and when I prioritize one, the others seem to go back to 0% instead of where they stopped.


    [New features]

    I would like a feature to dispatch events when several conditions are met. For instance, I want to load 2 files at the same time, but start processing data when both these files are loaded.

    Therefore I need to know when this is true.


    Thank you