Bonjour
Habituellement je suis plutot sur cbuilder dans la section c++ mais j ai décidé de faire joujou avec flex , çà m a lair bien sympa

Concretement j ai site à faire pour un copain
J utiilise un tabnavigator et des locale:IFrame qui charge du cotenu html

Au debut j avais un souci avec le centrage de mon swf principal
Soit ! Je vais le charge dans un swfloader , çà fonctionne bien
J ai juste un petit souci , lorsque j arrive sur le site , j affiche necessairement une 1er page html dans mon premier onglet et cette page n est pas dans mon swf , elle ne considere pas la position relative à son swf , elle apparait à gauche alors que celui est affiché à l interieur du second swf qui lui est centré

voici la page en ligne concerné
http://perso.numericable.fr/~jpaulna...electedIndex=0

Comme vous pourrez le constater , si on clique sur un autre onglet et qu ensuite , on clique sur accueil , il est parfaitement positionné .


le code du swf chargeant les pages 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
 
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" 
	left="150" width="1024" height="660"  xmlns:local="*" themeColor="#ffffff" backgroundColor="#009dff" horizontalAlign="center" verticalAlign="middle">
 
<mx:Panel x="0" y="57" width="100%" height="600" layout="absolute"  horizontalCenter="0" 
	backgroundColor="#EBBF48" themeColor="#EBBF48" >
<mx:Image source="home2.jpg"		 width="40" height="50" y="2" x="16"/>
<mx:Image source="e10.jpg" 			 width="40" height="50" y="2" x="77"/>
<mx:Image source="e30.jpg" 			 width="40" height="50" y="2" x="132"/>
<mx:Image source="g60.jpg" 			 width="40" height="50" y="2" x="192"/>
<mx:Image source="esl.jpg" 			 width="40" height="50" y="2" x="248"/>
<mx:Image source="dic.jpg" 			 width="40" height="50" y="2" x="305"/>
<mx:Image source="pso.jpg" 			 width="40" height="50" y="2" x="364"/>
<mx:Image source="r50.jpg" 			 width="40" height="50" y="2" x="422"/>
<mx:Image source="waw.jpg" 			 width="40" height="50" y="2" x="482"/>
<mx:Image source="pic.jpg" 			 width="40" height="50" y="2" x="541"/>
<mx:Image source="g70.jpg" 			 width="40" height="50" y="2" x="598"/>
<mx:Image source="mpg_caps.jpg" 	 width="40" height="50" y="2" x="656"/>
<mx:Image source="mpg_mega_caps.jpg" width="40" height="50" y="2" x="716"/>
<mx:Image source="eco-sheen.jpg" 	 width="40" height="50" y="2" x="776"/>
<mx:Image source="tel.jpg" 			 width="40" height="50" y="2" x="836"/>
<mx:Image source="people.jpg"		 width="40" height="50" y="2" x="888"/>
<mx:Image source="panier.jpg"		 width="40" height="50" y="2" x="944"/>
 
        <mx:TabNavigator y="48" width="100%" height="100%"   > 
<local:IFrame source="produits.html"  		label="Acceuil" 	width="100%" height="100%"   autoLayout="true"></local:IFrame>
<local:IFrame source="e10.html"  			label="   E10" 		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="e30.html"  			label="   E30"	 	width="100%" height="100%" ></local:IFrame>
<local:IFrame source="g60.html"  			label="   G60" 		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="esl.html"  			label="   ESL" 		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="dic.html"  			label="   DIC" 		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="pso.html"  			label="   PSO" 		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="r50.html"     		label="   R50" 		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="waw.html"  	 		label="WAW" 		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="pic.html"      		label="   PIC"		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="g70.html"       		label="   G70" 		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="mpg_caps.html"  		label=" Caps" 		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="mpg_mega_caps.html"   label="MCaps" 		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="eco-sheen.html"  		label="   ECO"		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="nous.html"  			label="Nous" 		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="temoins.html" 		label="Avis" 		width="100%" height="100%" ></local:IFrame>
<local:IFrame source="com.html"  			label="Achat"		width="100%" height="100%" ></local:IFrame>
		</mx:TabNavigator>
    </mx:Panel>    
	<mx:VideoDisplay x="203" y="1" width="600" height="82" source="1111.flv" autoPlay="true" />
</mx:Application>

le code de la page qui charge le precedent loader
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
 
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:SWFLoader horizontalCenter="0"  source="nulon.swf"/>
</mx:Application>


mon template 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
 
<!-- saved from url=(0014)about:internet -->
<html lang="en">
 
<!-- 
Smart developers always View Source. 
 
This application was built using Adobe Flex, an open source framework
for building rich Internet applications that get delivered via the
Flash Player or to desktops via Adobe AIR. 
 
Learn more about Flex at http://flex.org 
// -->
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 
<!--  BEGIN Browser History required section -->
<link rel="stylesheet" type="text/css" href="history/history.css" />
<!--  END Browser History required section -->
 
<title>${title}</title>
<script src="AC_OETags.js" language="javascript"></script>
 
<!--  BEGIN Browser History required section -->
<script src="history/history.js" language="javascript"></script>
<!--  END Browser History required section -->
 
<style>
body { margin: 0px; overflow:hidden }
</style>
<script language="JavaScript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = ${version_major};
// Minor version of Flash required
var requiredMinorVersion = ${version_minor};
// Minor version of Flash required
var requiredRevision = ${version_revision};
// -----------------------------------------------------------------------------
// -->
function moveIFrame(x,y,w,h) {
    var frameRef=document.getElementById("content");
    frameRef.style.left=x;
    frameRef.style.top=y;
    frameRef.width=w;
    frameRef.height=h;
}
 
function setIFrameContent( contentSource )
{
	document.getElementById("content").src = contentSource;
}
 
function hideIFrame()
{
    document.getElementById("content").style.visibility="hidden";
}
 
function showIFrame()
{
    document.getElementById("content").style.visibility="visible";
}
 
</script>
</head>
 
<body scroll="no">
<script language="JavaScript" type="text/javascript">
 
<!--
// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
var hasProductInstall = DetectFlashVer(6, 0, 65);
 
// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
 
if ( hasProductInstall && !hasRequestedVersion ) {
	// DO NOT MODIFY THE FOLLOWING FOUR LINES
	// Location visited after installation is complete if installation is required
	var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
	var MMredirectURL = window.location;
    document.title = document.title.slice(0, 47) + " - Flash Player Installation";
    var MMdoctitle = document.title;
 
	AC_FL_RunContent(
		"src", "playerProductInstall",
		"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
		"width", "${width}",
		"height", "${height}",
		"align", "middle",
		"id", "${application}",
		"quality", "high",
		"bgcolor", "${bgcolor}",
		"name", "${application}",
		"allowScriptAccess","sameDomain",
		"type", "application/x-shockwave-flash",
		"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
} else if (hasRequestedVersion) {
	// if we've detected an acceptable version
	// embed the Flash Content SWF when all tests are passed
	AC_FL_RunContent(
			"src", "${swf}",
			"width", "${width}",
			"height", "${height}",
			"align", "middle",
			"id", "${application}",
			"quality", "high",
			"bgcolor", "${bgcolor}",
			"name", "${application}",
			"allowScriptAccess","sameDomain",
			"type", "application/x-shockwave-flash",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
  } else {  // flash is too old or we can't detect the plugin
    var alternateContent = 'Alternate HTML content should be placed here. '
  	+ 'This content requires the Adobe Flash Player. '
   	+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
    document.write(alternateContent);  // insert non-flash content
  }
// -->
</script>
<noscript>
  	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="${application}" width="${width}" height="${height}" align ="middle"
			codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
			<param name="movie" value="${swf}.swf" />
			<param name="quality" value="high" />
			<param name="bgcolor" value="${bgcolor}" />
			<param name="allowScriptAccess" value="sameDomain" />
			<embed src="${swf}.swf" quality="high" bgcolor="${bgcolor}"
				width="${width}" height="${height}" name="${application}" align="middle"
				play="true"
				loop="false"
				quality="high"
				allowScriptAccess="sameDomain"
				type="application/x-shockwave-flash"
				pluginspage="http://www.adobe.com/go/getflashplayer">
			</embed>
	</object>
</noscript><center><table width="100%" ><tr><td>
<iframe id="content" name="content" align="middle"
    frameborder="0"
    style="position:absolute;background-color:transparent;border:0px;visibility:hidden;"></iframe>
</body>
</html>

Voilà le tout en zip
http://perso.numericable.fr/~jpaulnaz/nulonftp.zip

Merci d avance pour l aide apportée .
Bon WE .