Link to home
Start Free TrialLog in
Avatar of imawake
imawake

asked on

Linking from menu to swf's that load in main movie clip

Hi,

I'm trying to make links in my menu to open up swf's in a mc. In this case the clip is called contents...

Anyhow, here is the zip file of what I'm working on.

http://flashmx7.tripod.com/menulinks.zip

I am using regular, old MX.

Thanks to everyone that has helped me thus far. I really appreciate it.

Turns out I was wrong about the code for the links to change the contents of the main mc....

How is it  done? I can't figure it out. I thought iy was:
I tried: links[0]="contents.movieClip"; but that didn't work...

I'm still confused.


Again, thanks for any help...
Avatar of Vicker Leung
Vicker Leung
Flag of Hong Kong image

imawake,

Do you mean that you want to open up an external swf file into a mc?

The code will be as follows

_root.createEmptyMovieClip (mc_loader, _root.getNextHighestDepth());
loadMovie("something.swf",_root.mc_loader);

Cheers
Vicker :)
Avatar of Saggismoon
Saggismoon

Hi imawake,

Take a look at this link:
http://www.geocities.com/saggism00n/mc.swf

Is that wat u wanted?
-menu button on main mc,
-once clicked,
-loads a different mc in itself (main mc)

if so, reply, i'll send u the sample files.

Saggismoon
Avatar of imawake

ASKER

Hi,

I don't think so. In my zip I have files named menu.fla and index.fla. I just need the links from the menu to load something into the main mc on index-test.fla. The main mc is called contents. I'm just wondering what the proper syntax is to make the links work.

I you need me to explain a little more, please just let me know.

Thanks.  
when i open your Links.swf it shows:

XML missing

Have you forgotten to package the XML file with the ZIP?
Avatar of imawake

ASKER

Hi,

I zipped it without the XML file. The scroller works great, it's the menu that I'm having trouble with. In menu.fla, in the code for the links you'll noticed that there's nothing in between the quotes. I'd like to know what should go there for the main mc, "contents" to display the correct file when each corresponding link is clicked? Guys tees opens guysts.swf, girls hats opens girlshats.swf in the main mc (contents) and so on...

Pretty simple I think... except I'm new to this and have tried a few different things that haven't worked.  

I'm learning a lot from EE and am very grateful for everyones awesome help.

I just wish I could get the darn links to work.
ASKER CERTIFIED SOLUTION
Avatar of Member_2_1840827
Member_2_1840827
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of imawake

ASKER

Hi SokhodoM,

That's great, thank you for pointing it out. I was overthinking the whole thing. Thank you so much.

I just have one more quick question and I could make it a new one if need be. I'm still noticing that as the menu expands and detracts, it seems much slower and less fluid than when I view the menu by itself in the player. Do you notice that? Why is that?


You guys are awesome.


   

hi imawake,
May be you can change the speed inside the menu.fla. For quick response, i would say... play with this number:

this.accellerazione =1.8;
this.inerzia = 1;

Cheers m8 :)
SokhodoM
Avatar of imawake

ASKER

Yeah, I thought that would help, but it still kind of lags.

I'm viewing the menu in Firefox and IE...

I wonder... could someone please run the menu in safari or something else to see if it's quick and fluid?

I'd really appreciate it, as always...

If not, that's perfectly fine.

You guys have done so much to help me already...

Thanks to everyone. Keep an eye out for more questions in future...
hi imawake,
I just wish you could give me more rewards here..hahah just kidding..
Anyway, i just went back and see your .fla.. To solve the problem
1-Change the FRAMERATE of your index-test.fla to more than 24. For me, i changed to 30. and it works well

Cheers m8 :)
SokhodoM
Ps: You may ask why? The reason is because in the menu.fla, the framerate is set to 24 so you need to have 24 or more in the index.fla to syncronize the two movies... :)
Avatar of imawake

ASKER

Hey SokhodoM,

Sorry to put you through this again, but I have yet another problem. If you think I should post a new title to earn points, then I surely will. Here it is:

It has to do with x y positioning again. I think the parameters that were set for the menu position are causing the problem...

Well, everything is otherwise working great (the frame rate of 30 works perfectly:)

So, I’m working on the site, revise and publish a few pages. Then, here comes my problem. All the links in the menu go to a working swf that loads in the main mc as you know. However, because I’ve published each of those swf’s (products, team, media, whatever) on a stage with the dimensions of the entire site, 800x446 -- and the mc in which it loads, the same size… as the entire site…  

it creates a problem where the swf loads. They are pushed to one side of the movie, leaving a bunch of white space on the left hand side. I've now just moved everything over to the left on the 800x446 stage in MX of each swf to compensate for the unwanted space/misalignment. In doing this, though, each swf that loads into the main mc (products, contact, whatever) is either misaligned and pushed to one side, or in the right place depending upon whether or not they're loaded from the links in the menu or the links on the bottom navigation. I hope there's a simple solution to this? Please suggest what I could do to fix it. I'll post the files again as well to show you guys.

Thank you

   

At first thought, i think you should take a look at setProperty of the movie clip. Make sure all the movie clips are having the same set of _x, and _y coordinates. Well this will works if all your movies have the same size though..
Finally, if really can't get to work. Plz post your .fla and includes all necesary things there and open a new discussion so all others will have chance to try out yours.
Cheers :)
SokhodoM
Avatar of imawake

ASKER

Hi SokhodoM,

I've posted up my new problem... that, unfortunately, I still can't fix.

I was wondering I you could check it out... since you know the history of my Flash problems.

Here's the link:
https://www.experts-exchange.com/questions/21226997/Positioning-of-SWF-on-MX-Stage-Loading-in-Wrong-Place-Misaligned-Problem-X-Y-Coordinates-ZIP-File.html

It's all in ZIP file. I'll be working on it... so any feedback would be really great.

Thanks