Bonjour à tous,
Premierement je ne suis pas sur d'etre dans le bon forum donc si se n'est pas le cas merci de deplacer le sujet ou de le supprimer avec mes excuses.

je suis entrain de developper un cours e-learning en flash compatible AICC pour les plateforme le supportant.

Pour se faire j'ai un fichier player.html qui comprend une bonne dose de javascript pour faire la communication AICC.
deux fichier flash : le player avec le bouton suivant et précédent pour affichier les slide.swf (2eme fichier flash) au centre de celui-ci.

Bon problème est le suivant :

Je vais vous mettre les codes mais étant assez long je peux les mettre en téléchargement et j'éditerais mon post. ( à vous de voir).

Ma question est comment faire le bouton suivant et précedent pour qui donne accès au slide(x).swf correspondant au xml ??

Merci encore pour votre aide

presentaion.xml :
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
<xml>
<Presentation>
 
 
<LmsProperties>
<protocol>
<method>AICC</method>
<version>1.0</version>
</protocol>
<completion>
<method>VIEW</method>
<threshold>4</threshold>
<target></target>
</completion>
</LmsProperties>
   <lmscompletion>
      <pass>passed</pass>
      <fail>incomplete</fail>
   </lmscompletion>
<BuiltinProperties>
<Title><CDATA></Title>
<BasePath>Pr sentation1</BasePath>
<PresenterName><CDATA></PresenterName>
<PresenterTitle><CDATA></PresenterTitle>
<PresenterCompany><CDATA></PresenterCompany>
<PresenterEmail><CDATA></PresenterEmail>
<PresenterBio><CDATA></PresenterBio>
<PresenterPhoto>
</BuiltinProperties>
<References>
</References>
<Slides>
<Slide>
<Filename>slide1.swf</Filename>
<BackgroundFile>bgtm1.swf</BackgroundFile>
<Title><CDATA></Title>
<SlideText></SlideText>
<Notes><CDATA></Notes>
<SlideTime>5</SlideTime>
<waitforuser>false</waitforuser>
<Hidden>false</Hidden>
<DisplayMode></DisplayMode>
<level>0</level>
<PlayListId>-1</PlayListId>
<framerate>12</framerate>
</Slide>
<Slide>
<Filename>slide2.swf</Filename>
<BackgroundFile>bgsm1.swf</BackgroundFile>
<Title><CDATA></Title>
<SlideText></SlideText>
<Notes><CDATA></Notes>
<SlideTime>5</SlideTime>
<waitforuser>false</waitforuser>
<Hidden>false</Hidden>
<DisplayMode></DisplayMode>
<level>0</level>
<PlayListId>-1</PlayListId>
<videopresenter>
<filename>fm_slide2.swf</filename>
<framecount>20</framecount>
<framerate>25</framerate>
<framerate>30</framerate>
<width>100</width>
<height>100</height>
</videopresenter>
<framerate>12</framerate>
</Slide>
<Slide>
<Filename>slide3.swf</Filename>
<BackgroundFile>bgsm1.swf</BackgroundFile>
<Title><CDATA></Title>
<SlideText></SlideText>
<Notes><CDATA></Notes>
<SlideTime>5</SlideTime>
<waitforuser>false</waitforuser>
<Hidden>false</Hidden>
<DisplayMode></DisplayMode>
<level>0</level>
<PlayListId>-1</PlayListId>
<framerate>12</framerate>
</Slide>
</Slides>
</Presentation>
le javascript dans le fichier player.html :
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
<DOCTYPE>
<HTML>
<HEAD>
 
<Created>
<version>
 
<TITLE>
	Présentation1
</TITLE>
<meta>
<meta>
<meta>
<META>
<META>
 
<script>
<Articulate>=0 && parseFloat(navigator.appVersion) >= 4 && parseFloat(navigator.appVersion) <5>= 5 && navigator.appName.indexOf("Netscape")>=0 )? true: false;
var isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
var IEmac = ((document.all) && (isMac)) ? true : false;
var IE4plus = (document.all) ? true : false;
var IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;
var IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false;
var Opera7plus = ((document.all)&&(navigator.userAgent.indexOf("Opera 7")!=-1)) ? true : false;
var FF1 = (navigator.userAgent.indexOf("Firefox\/1")!=-1) ? true : false;
var Opera = (navigator.userAgent.indexOf("Opera")!=-1) ? true : false;
var Mozilla = (NS6plus && (navigator.userAgent.indexOf("Netscape") <0>= 0)
	{
		var strTemp = strUserAgent.substr(nPos + 6);
		nReleaseDate = parseFloat(strTemp);
	}
 
	if (strUserAgent.indexOf("netscape") >= 0)
	{
		if (nReleaseDate >= 20040804)
		{
			NS7_2Plus = true;
		} 
	}
	else
	{
		if (nReleaseDate >= 20040616)
		{
			Mozilla1_7Plus = true;
		} 		
	}
}
 
//windows sp2:
var IESP2 = false;
if ((window.navigator.userAgent.indexOf("MSIE")) && window.navigator.userAgent.indexOf("SV1") > window.navigator.userAgent.indexOf("MSIE")) 
{
	IESP2 = true;
}
 
// Template Vars
var g_bFillScreen 	= true;
var g_bResizeOptimal 	= false;
var g_bLMS 		= true;
var g_bWebObject 	= false;
var g_bScaleSwf		= false;
var g_strBgColor	= "6c6c6c";
 
if (g_bFillScreen && g_bResizeOptimal)
{
	g_bOptimal = false;
}
 
if (!(IE5 || IE6 || FF1 || NS7_2Plus || Mozilla1_7Plus) || Opera || isLinux)
{
	g_bWebObject = false;
}
 
 
// Init
var g_nWidth;		// was aw
var g_nHeight;		// was ah
var g_bIs800 = false;
var currentDisplayMode = "1"; //displaymode
 
g_nWidth=screen.availWidth;
g_nHeight=screen.availHeight;
 
if (g_nWidth < 820) 
{
	g_bIs800 = true;
	g_bFillScreen = true;
	g_bScaleSwf = true;
}
 
function debug()
{
}
 
// Reposition the window
function reposition() {
	var x = 0;
	var y = 0;
 
	if (!g_bFillScreen)
	{
		g_nWidth = 980;
		g_nHeight = 640;
 
		x = (screen.availWidth - g_nWidth) / 2;
		y = (screen.availHeight - g_nHeight) / 2;
 
		if (!g_bScaleSwf)
		{
			g_nWidth += 20;
			g_nHeight += 5;
		}
	}
 
	if (x < 0)
	{
		x = 0;
	}
	if (y <0> screen.availWidth)
	{
		g_nWidth = screen.availWidth;
	}
	if (g_nHeight > screen.availHeight)
	{
		g_nHeight = screen.availHeight;
	}
 
 
 
	top.window.moveTo(x, y);
	top.window.resizeTo(g_nWidth,g_nHeight);
	top.window.focus();
}
 
// This function is used to make sure the document height and not the 
function reposition2() 
{
	var nW = 0;
	var nH = 0;
	var nNewWidth = 0;
	var nNewHeight = 0;
	var x = 0;
	var y = 0;
 
	if (document.body.clientWidth && !isNaN(document.body.clientWidth) && !Mozilla)
	{
		nW = document.body.clientWidth;
		nH = document.body.clientHeight;
	}
	else
	{
		nW = window.innerWidth;
		nH = window.innerHeight;
	}
 
	nNewWidth = g_nWidth + (g_nWidth - nW);
	nNewHeight = g_nHeight + (g_nHeight - nH);
 
	if (!g_bScaleSwf && NS6plus && !NS7_2Plus && !Mozilla)
	{
		nNewWidth +=15;
	}
 
	if (Mozilla)
	{
		nNewWidth += 20;
	}
 
	if (nNewWidth > screen.availWidth)
	{
		nNewWidth = screen.availWidth;
	}
	if (nNewHeight > screen.availHeight)
	{
		nNewHeight = screen.availHeight;
	}
 
	x = (screen.availWidth - nNewWidth) / 2;
	y = (screen.availHeight - nNewHeight) / 2;
 
	if (x < 0)
	{
		x = 0;
	}
	if (y <0> 20)
	{
		g_nWidth = nNewWidth;
		g_nHeight = nNewHeight;
		top.window.moveTo(x, y);
		top.window.resizeTo(nNewWidth, nNewHeight);
	}
 
}
 
if (g_bResizeOptimal || g_bFillScreen)
{
	// Call to reposition
	reposition();
}
 
if (g_bResizeOptimal)
{
	// Call Reposition2
	window.onload = reposition2;
}
 
// -->
</script>
 
 
<fscommand>
 
<SCRIPT>
</SCR>
</SCRIPT>
 
<SCRIPT></SCRIPT>
<SCRIPT>
</Catch>
</SCRIPT>
 
 
<script>
<function>
</script>
 
</HEAD>
 
 
<BODY>
 
<script>
</Change>
</script>
 
 
 
<script>
<!--
	// Get the "slide=" value from the querystring URL of this document. (v3)
	var slidenum = 1;
	var _search = document.location.search;
	var nStartPos = 0;
	var nEndPos = 0;
 
	nStartPos = _search.indexOf("slide=");
	nEndPos = _search.indexOf("&",nStartPos);
	if (nEndPos < 0)
	{
		nEndPos = _search.indexOf("%",nStartPos); 
	}
	if (nEndPos <0>= 0 && nEndPos >= 0)
	{
		slidenum = _search.substring((nStartPos+6),(nEndPos-0));
	}
//-->
</script>
 
 
<Playercode>
 
<script>
 
	//Formulate url to give to player for use in Forward, to pass it into flash. (Default is ./ in current url folder.)
	var thislink = document.location.href;
	thislink = thislink.substring(0,(thislink.lastIndexOf("/")+1));
 
	// Create FlashVars
	var strFlashVars = "";
	strFlashVars += "vBgColor=0x" + g_strBgColor;
 
	// FSCommand?
	strFlashVars += "&vFSCommand="
	if (!(IE5 || IE6 || FF1 || NS7_2Plus || Mozilla1_7Plus) || Opera || isLinux || isMac)
	{
		strFlashVars += "false";	 
	}
	else
	{
		strFlashVars += "true"
	}
 
	// LMS Info
	if (g_bLMS)
	{
		if (g_bAPIPresent)
		{
			RetrieveStateData();
			strFlashVars += "&vResumeSlide=" + String(g_SlideLastViewed);
			strFlashVars += "&vStateData=" + String(g_strResumeData);
			strFlashVars += "&vLMSPresent=" + String(g_bLMSPresent);
		}
	}
 
	// Get the browsers width and height
	var strSwfWidth = "100%";
	var strSwfHeight = "100%";
 
	var strScale = "show all";
 
	if (!g_bScaleSwf)
	{
		strSwfWidth = 992;
		strSwfHeight = 652;
		strScale = "noscale"
	}
 
	var strTransparent = "";
 
	if (g_bWebObject)
	{
		strTransparent = "wmode='transparent'";
	}
 
	if (NS4)
	{
		strSwfWidth = g_nWidth;
		strSwfHeight = g_nHeight-30;
	}
 
	if (Mozilla && isLinux)
	{
		strSwfWidth = "980";
		strSwfHeight = "640";
	}
 
	if (g_bWebObject)
	{
		document.write("<div>");
	}
 
	document.write("<table>");
	document.write("<tr><td>");
 
	document.write("<OB> ");
	document.write("<PARAM> ");
	document.write("<PARAM> ");
	if (g_bWebObject)
	{
		document.write("<PARAM> ");
	}
	document.write("<PARAM> ");
	document.write("<PARAM>");
	document.write("<PARAM>");
	document.write("<EM></EM>");
	document.write("</OB> ");
	document.write("</td></tr>");
	document.write("</table>");
 
	if (g_bWebObject)
	{
		document.write("</div>");
	}
 
 
</script>
 
 
<script>
</iframe>
</script>
 
<Email>
 
<DIV></DIV>
 
</BODY>
</HTML>