Newbie. Need help with external swf files and pathing

This is a discussion on "Newbie. Need help with external swf files and pathing" within the Flash & Multimedia Forum section. This forum, and the thread "Newbie. Need help with external swf files and pathing are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Apr 10th, 2007, 18:07
Junior Member
Join Date: Feb 2007
Location: England
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Newbie. Need help with external swf files and pathing

Hi everyone, thanks in advance to anyone who can help,
My problem is that I have a main file which loads external swfs into a mc, one of these swfs has more buttons which are meant to load more external swfs in to a second mc, now it's not working. The button movieclip won't work and the external file won't load, it's probably a path problem but I don't know how to path.
So the main timeline is on fla file called "leather5a.swf" which has a mc container called "containerone_mc" and into this goes an external file called "collectionsb.swf". On the last frame of collectionb.swf is
Code: Select all
 
_root.containerone_mc.loadMovie(_root.currMovie+".swf");
In this swf is a mc container called "containertwo_mc" and mc buttons. On an invisible button over one of these mc buttons is this AS
Code: Select all
on (rollOver) {
_parent.mouse_over_purses_mc = true;
}

on (rollOut) {
_parent.mouse_over_purses_mc = fstartlse;
}


on (release) {

if (_parent.currMovie == undefined) {

_parent.currMovie = "purses";
containertwo_mc.loadMovie("purses.swf");
} else if (_parent.currMovie != "purses") {
if (containertwo_mc._currentframe >= containertwo_mc.midframe) {

_parent.currMovie = "purses";
containertwo_mc.play();

}

}

}
And on the AS layer is the code for this button
Code: Select all
_parent.purses_mc.onEnterFrame = function() {
if (mouse_over_purses_mc) {
_parent.purses_mc.nextFrame();
} else {
_parent.purses_mc.prevFrame();
}
};
Then into containertwo_mc goes "purses.swf" and on the last frame of the AS layer of purses.swf goes this
Code: Select all
_root.containertwo_mc.loadMovie(_root.currMovie+".swf");
obviously I know _root and _parent is wrong but I don't know what to put in. If anyone can tell me I would really appreciate it as I cannot find any tutorials explaining this point.
Thanks, rollo

Last edited by cjrollo; Apr 10th, 2007 at 20:11. Reason: Please use [code]...[/code] tags when displaying code!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Apr 10th, 2007, 22:13
Junior Member
Join Date: Apr 2007
Location: Gloucester, UK
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Newbie. Need help with external swf files and pathing

It would be really helpful if you could post the fla files so I could see what you're describing. I tend to use relative paths for flash work since the code is often usable in other areas as well and it saves having to edit all of your paths again. Just my personal preference though.

I'm afraid I am not sure at what point you are getting the problem (and in which script) but I did see the following.

Where you have:

Code: Select all
_root.containertwo_mc.loadMovie(_root.currMovie+".swf");
the root is leather5a.swf which contains containerone_mc. containerone_mc contains containertwo_mc, is that right?

If so, to reference containertwo_mc from the root you would need to use the following code.

Code: Select all
_root.containerone_mc.containertwo_mc.loadMovie(_root.currMovie+".swf");
Or, you should be able to use:

Code: Select all
_parent.containertwo_mc.loadMovie(_root.currMovie+".swf");
It occurs to me that you seam to have currMovie as something used at every level. I would suggest looking at it as a global variable. They're easy to define, just use

Code: Select all
_global.currMovie = [insert value here];
and from then on you can refer to the variable as currMovie no matter which level you are on. That's been handy for me a few times but of course it might not be useful to you depending on the rest of the project

As for the rest of the script, I was a little unsure as to which level each one was on so I'm not sure if the paths are correct.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Apr 11th, 2007, 22:01
Junior Member
Join Date: Feb 2007
Location: England
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Newbie. Need help with external swf files and pathing

Hi just got in and found your message, thanks for responding,
The structure is like this
leather5a.fla - main timeline
has in it an empty mc container
containerone-mc
in this goes various external swf files. One of them is called
collectionsb.swf
in this are more buttons and another empty mc container called
containertwo_mc
in to this go various external swf files such as purses.swf
Which files do you want me to post up
How about collectionsb.fla and purses.fla
I can send the leather5a.fla but i just need to do some cleaning up and simplifiying before so it makes more sense cause it's a bit messy.
So what do ya say?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
External HD Ryan Fait Webforumz Cafe 16 Jan 11th, 2008 13:28
external js alexgeek JavaScript Forum 6 Sep 23rd, 2007 20:57
pathing problem...but theres more to it trandrus PHP Forum 2 Jan 25th, 2007 21:49
loading external images and txt files ST Flash & Multimedia Forum 9 Aug 2nd, 2005 17:20


All times are GMT. The time now is 22:45.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42