Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > Flash/Flex > Flex
Flex Forum d'entraide sur la programmation Adobe Flex : applications Internet riches (RIA)
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 12/10/2007, 17h39   #1
Invité régulier
 
Inscription : janvier 2004
Messages : 30
Détails du profil
Informations forums :
Inscription : janvier 2004
Messages : 30
Points : 9
Points : 9
Par défaut Intéraction Flex et doc Html

Est il possible d'intéragir sur le html via javascript depuis le swf flex ?
Pareil est-il possible de recuperer depuis le swf en flex des variables input hidden du document html dans lequel est inclut le swf ?
Chromozome est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 13/10/2007, 16h55   #2
Rédacteur
 
Avatar de loka
 
Homme Romain PERRUCHON
Architecte - Expert Technique
Inscription : novembre 2004
Messages : 2 664
Détails du profil
Informations personnelles :
Nom : Homme Romain PERRUCHON
Âge : 30
Localisation : France, Loire Atlantique (Pays de la Loire)

Informations professionnelles :
Activité : Architecte - Expert Technique
Secteur : Service public

Informations forums :
Inscription : novembre 2004
Messages : 2 664
Points : 3 607
Points : 3 607
Citation:
Est il possible d'intéragir sur le html via javascript depuis le swf flex ?
Oui, va te renseigner par exemple sur FSCommand en javascript.

un exemple :

Code :
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
/*******************************************************************************
**
** DoFSCommand()
**
*******************************************************************************/
function elm_DoFSCommand(command, args) {
	var buffer = false;
	args = String(args);
	command = String(command);
	var aArgs = args.split(";");
	switch (command) {
		case "OnEditTextDesign":
			window.open ('rte/demo.htm', '', config='height=400, width=700, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');
			break;
		case "OnGetFilePath":
			alert(command);
			break;
		default :
			//alert(command);
			break;
		break;
	}
	return buffer;
}
 
/**********************
** Compatibilité IE
**********************/
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<script language=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub elm_FSCommand(ByVal command, ByVal args)\n');
	document.write(' call elm_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</script\> \n');
}
Il faut que depuis ton swf tu envois des messages qui seront récupérés par le FSCommand (ici, les messages sont OnEditTextDesign et OnGetFilePath).

Tu peux regarder du coté de externalInterface, peut être trouveras tu ton bonheur
__________________
SFML - API Multimédia C++ multiplateforme !
loka est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 15h28.


 
 
 
 
Partenaires

Hébergement Web