Ciao a tutti,
sto lavorando su un esempio di un libro che si sfoglia che mi qualcuno mi ha consigliato di scaricare non mi ricordo dove.. ma questo non è importante..


avrei però un problemino.. dovrei aggiungere al libro un certo numero di pagine... decise dall'utente

La prima considerazione da fare è che le pagine sono nella libreria e vengono caricate dinamicamente con il mio amico attach..


però se ad esempio volessi far scegliere all'utente il numero delle pagine che deve contenere il libro stesso e ne preparassi due tipo da caricare ogni volta come posso fare?


forse è meglio che posto parte del codice che sto utilizzando..


// Place Stationary Pages
function setStationary() {
// Place the "S"tationary "L"eft "P"age
createEmptyMovieClip("SLPage", 1);
if (flipPage!=1.5) {
makePage (SLPage, -1)
SLPage.attachMovie("print"+(flipPage-1.5), "Print", 1);
with (SLPage.Print) {
_x = -pageWi/2;
_y = -pivotY;
}
}
// Place the "S"tationary "R"ight "P"age
createEmptyMovieClip("SRPage", 2);
if (flipPage!=maxPages-.5){
makePage (SRPage, 1)
SRPage.attachMovie("print"+(flipPage+1.5), "Print", 1);
with (SRPage.Print) {
_x = pageWi/2;
_y = -pivotY;
}
}
// Place shade on page not being revealed
var targ = dir>0 ? SLPage : SRPage;
targ.createEmptyMovieClip("Shade", 2);
makeShade(targ.Shade, -dir);
}
//
//
// Place the Flipping Pages
function setFlipping() {
var targ;
// Place the "F"lipping "T"op "P"age
createEmptyMovieClip("FTPage", 3);
makePage (FTPage, dir)
with (FTPage) {
attachMovie("print"+(flipPage-dir*.5), "Print", 1);
with (Print) {
_x = dir*pageWi/2;
_y = -pivotY;
}
}
FTPage.createEmptyMovieClip("Shade", 2);
makeShade(FTPage.Shade, dir);
// Place the "F"lipping "B"ottom "P"age
createEmptyMovieClip("FBPage", 4);
makePage (FBPage, -dir)
FBPage.attachMovie("print"+(flipPage+dir*.5), "Print", 1);
with (FBPage.Print) {
_x = -dir*pageWi/2;
_y = -pivotY;
}
FBPage._rotation = dir*90;
}
SPERO di non aver chiesto tropppo..

Grazie anticipatamente a quanti vorranno partecipare a questa discussione..