PDA

View Full Version : I don't get loading movies! (Dim or wot?!)


DarrenShinkins
12-04-2003, 07:59 AM
Hi all,
I've been trawling through tutorials and actionscript dictionary to learn how to learn how to load a movie to the stage when a button is pressed. I follow the syntax as best as I can understand it, but to no avail.

In the actions for the button I'm using to load the movie, on release I'm using the syntax

name_of_movie_to_load.loadMovie( instancename_of_movie , name_of_target_movie , level_number )

where name of movie to load is what I have named the movie I am trying to load,

instance name is a name I have assigned to the new instance of the movie

target is the movie on the stage into which I am trying to load the movie

I have set level number as 1 because I'm not sure which level I am loading into!

Any help would be much appreciated!!!

cheers.
D

CyanBlue
12-04-2003, 09:15 AM
Howdy and Welcome... ;)

There isn't much thing we can do to help you if we don't see what your syntax looks like (unless we want to write a book about it... ;))

Why don't you show us your code and somebody should be able to help you from there... ;)

DarrenShinkins
12-04-2003, 09:56 AM
Good point!

Here's the code pasted from flash MX actions window. the action is for the button I am using to load the movie...

on (release) {
SquareInfo.loadMovie("SquareInfoInstance1", "Viewer1", 1);
}

"SquareInfo" is the movie I am trying to load.

"SquareInfoInstance1" is the name I have set for the instance of the "SquareInfoMovie" to appear on the stage.

"Viewer1" is an instance of the movie "Viewer".
"Viewer" is a movie already on the stage into which I am trying to load the "SquareInfo" movie.

I am attempting to load "SquareInfo" into "Viewer" so can specify to position of square on the stage.

Hop this makes sense... :)

CyanBlue
12-04-2003, 10:04 AM
Um... Your description is going back and forth... :(I am attempting to load "SquareInfo" into "Viewer" so can specify to position of square on the stage.Based on this description, you could try this...someHolderMovieClipOnTheStage.loadMovie("someExternalFileToLoadIntoFlash");
Viewer.loadMovie("SquareInfo.swf");I am not sure what that 'SquareInfo' is... Is that the SquareInfo.swf or SquareInfo.jpg that you want to load into Flash or is it the movieclip within the library that you want to attach into the 'Viewer'???
If it is former, my explanation up ther should work, but if it is latter, then you are not using the right function for it... You need to use attachMovie() function to do that... ;)

DarrenShinkins
12-04-2003, 10:24 AM
Ah, yes,
I've just been re-reading the help about loadmovie, and I can see that it is indeed used for loading .swf files.

You are quite right, I am trying to use it to load a movie from the library!
Just tried it again with attachMovie. Now looks like this...

on (release) {
Viewer1.attachMovie("SquareInfo", "SquareInfo1", 2);
}

Still not working though. I reckon it could be one of a few reasons:

I am not sure what integer to put as the depth because I couldn't quite understand what this should be. If I am loading it into a movie on the main stage would that make it level 2?

Some issue regarding paths? Should I be addressing it as "_root.Viewer1"?

Some issue regarding my library directories. I have tidied my symbols into different folders in my library. Would this make a difference maybe?

cheers for responding so quick btw!

CyanBlue
12-04-2003, 10:44 AM
What did you do with the 'linkage identifier'??? If you have no idea what I am talking about, that's probably where you problem is... Let me know... ;)

DarrenShinkins
12-04-2003, 11:03 AM
Oh, I see. I get what i've done now. It works a treat! :)

In the linkage properties just clicked export for actionscript.

Nice one!