Bonjour à tous,
Formateur dans la modélisation 3D j'utilise Indesign ou Adobe Captivate pour réaliser mes e-book ou tutoriels e-learning pour mes formations. Pour résumer, je ne maitrise pas du tout le développement de flash !
Je souhaite mettre à disposition quelques support sur le site web de ma société mais les swf générés sont relativement lourds (entre 3 et 5 Mo) car ils possèdent plusieurs dizaines de copies d'écrans mais sans preload les utilisateurs se retrouvent avec un écran noir le temps du chargement.
Nous avons donc acheté l'outil "FlashKicker" pour réaliser des swf de preload externe mais je rencontre un souci : le swf principal se charge mais se lit automatiquement de page en page extrêmement rapidement. Normalement la navigation entre les pages se fait à partir de boutons (e-learning captivate) ou d'un coin de page à tourner (e-book indesign).

Voici le code généré dans le swf de preload externe :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
// Action script...
 
// [Action in Frame 1]
var Width_OF_PL = "INTERNAL_TWCPX_NMBR_N10000x10000_MWIDTH:-:-:840";
StrArray = Width_OF_PL.split(":-:-:");
Width_OF_PL = Number(StrArray[StrArray.length - 1]);
trace(Width_OF_PL);
var Height_OF_PL = "INTERNAL_TWCPX_NMBR_N10000x10000_MHEIGHT:-:-:596";
StrArray = Height_OF_PL.split(":-:-:");
Height_OF_PL = Number(StrArray[StrArray.length - 1]);
trace(Height_OF_PL);
var showProgress = "INTERNAL_TWCPX_BOOL_Show_Progress:-:-:True";
var StrArray = showProgress.split(":-:-:");
trace(StrArray[StrArray.length - 1]);
showProgress = Boolean(StrArray[StrArray.length - 1]);
trace(showProgress);
var simulation = "INTERNAL_TWCPX_BOOL_SimulationMode:-:-:";
var StrArray = simulation.split(":-:-:");
simulation = Boolean(StrArray[StrArray.length - 1]);
trace(simulation);
var Xoffset = "INTERNAL_TWCPX_NMBR_N10000x10000_Preloader_X_Offset:-:-:0";
StrArray = Xoffset.split(":-:-:");
Xoffset = Number(StrArray[StrArray.length - 1]);
trace(Xoffset);
var Yoffset = "INTERNAL_TWCPX_NMBR_N10000x10000_Preloader_Y_Offset:-:-:-220";
StrArray = Yoffset.split(":-:-:");
Yoffset = Number(StrArray[StrArray.length - 1]);
trace(Yoffset);
var BackgroundColor = "CONST_TWCPX_COLR_Background_Color:-:-:0x666666";
StrArray = BackgroundColor.split(":-:-:");
BackgroundColor = Number(StrArray[StrArray.length - 1]);
trace(BackgroundColor);
var LoadingText = "INTERNAL_TWCPX_STRN_100_Loading_Message:-:-:Chargement  _KBL de _TKB  _PL";
StrArray = LoadingText.split(":-:-:");
LoadingText = String(StrArray[StrArray.length - 1]);
trace(LoadingText);
var FileName = "INTERNAL_TWCPX_STRN_100_File_Name:-:-:GDC-SWF_pub_educ.swf";
StrArray = FileName.split(":-:-:");
FileName = String(StrArray[StrArray.length - 1]);
trace(FileName);
var finaltab = "INTERNAL_TWCPX_BOOL_Final_Tab:-:-:True";
var StrArray = finaltab.split(":-:-:");
finaltab = Boolean(StrArray[StrArray.length - 1]);
trace(finaltab);
var ProgressTextColor = "CONST_TWCPX_COLR_Progress_Text_Color:-:-:0x202020";
StrArray = ProgressTextColor.split(":-:-:");
ProgressTextColor = Number(StrArray[StrArray.length - 1]);
trace(ProgressTextColor);
var BarColor = "CONST_TWCPX_COLR_Progress_Bar_Color:-:-:0xFF9900";
StrArray = BarColor.split(":-:-:");
BarColor = Number(StrArray[StrArray.length - 1]);
trace(BarColor);
var counter;
if (counter <= 0)
{
    counter = 1;
    this.createEmptyMovieClip("container", 10000);
    container._lockroot = true;
    container.loadMovie(FileName);
} // end if
container.stop();
container._visible = false;
counter = counter + random(5);
trace(counter);
setProperty(backgroundrect, _x, 0);
setProperty(backgroundrect, _y, 0);
setProperty(backgroundrect, _width, Width_OF_PL);
setProperty(backgroundrect, _height, Height_OF_PL);
setProperty(box_inside, _x, Width_OF_PL / 2 + Xoffset);
setProperty(box_inside, _y, Height_OF_PL / 2 + Yoffset);
setProperty(box_outside, _x, Width_OF_PL / 2 + Xoffset);
setProperty(box_outside, _y, Height_OF_PL / 2 + Yoffset);
setProperty(box_background, _x, Width_OF_PL / 2 + Xoffset);
setProperty(box_background, _y, Height_OF_PL / 2 + Yoffset);
setProperty(box_initial, _x, Width_OF_PL / 2 + Xoffset);
setProperty(box_initial, _y, Height_OF_PL / 2 + Yoffset);
setProperty(progressmessage, _x, Width_OF_PL / 2 - getProperty(progressmessage, _width) / 2 + Xoffset);
setProperty(progressmessage, _y, Height_OF_PL / 2 + 25 + Yoffset);
if (showProgress == false)
{
    setProperty(box_inside, _visible, false);
    setProperty(box_background, _visible, false);
} // end if
myColor = new Color(backgroundrect);
myColor.setRGB(BackgroundColor);
myColor = new Color(box_inside);
myColor.setRGB(BarColor);
myColor = new Color(progressmessage);
myColor.setRGB(ProgressTextColor);
var actBytes = Math.round(this.container.getBytesLoaded() / 1024);
var totBytes = Math.round(this.container.getBytesTotal() / 1024);
var percent = Math.round(actBytes * 100 / totBytes);
trace(percent);
if (isNaN(percent))
{
    percent = 1;
} // end if
if (simulation == true)
{
    percent = counter;
    actBytes = Math.round(percent * 3.550000);
    totBytes = 355;
} // end if
trace(percent);
StrArray = LoadingText.split("_TKB");
if (StrArray.length > 1)
{
    LoadingText = StrArray[0] + "" + String(totBytes) + "KB " + StrArray[1];
} // end if
StrArray = LoadingText.split("_KBL");
if (StrArray.length > 1)
{
    LoadingText = StrArray[0] + "" + String(actBytes) + "KB " + StrArray[1];
} // end if
StrArray = LoadingText.split("_PL");
if (StrArray.length > 1)
{
    LoadingText = StrArray[0] + "" + String(percent) + "% " + StrArray[1];
} // end if
trace(LoadingText);
var loadingmessage = LoadingText;
if (simluation == false)
{
    if (percent >= 0)
    {
        var loaded = true;
    }
    else
    {
        var loaded = false;
    } // end if
}
else if (percent >= 100)
{
    var loaded = true;
}
else
{
    var loaded = false;
} // end if
if (loaded)
{
    if (finaltab)
    {
        container._xscale = 100;
        container._yscale = 100;
        container._visible = true;
        container.play();
        container.gotoandplay(1);
        gotoAndStop(4);
        stop();
    }
    else
    {
        stopAllSounds();
        counter = 1;
        gotoAndPlay(1);
    } // end if
}
else
{
    gotoAndPlay(1);
} // end if
 
// [Action in Frame 2]
gotoAndPlay(1);
Merci de votre aide.