Jump to content
GreenSock

startx25

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by startx25

  1. Hi everybody

     

    When i load an external clip to the stage,

    the clip isn't laoded on all other users connected !

     

    any help ?

     

    here is my code

     

    import gs.TransformManager;
    
    var nc:NetConnection = new NetConnection();
    nc.onStatus = function(result){
    if (result.code = "NetConnection.Connect.Success"){
    }
    }
    nc.connect("rtmp://localhost/fp");
    
    var count_clip = 0;
    curenturl_img = "logo.gif";
    btn_load.onRelease = function(){
    count_clip++;
                   num_clip = "clip"+count_clip;	
    charger(curenturl_img,num_clip);
    }
    
    
    function charger(curenturl,lenum_clip){
    
    var curentclip:MovieClip = _root.createEmptyMovieClip(lenum_clip,getNextHighestDepth());
    var mclListener:Object = new Object();
    mclListener.onLoadInit = function(imageHolder:MovieClip) {
    var manager_obj = new TransformManager({targetObjects:[curentclip], forceSelectionToFront:false, eventHandler:onAnyEvent});
    
    
    so = SharedObject.getRemote("posi", nc.uri, false);
    so.onSync = function(list) { 	
    curentclip._x = so.data.curentclip.x; 	
    curentclip._x = so.data.curentclip.x; 	
    curentclip._y = so.data.curentclip.y;   
    curentclip._width =  so.data.curentclip.width;
                   curentclip._height =  so.data.curentclip.height;
    curentclip._xscale =  so.data.curentclip.xscale;
                   curentclip._yscale =  so.data.curentclip.yscale;
                   curentclip._rotation =  so.data.curentclip.rotation;
    curentclip._alpha =  so.data.curentclip.alpha;
    so.data.curentclip.cnom = curentclip;
    so.data.curentclip.curl = curenturl;
    }; 
    
    so.connect(nc);	
    };
    
    
    var leloader:MovieClipLoader = new MovieClipLoader();
    leloader.addListener(mclListener);
    leloader.loadClip(curenturl, curentclip);
    }
    
    
    
    
    function onAnyEvent(event_obj:Object):Void {
    //trace("Action: "+event_obj.action+", MovieClip or TextField: "+event_obj.targetObject+", transformed?: "+event_obj.transformed);
    var cible = String(event_obj.targetObject);
    
     so.data.cible = cible;
     so.data.cible.x = event_obj.targetObject._x;
     so.data.event_obj.targetObject.y  = event_obj.targetObject._y;
     so.data.event_obj.targetObject.width  = event_obj.targetObject._width;
     so.data.event_obj.targetObject.height  = event_obj.targetObject._height;
     so.data.event_obj.targetObject.xscale =  event_obj.targetObject._xscale;
     so.data.event_obj.targetObject.yscale =  event_obj.targetObject._yscale;
     so.data.event_obj.targetObject.rotation = event_obj.targetObject._rotation;  
     so.data.event_obj.targetObject.alpha = event_obj.targetObject._alpha;  
    
    so.data.flush();
    
    
    }
    
    }
    
    
    
    

×