Using one SWF to control another?

  • RyanMegaphors
  • Newbie
  • Newbie
  • RyanMegaphors
  • Posts: 5

Post 3+ Months Ago

Hey guys,

New here and having to tackle a website for a client...but am running into some problems.

Previously, I have been building the site section by section...so there's a SWF file for each section of the website. So if there is a gallery, services, and locations section....I've built seperate SWF files for each.

Now, I was going to create a base FLA file where I import my menu.swf and use that menu to control the frames in my base FLA file (which will contain all my sections).

How do I do this? It seems like there should be some sort of way to accomplish this...and I've only got until Friday 1pm. :(

Or am I going about building the website the wrong way? Help is SO GREATLY appreciated.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

how? .... easy:
menuItem.onPress = function()
{
mc.loadMovie("name.swf");
}
  • RyanMegaphors
  • Newbie
  • Newbie
  • RyanMegaphors
  • Posts: 5

Post 3+ Months Ago

IceCold wrote:
how? .... easy:
menuItem.onPress = function()
{
mc.loadMovie("name.swf");
}


Thanks tons for the help...however...I get this as an actionscript error message...

-----------------------------
Error** Symbol=MenuMovie, layer=sub1, frame=10:Line 1: Statement must appear within on handler
menuItem.onPress = function()

Total ActionScript Errors: 1 Reported Errors: 1
-----------------------------

Any ideas what I'm missing? All I replaced was the name.swf with my file name that I wanted to change...didn't change any other code. I tried to assign it to a button and got that. Your help is so appreciated. I've tried doing searches on all of this such as LoadMovieNum but if I can do it that way, that'd be great.
  • classified
  • Expert
  • Expert
  • User avatar
  • Posts: 540
  • Loc: Bahrain

Post 3+ Months Ago

RyanMegaphors wrote:
IceCold wrote:
how? .... easy:
menuItem.onPress = function()
{
mc.loadMovie("name.swf");
}


Thanks tons for the help...however...I get this as an actionscript error message...

-----------------------------
Error** Symbol=MenuMovie, layer=sub1, frame=10:Line 1: Statement must appear within on handler
menuItem.onPress = function()

Total ActionScript Errors: 1 Reported Errors: 1
-----------------------------

Any ideas what I'm missing? All I replaced was the name.swf with my file name that I wanted to change...didn't change any other code. I tried to assign it to a button and got that. Your help is so appreciated. I've tried doing searches on all of this such as LoadMovieNum but if I can do it that way, that'd be great.


that usually happens when you assign your action ON the button itself ...
try it in the actionscript layer ... a separate layer ...
  • RyanMegaphors
  • Newbie
  • Newbie
  • RyanMegaphors
  • Posts: 5

Post 3+ Months Ago

classified wrote:
that usually happens when you assign your action ON the button itself ...
try it in the actionscript layer ... a separate layer ...


Hmnnn...well if that's the case, how does it know what button does that? I tried and now there's no error, but the button does nothing.

Here's the case:

1. I have it stopped at frame #10 (seperate action script layer) within my menu movie clip.
2. On this frame, there are 9 buttons (the menu in my image).
3. Each of these menu items needs to be able to either go to a specific frame in the menu MC (already accomplished) or load a new SWF file (each section has it's own SWF file)

So if I put that code in a seperate layer in frame #10 (where the menu is stopped until another choice is taken...there is already an AS layer with stop(); there)...how does it associate my loading of 'founders.swf' with my founders button?

Below is my movie, menu movie frame #10 at it's stop function. Would it help to post the exe?

Again, I cant thank you guys enough for the help. I have to meet with the client tomorrow and it'd be nice to have it all linked together.

Image
  • RyanMegaphors
  • Newbie
  • Newbie
  • RyanMegaphors
  • Posts: 5

Post 3+ Months Ago

Seems like I can do this using loadmovienum and stages. Any advantage to keeping movies loaded on seperate stages vs always using stage '1'?

I'll keep you guys posted if I have any issues.
  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

no advantage. i always use 1 stage and many movieclips

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 3 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.