-
1. Re: AS2 - need help with menu movieclips
kglad Sep 24, 2010 7:33 AM (in response to n2dzyne)elsewhere (probably on the main timeline), there's code that uses the value of link to load your html files. you'll need to edit that code.
and i don't see any way to help you resize objects via a forum. you'll need to search your fla or have someone else do that for you.
-
2. Re: AS2 - need help with menu movieclips
n2dzyne Sep 24, 2010 8:04 AM (in response to kglad)Yes, the code to link to an html is on the button "link = "index.html" which is called by the hit button inside that movie clip "getURL
(link)". But I don't want it to call a link. I want it to call an external swf to the main timeline inside an empty movie clip I have created. But when I tried to put in _root.empty_mc.loadMovie("home.swf"); on the main button movie clip in place of the "link = index.html", it doesn't work. I get an "undefined" error.
-
3. Re: AS2 - need help with menu movieclips
kglad Sep 24, 2010 8:22 AM (in response to n2dzyne)that link="index.html" probably does nothing. it's the on(release) code where link is assigned a number that's the key to what's loaded.
-
4. Re: AS2 - need help with menu movieclips
n2dzyne Sep 24, 2010 2:12 PM (in response to kglad)Actually, the link does do something and I've been able to make some progress but now it's another issue.
Here's the code on the menu movieclip (there are 9 menu buttons and each one is coded so that it's supposed to pull up the corresponding SWF):
HOME BUTTON:
onClipEvent (load) {
num = 1;
link = "home.swf";
}WEB DESIGN BUTTON:
onClipEvent (load) {
num = 2;
link = "webdesign.swf";
}--------------------------------------------------------
Here's the action inside the button:
on (rollOver) {
if (_root.link<>num) {
gotoAndPlay("s1");
_root.l["l"+num].gotoAndPlay("s1");
_root.l["l"+(num-1)].gotoAndPlay("s1");
}
}
on (releaseOutside, rollOut) {
if (_root.link<>num) {
gotoAndPlay("s2");
_root.l["l"+num].gotoAndPlay("s2");
_root.l["l"+(num-1)].gotoAndPlay("s2");
_root.for_line = num;
}
}
on (release) {
if (_root.link<>num) {
_parent["item"+_root.link].gotoAndPlay("s2");
_root.all_sub_button["item"+_root.link].gotoAndPlay("s2");
_root.l["l"+_root.link].gotoAndPlay("s2");
_root.l["l"+(_root.link-1)].gotoAndPlay("s2");
_root.link = num;
_root.all_sub_button["item"+_root.link].gotoAndPlay("s1");
_root.empty_mc.loadMovie(link); THIS IS WHAT I CHANGED FROM THE ORIGINAL POST
}
}On the main timeline is an empty movieclip. The problem is that the only swf that is working is the home.swf. Even though the webdesign.swf was a copy of the home document, it doesn't load correctly. See example here: http://www.n2dzyne.com/testing/vsm_flash_v4.html. NOTE, the only buttons with code on them right now that are supposed to work are HOME, WEB DESIGN, WEB HOSTING, AND LOGO DESIGN. All of these are pointing to the home.swf except the web design and the logo design.
I am baffled as to why it would load the home.swf but not the others when the others were created from the same file and the only thing I changed was the file name.
-
5. Re: AS2 - need help with menu movieclips
kglad Sep 24, 2010 2:32 PM (in response to n2dzyne)1. your target movieclip no longer exists or is not visible or
2. link's value is incorrect.
use the trace() function to see if your target movieclip exists.