I have created a site that uses one swf file (menu.swf) to control the playhead in another (info.swf) located in another frame, using the localconnection method, and it worked fine until I added a preloader for info.swf. The buttons in menu.swf still work, but they each link to frames in info.swf that are two frames up the timeline from the frame they are supposed to link to. I have used frame labels instead of numbers hoping that would help, but no joy.
My preloader is in a seperate scene from the main site within info.swf, and it’s two frames long. This can’t be a coincidence. It’s pretty simple affair, in frame 1 I have:
[COLOR=RoyalBlue] ifFrameLoaded (“Scene 1”, “gallery”) {
gotoAndPlay(“Scene 1”, “homePage”);
}[/COLOR]
And in frame 2:
[COLOR=RoyalBlue] gotoAndPlay(“preLoader”, “loaderFrameOne”);[/COLOR]
I tested it on the Net and it works fine, but it still screws up the navigation. The internal links within info.swf remain unaffected and work perfectly. I have tried moving all the frames in info.swf up the timeline by two frames, but it didn’t help. I fact it doesn’t matter where you put the frames on the timeline, start at frame 1 or 1001 the menu buttons still link to the same frames, exactly two frames out of step.
Here is the code in menu.swf:
[COLOR=RoyalBlue]var localConnection_lc:LocalConnection = new LocalConnection();
music_btn.onRelease = function():Void {
localConnection_lc.send("_toInfoSwf", “gotoFrame”, “musicmain”);
};
home_btn.onRelease = function():Void {
localConnection_lc.send("_toInfoSwf", “gotoFrame”, “homepage”);
};
gallery_btn.onRelease = function():Void {
localConnection_lc.send("_toInfoSwf", “gotoFrame”, “gallery”);
};
forum_btn.onRelease = function():Void {
localConnection_lc.send("_toInfoSwf", “gotoFrame”, “forum”);
};[/COLOR]
And in info.swf:
[COLOR=RoyalBlue]var localConnection_lc:LocalConnection = new LocalConnection();
localConnection_lc.connect("_toInfoSwf");
localConnection_lc.gotoFrame = function(frame:Number):Void {
gotoAndStop(“Scene 1”, frame);
};[/COLOR]
Any help will be much appriciated, this one is driving me nuts,
Praha.