Hi everybody
[FONT=Courier New]I am trying to load an external clip, and when it’s loaded, all other user connected can also see the clip on the stage[/FONT]
[FONT=Courier New]whit this code, the clip is loaded in my screen but not on the screen of other users connected.[/FONT]
[FONT=Courier New]anybody have an idea ?[/FONT]
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 = "image.gif";
btn_load.onRelease = function(){
count_clip++;
charger(curenturl);
}
function charger(curenturl){
var curentclip:MovieClip = _root.createEmptyMovieClip("clip"+count_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("pos", nc.uri, false);
so.onSync = function(list) {
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;
};
so.connect(nc);
};
var leloader:MovieClipLoader = new MovieClipLoader();
leloader.addListener(mclListener);
leloader.loadClip(curenturl, curentclip);
}
function onAnyEvent(event_obj:Object):Void {
so.data.event_obj.targetObject.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;
}