PDA

View Full Version : Movie within a movie loops when it shouldn't



Xaymite
06-22-2005, 05:06 PM
I have placed the test files on our internet site for anyone who wants to see the issue. http://www.summitcontractors.com/complete/MainMovie-Scroller1.swf
Click on PROJECTS and then Apartment Communities.

The Apartment Communities button has the following code in movie 1:
on (release) {
removeMovieClip(condo_gallery);
removeMovieClip(senior_gallery);
removeMovieClip(student_gallery);
removeMovieClip(lihtc_gallery);
removeMovieClip(office_gallery);
removeMovieClip(distro_gallery);
removeMovieClip(retail_gallery);
removeMovieClip(hotel_gallery);
removeMovieClip(institute_gallery);
}
on (release) {
this.createEmptyMovieClip("apts_gallery",2);
empty_mc._x = -200;
empty_mc._y = 100;
loadMovie("apts_gallery.swf",apts_gallery);
}

The Gallery looks great by itself:
http://www.summitcontractors.com/complete/apts_gallery.swf
The source I am using can be found at:
http://www.summitcontractors.com/complete/apts_gallery.fla

I found the gallery FLA on a website and it is what I want to display in the window at the bottom of the screen. I haven't lined anything up or made a nice background, so forgive the look. Just want to get this working first.

NTD
06-23-2005, 12:37 AM
Hi,

I haven't looked at your file, but it appears your just missing stop actions on the necessary frames. Another possibility is you have an onEnterFrame event trying to control a timeline and it is overriding the stop actions. Also, when using the loadMovie command, the preferred method is...

movieClipHolderName.loadMovie("someMovie.swf");

Xaymite
06-23-2005, 11:16 AM
Okay, I changed the line:
loadMovie("apts_gallery.swf",apts_gallery);
To:
apts_gallery.loadMovie("apts_gallery.swf");

But that didn't do anything.
I have also posted the FLA I am working with:
http://www.summitcontractors.com/complete/MainMovie-Scroller1.fla

I NEED to learn ActionScript! Thank god for Lynda.com! All I am basically trying to do is create a flash project and publish it so that when we need to do updates, the pictures can be changed from outside of flash and we might have to update a text file or something. Let me know what I am doing wrong or if I am going about this the wrong way.

NTD
06-24-2005, 02:06 AM
Hi,

I can't look at the file you posted because it is in FlashMX2004 format. I only have MX. I resisted upgradeing because I didn't like the way MX2004 was designed. I hope the newest release later this summer will be more complete and user friendly. Anyway, I can show you how to use a textfile to manipulate content in a flash movie. The best way is with the loadVars method.....


myVars = new LoadVars();
myVars.onLoad = function(success) {
//check to make sure the textfile loads
if (!success) {
trace("Failed to load!");
} else {
//since the file loaded, populate whatever variables you want from the textfield
myVariable1 = myVars.myVariable1;
myVariable2 = myVars.myVariable2;
}
}
myVars.load("someFile.txt");


The textfield would look like.....

myVariable1="NTD"&myVariable2="Consulting"

Then, you could use something like....

myTextfield.text=myVariable1;

This is all typed very quickly without testing but it should give you the general idea of how LoadVars works for loading a textfile and manageing the data from that file.

NTD