How the Movies work?

The movies

get the movies here.

Intro uses a framescript at the end of the tweening animation to load interior.swf into level 0.

The first Flash movie that loads is always in level0 so in effect the into movie is replacing itself with the interior movie. The intro has now been completely erased from the memory and unless it is loaded back into a level will remain that way. If you wanted to reload it for example from a button you could use the script:

on(release){

loadMovie(“intro.swf”,0);
}

This in effect tells Flash to load the movie called intro.swf into level 0.

loadMovie requires you to provide two parameters (pieces of information)
i.e the name of the movie to be loaded and the destination level.

The button marked load cd in the first frame of the interior movie (which is now where the intro movie originally was – in level0) sends the playback head to the label called cdplayer which is situated in the main timeline. It also uses a loadMovie script to load the movie called cd.swf into the movieclip that has the instance name (not the library name) of cd_player and in addition to this it uses loadMovieNum to load music.swf into level 100 – a similar process to how the intro movie loaded the interior movie. The main difference this time is that as it is being loaded into a level other than 0 (in this case 100) it does not replace the interior movie it simply plays alongside it and as Flash movies are transparent and music only contains a sound file – it adds no graphical element to the stage but you can (if this is a good day) hear the music playing.This is good because we have kept this large file outside of the main movie and it is now streaming from your hard drive or web server.

At this point all of the features may have fallen off your face – don’t worry this is normal! All of the concepts here are very simple to understand its just that it can seem like it is a lot to take in at one time.Stick with it because once you understand how these small pieces of script work you can begin to really plan how your navigation system should look.

Ok – there is a bit more to do but once this all makes sense you will be flying.

In the frame where the CD player is there is a button that if clicked loads in another button that will allow us to navigate back to the main timeline.

This is a very important point when dealing with loading external movies into a host movie(in this case interior).

Now we all know now that the main timeline can be referenced by using _root – I’m sure you’ve guessed by the way this is going that this is not always the case.
The times when this is not true is when you are trying to target the main timeline in a host movie (interior) from a movie that has been externally loaded,in this case (external_button.swf). Now because the external movie also has its own main timeline Flash will try to target that if you use _root so in this case we need to use _parent instead, so the script will actually say:

on(release){
_parent.gotoAndStop("inside_car");
}

Inside_car is the label in the first frame of the host movie (interior).

_parent actually just means go up one level from where you are – in this case the main timeline. There are other uses for _parent but I think by now you have probably had about enough, however if you understand how all of these movies are working together you have come a long way towards understanding Flash movie architecture.

As I said earlier – all of these concepts are very simple but when strung together like this, they can seem very confusing – the trick is to work back through the movies, slowly,look at my comments and replace them with your own comments so that you can always reference back to them, this is really worth knowing so just stick at it and you’ll be fine. Remember a lot of coding for computers is not really that difficult its just that you have to tell the computer everything in other words you have to think down to their level – computers are great at Maths but do not have any common sense – try to reduce any problem to a series of smaller problems and solve those one at a time – that way you’ll get the result you want.

Look in the Flash tutorials section to find more examples of external content




Module specific sites

Personal Portfolio Website Module - Graphics Students

Second Year Online Radio Part 1 DE786

Second Year Innovation 3

Third Year Investigating Change part 1 DE687

 


Second Year Tutor Questions

 

Feedback Forms - please fill in
thanks

Trev

 

Feedback Form Investigating Change DE687

 

Feedback Form Innovation 3 DE787

 

Feedback Form Radio Module DE786