PDA

View Full Version : simple and urgent: variable within loadMovie


balti
09-03-2004, 08:39 PM
hello!

Intro:
in _root ive got two variables 'url' and 'number' which change depending on buttons clicked in the main movie.
ex. when u click on Architecture var url is set to 'Projects/Salorino/photo' + number;

Problem: i have a next button which states on (press) { number= number+1;
then underneath loadMovie(url); but when clicked it only loads the url with the previous number. Ive checked the 'number' has changed so it means the new number value has not been changed in the url variable.

Question: How can i make the url variable reads the new value for the number variable?

curryjon51
09-04-2004, 12:12 AM
Hi
with what you have:

loadMovie('Projects/Salorino/photo' + number)
flash traces this error msg:
Wrong number of parameters; loadMovie requires between 2 and 3.

You have to load into either a level... eg level1, or into a target mc as in the example below:

_root.createEmptyMovieClip("holder",1200)
loadMovie('Projects/Salorino/photo' + number,_root.holder)

Also, I would steer clear of using the terms 'url' and 'number' as variable names.. they can easily be confused with key terms in flash.

hth