Jump to content
GreenSock

startx25

load external clip

Recommended Posts

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();


}

}



Link to comment
Share on other sites

Sorry, I'm not sure how Flash Media Server handles things. Sounds like a problem in FMS.

Link to comment
Share on other sites

Hi thanks for your help

 

no the fms work fine, the problem is to lunch more that one clip and apply the tranform.

 

who can i load the clip to all people seing the page ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×