FORUMS: list search recent posts

Actionscript 2 - External SWF problem

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Amy Gonzalez
Actionscript 2 - External SWF problem
on Sep 24, 2010 at 10:34:00 pm

The problem: My client bought this template and I've been trying to customize it for him. The buttons are actually movieclips that are all the same and they were coded to go to an html. I wanted to code them to load an external swf on the main timeline in an empty movieclip I created.


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.


The other problem is that once I loaded these files onto the client's server to test them out, the swf doesn't work at all: http://www.vsmdemo.net/new/.


Thank you!

Amy
n2dzyne.com


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]