problema con script book galleri

ferdi74

Utente Attivo
2 Ago 2008
47
0
0
cia a tutti..sto lavorando ad una galleria fotografica che simula un vero album, c'è un'angolo della pagina che si trascina e sfoglia la pagina successiva..qualcuno avrà già visto in rete cose del genere..ora..fin quando mi sono limitato semplicemente a richiamare le istanze delle immagini e sostituirle nessun problema...ma visto che il mio book ha 36 immagini e quello che sto rieditando ne ha solo 32 come faccio ad inserire le altre 4immagini?
nello script (che ora vi copio ed incollo) quasi alla fine c'è una stringa che dice max32 pag.
io ho scritto 36...le 4 pagine vengono aggiunte e lo script risulta cmq corretto, solo che nella prova dell'swf le 4 pagine finali vengono in bianco e appena le tocco mi da questo errore:Error: A 'with' action failed because the specified object did not exist.

lo script per intero è il seguente...

function makePage(targ, xQuadrant)
{
with (targ)
{
beginFill(pageColor, 100);
moveto(0, -pageWi);
lineto(0, -pageWiHi);
lineTo(xQuadrant * pageWi, -pageWiHi);
lineTo(xQuadrant * pageWi, -pageWi);
endFill();
} // End of with
} // End of the function
function makeShade(targ, xQuadrant)
{
with (targ)
{
var colors = [0, 0, 0, 0, 0, 0, 0];
var alphas = [40, 25, 15, 5, 0, 1, 6];
var ratios = [0, 1, 17, 51, 89, 132, 255];
var matrix = {matrixType: "box", x: 0, y: pageWi, w: xQuadrant * pageWi, h: pageHi, r: 0};
beginGradientFill("linear", colors, alphas, ratios, matrix);
moveto(0, -pageWi);
lineto(0, -pageWiHi);
lineTo(xQuadrant * pageWi, -pageWiHi);
lineTo(xQuadrant * pageWi, -pageWi);
endFill();
} // End of with
} // End of the function
function makeShadow(targ, xQuadrant)
{
with (targ)
{
var colors = [0, 0, 0, 0, 0, 0, 0];
var alphas = [40, 25, 15, 5, 0, 1, 6];
var ratios = [0, 1, 17, 51, 89, 132, 255];
var maxLength = Math.sqrt(pageWi * pageWi + pageWIHi * pageWiHi);
var matrix = {matrixType: "box", x: 0, y: -maxLength, w: xQuadrant * pageWi, h: maxLength - pageWi, r: 0};
beginGradientFill("linear", colors, alphas, ratios, matrix);
moveto(0, -pageWi);
lineto(0, -maxLength);
lineto(xQuadrant * pageWi, -maxLength);
lineTo(xQuadrant * pageWi, -pageWi);
endFill();
} // End of with
} // End of the function
function setStationary()
{
createEmptyMovieClip("SLPage", 1);
if (flipPage != 1.500000)
{
makePage(SLPage, -1);
SLPage.attachMovie("print" + (flipPage - 1.500000), "Print", 1);
with (SLPage.Print)
{
_x = -pageWi / 2;
_y = -pivotY;
} // End of with
} // end if
createEmptyMovieClip("SRPage", 2);
if (flipPage != maxPages - 0.500000)
{
makePage(SRPage, 1);
SRPage.attachMovie("print" + (flipPage + 1.500000), "Print", 1);
with (SRPage.Print)
{
_x = pageWi / 2;
_y = -pivotY;
} // End of with
} // end if
var targ = dir > 0 ? (SLPage) : (SRPage);
targ.createEmptyMovieClip("Shade", 2);
makeShade(targ.Shade, -dir);
} // End of the function
function setFlipping()
{
var targ;
createEmptyMovieClip("FTPage", 3);
makePage(FTPage, dir);
with (FTPage)
{
attachMovie("print" + (flipPage - dir * 0.500000), "Print", 1);
with (Print)
{
_x = dir * pageWi / 2;
_y = -pivotY;
} // End of with
} // End of with
FTPage.createEmptyMovieClip("Shade", 2);
makeShade(FTPage.Shade, dir);
createEmptyMovieClip("FBPage", 4);
makePage(FBPage, -dir);
FBPage.attachMovie("print" + (flipPage + dir * 0.500000), "Print", 1);
with (FBPage.Print)
{
_x = -dir * pageWi / 2;
_y = -pivotY;
} // End of with
FBPage._rotation = dir * 90;
} // End of the function
function setShadows()
{
var targ;
this.createEmptyMovieClip("FShadow", 5);
makeShadow(FShadow, -dir);
FShadow._rotation = dir * 45;
this.createEmptyMovieClip("SShadow", 6);
makeShadow(SShadow, dir);
SShadow._rotation = dir * 45;
} // End of the function
function makeMasks()
{
this.createEmptyMovieClip("FBPageMask", 7);
with (FBPageMask)
{
beginFill(21760, 100);
lineto(pageWiHi, -PageWiHi);
curveto(0, -2 * PageWiHi, -pageWiHi, -pageWiHi);
endFill();
} // End of with
FBPageMask.duplicateMovieClip("FTPageMask", 8);
this.createEmptyMovieClip("FShadowMask", 9);
makePage(FShadowMask, -dir);
FShadowMask._rotation = dir * 90;
this.createEmptyMovieClip("SShadowMask", 10);
makePage(SShadowMask, dir);
FBPage.setMask(FBPageMask);
FTPage.setMask(FTPageMask);
FShadow.setMask(FShadowMask);
SShadow.setMask(SShadowMask);
} // End of the function
function limitBook()
{
if (flipPage == 1.500000)
{
SLPage._visible = 0;
LButton._visible = 0;
SShadow._visible = 0;
if (dir == 1)
{
FTPage.Shade._alpha = 67;
SShadow._visible = 1;
}
else
{
FShadow._alpha = 67;
} // end if
}
else if (flipPage == maxPages - 0.500000)
{
SRPage._visible = 0;
RButton._visible = 0;
SShadow._visible = 0;
if (dir == -1)
{
FTPage.Shade._alpha = 67;
SShadow._visible = 1;
}
else
{
FShadow._alpha = 67;
} // end if
} // end if
} // End of the function
function pageInit(cp, d)
{
flipPage = cp;
dir = d;
setStationary();
setFlipping();
setShadows();
makeMasks();
limitBook();
} // End of the function
function flip(curVal)
{
var _l1 = dir * 45 * curVal;
FBPageMask._rotation = FTPageMask._rotation = -_l1;
FBPage._rotation = FShadowMask._rotation = dir * 90 - _l1 * 2;
FShadow._rotation = SShadow._rotation = dir * 45 - _l1;
} // End of the function
function getPageRatio()
{
if (dragging)
{
pageRatio = -dir * (_xmouse - startX - dir * 20) / (2 * pageWi);
}
else
{
pageRatio > 0.666667 ? (pageRatio = pageRatio + autoStep, pageRatio = pageRatio + autoStep) : (pageRatio = pageRatio - autoStep);
} // end if
if (pageRatio <= 0)
{
pageRatio = 0;
if (!dragging)
{
flipDone();
} // end if
}
else if (pageRatio >= 1)
{
pageRatio = 1;
if (!dragging)
{
flipDone();
} // end if
} // end if
return(pageRatio);
} // End of the function
function startFlip(dir)
{
var _l1 = dir;
pageInit(curPage + _l1, _l1);
startX = _l1 * pageWi;
dragging = true;
RButton._alpha = 0;
Lbutton._alpha = 0;
this.onEnterFrame = function ()
{
flip(getPageRatio());
};
} // End of the function
function flipRelease()
{
dragging = false;
if (pageRatio > 0.666667)
{
curPage = curPage + 2 * dir;
} // end if
} // End of the function
function flipDone()
{
this.onEnterFrame = null;
RButton._alpha = 100;
LButton._alpha = 100;
if (curPage != 0.500000)
{
LButton._visible = 1;
} // end if
if (curPage != maxPages + 0.500000)
{
RButton._visible = 1;
} // end if
if (pageRatio == 0)
{
FShadow.removeMovieClip();
FShadowMask.removeMovieClip();
SShadow.removeMovieClip();
SShadowMask.removeMovieClip();
FBPage.removeMovieClip();
FBPageMask.removeMovieClip();
if (dir == 1)
{
SRPage.removeMovieClip();
}
else
{
SLPage.removeMovieClip();
} // end if
}
else
{
FTPage.removeMovieClip();
if (dir == -1)
{
SRPage.removeMovieClip();
}
else
{
SLPage.removeMovieClip();
} // end if
} // end if
FTPageMask.removeMovieClip();
} // End of the function
stop();
_level0.pagesAbs = this;
var pageWi = 290;
var PageHi = 425;
var pageWiHi = pageWi + pageHi;
var pivotY = pageHi / 2 + pageWi;
var pageColor = 16777189;
var dir = 1;
var flipPage = 1.500000;
var curPage = 0.500000;
var maxPages = 32;
var autoStep = 0.050000;
var dragging = false;
this.attachMovie("cornerButton", "RButton", 11);
with (RButton)
{
_x = pageWi;
_y = -pageWi;
} // End of with
this.attachMovie("cornerButton", "LButton", 12);
with (LButton)
{
_x = -pageWi;
_y = -pageWi;
_xscale = -100;
} // End of with
pageInit(flipPage, dir);
_y = _y + pivotY;
LButton.onPress = function ()
{
startFlip(-1);
};
LButton.onReleaseOutside = function ()
{
flipRelease();
};
LButton.onRelease = function ()
{
flipRelease();
};
RButton.onPress = function ()
{
startFlip(1);
};
RButton.onReleaseOutside = function ()
{
flipRelease();
};
RButton.onRelease = function ()
{
flipRelease();
};

ovviamente ho aggiunto le 4 immagini in libreria e le ho convertite in simboli grafici e movi
cosa sbaglio? che mmmmmanca? devo modificare lo script o fare qualche operazione particolare...qualcuno sa aiutarmi?
 
Discussioni simili
Autore Titolo Forum Risposte Data
K Help: problema con uno script di booking in php! PHP 0
S Problema con script php-javascript PHP 2
P immagine responsive problema con script jquery jQuery 0
A Problema con Script js Javascript 1
S Problema con 2 script nella stessa pagina Javascript 1
S problema con ajax semplice login script Javascript 8
E Problema con uno script php PHP 1
P Problema con uno script Javascript 0
L problema invio newsletter con script proprio in php PHP 10
A fancyBox script - problema con pulsanti jQuery 2
G Problema con questo script jQuery 1
P Problema con script facebox Javascript 0
C problema con script di lista suggerimenti Javascript 3
A Problema con uno script js Javascript 0
T Problema con script di registrazione utenti su IE PHP 4
neo996sps Problema con query e script PHP PHP 4
O problema con script tell a friend Javascript 3
L problema con script php PHP 6
E Problema con script ajax+php Ajax 2
B Problema invio mail con script php verso i dominii libero PHP 9
T Problema con script search.asp Lukeonweb Classic ASP 9
M Problema con script rotazione testo Javascript 3
muvadi problema con script di una gallery PHP 1
P [PHP] problema script con checkbox! PHP 0
M Problema con script PHP 6
K Per EWIND, piccolo problema con lo script Flash 1
O problema con dvr dahua xvr5116 IP Cam e Videosorveglianza 0
G Problema con Xampp Web Server 1
andrea barletta Problema con miniature comandi Photoshop 0
I problema con alice Posta Elettronica 0
N Problema con position absolute e overflow HTML e CSS 4
L Problema con inner join PHP 11
K [php] Problema con inner join PHP 4
K [PHP] Problema con variabili concatenate. PHP 1
O problema con query PHP 4
I problema con 2 account Posta Elettronica 1
L problema collegamento file css con html HTML e CSS 1
E Problema accesso a file con app sviluppata con MIT APP INVENTOR 2 Sviluppo app per Android 0
M Problema con Try Catch PHP 0
Sergio Unia Problema con gli eventi del mouse su una data table: Javascript 2
T PROBLEMA CON SESSIONI PHP 3
T ALTRO PROBLEMA CON ARRAY PHP PHP 1
R problema con else PHP 0
T PROBLEMA CON ARRAY PHP 8
L problema con query select PHP 2
R Problema query con ricerca id numerico PHP 2
F Problema con risposta PHP 0
S problema con recupero dati tabella mysql PHP 2
Z Problema con il mio tp-l i nk Reti LAN e Wireless 1
L Problema RAM con Tomcat 8 Apache 0

Discussioni simili