Thursday, 6 December 2012

Multi swf

So this afternoon Julian taught us how to do a 'Multi swf' It's actually pretty simple it was using multiple .fla files and publishing them into .swf's to put them into on page known as the 'background' so basically with all of these separate .swf files they would all load into the background using this code:

loadMovieNum('nav.swf',5)

but then on the nav file it had more code which would load the other files into it so the nav file acted as a database with all the code in whereas the background was just the loader of the code.

here is the code that was used in the nav file:

gary.onPress = function (){

loadMovieNum('page1.swf',1)

}
gary2.onPress = function (){


loadMovieNum('page2.swf',1)

}
gary3.onPress = function (){

loadMovieNum('page3.swf',1)

}
gary4.onPress = function (){

loadMovieNum('page4.swf',1)

}
gary5.onPress = function (){

loadMovieNum('page5.swf',1)

}


all of the separate pages were in different files, the gary, gary 2 and such were just names for the instances obviously they could be called anything it's just I decided gary would be fine for this, here is also what the multi swf folder looked like so you can see what the background would load(all of the swf files into 1 .swf)




with the final part though on the background we had to make sure we published all the files before we finally published the background otherwise the other parts wouldn't be updated.

No comments:

Post a Comment