Connect .swf sections in site
I am creating a website with different sections (home, portfolio... - each of them has a full-screen looped video as a background)
I made a separated .swf for each section in order to reduce their size.
I just need to know how can I connect these .swf in order to navigate from one section to any other in the website.
What would be the easiest way to do so?
Is there a way to do it using the available Actions/code snippets included in Flash CS5?
sorry i can't give you into on 'snippets', but here is how you could go about coding it yourself.
on your main timeline, place movieclips to act as you navigation buttons, .
create a Loader to load in your external SWFs .
write code to then load the correct external SWFs.
here is some very basic, but complete, code which will do just that.
of course you would want to add more code to take diffenet things into consideration.
1) declare your Loader which will load inthe external SWFs.
2) declare your URL requests to poinjt to the external SWFs
3) add the Loader to the stage/display list
4) give your buttons event listeners
5) write the CLICK functions which will load in the correct SWF.
hope that helps get you started.
Thanks a lot demetri,
It will really help me to get started and well into it :-)
I have followed the advice in this thread - I am working on a web (ActionScript3) that uses different .swf for each section - each .swf has its own navigation buttons. (see [*1] below for the code)
Each section has videos on it. In order to stop the video when switching to another section, each navigation button pauses the video in that section. (see [*2] below for the code)
Each time you click on the same button (or a different one) it seems that .swf loads again and again and there's no way to stop the sound even when you have already switched to another section.
I guess I'm doing something wrong - my web is almost finished http://www.cristinagarciabook.com/ but can't find a solution to this problem.
I'd be thankful for some help here.
/* Click to Load/Unload SWF or Image from a URL.
Clicking on the symbol instance loads and displays the specified SWF or image URL. Clicking on the symbol instance a second time unloads the SWF or image.
//This variable keeps track of whether you want to load or unload the SWF
var fl_ToLoad_3:Boolean = true;
fl_Loader_3 = new Loader();
fl_Loader_3 = null;
// Toggle whether you want to load or unload the SWF
fl_ToLoad_3 = !fl_ToLoad_3;
/* Click To Pause Video (Requires FLVPlayback component)
Clicking on the symbol instance pauses the video in the specified FLVPlayback component instance.
1. Replace video_instance_name below with the instance name of the FLVPlayback component that you want to pause.
// Replace video_instance_name with the instance name of the video component