xt-ric
01-21-2008, 03:18 PM
I tried a communication between 2 hotspots (AS3 swf files)
So, i tried the localconnection class
I 've found this code on the forum
//Place the following in hotspot1:
var my_lc1:LocalConnection = new LocalConnection();
button_mc.onRelease = function(){
my_lc1.send("lc_name", "showClip");
}
//Place the following in hotspot2:
var my_lc2:LocalConnection = new LocalConnection();
my_lc2.showClip= function() {
aMovieClip._visible=0;
};
my_lc2.connect("lc_name");
I've converted this code in AS3
But when i click the button, FFP swith from fullscreen mode in normal mode and i get a Flash Player Error :
TypeError: Error #1009: Il est impossible d'accйder а la propriйtй ou а la mйthode d'une rйfйrence d'objet nul.
at TransitionEffect/::fadeLoaderAlpha()
at TransitionEffect/resize()
at Hotspots/doRender()
at Hotspots/::resizeHandler()
Is there anybody who have a working example of communication between 2 hotspots using LocalConnection in AS3 ??
So, i tried the localconnection class
I 've found this code on the forum
//Place the following in hotspot1:
var my_lc1:LocalConnection = new LocalConnection();
button_mc.onRelease = function(){
my_lc1.send("lc_name", "showClip");
}
//Place the following in hotspot2:
var my_lc2:LocalConnection = new LocalConnection();
my_lc2.showClip= function() {
aMovieClip._visible=0;
};
my_lc2.connect("lc_name");
I've converted this code in AS3
But when i click the button, FFP swith from fullscreen mode in normal mode and i get a Flash Player Error :
TypeError: Error #1009: Il est impossible d'accйder а la propriйtй ou а la mйthode d'une rйfйrence d'objet nul.
at TransitionEffect/::fadeLoaderAlpha()
at TransitionEffect/resize()
at Hotspots/doRender()
at Hotspots/::resizeHandler()
Is there anybody who have a working example of communication between 2 hotspots using LocalConnection in AS3 ??