Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > Flash/Flex > Flash > AS1/AS2
AS1/AS2 Questions relatives à la programmation ActionScript 1 et 2 (Cours AS2)
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 10/05/2011, 11h29   #1
Candidat au titre de Membre du Club
 
Inscription : septembre 2005
Messages : 169
Détails du profil
Informations forums :
Inscription : septembre 2005
Messages : 169
Points : 14
Points : 14
Par défaut showliste de deux listes en AS2

Bonjour,

Pour l'instant mon code me permet de basculer entre deux listes suivant un click sur le green button (liste Radio et TV)!
Ce que je veux avoir au final, c'est l'affichage de deux liste (TV et Radio) lors du click sur showliste et annuler le green button!
à quel niveau dois je intervenir avec ce bout de code!?

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
37
38
39
40
41
42
43
44
45
46
47
48
49
function showChannels()
{
	//_global.ZAPPING_MANAGER.setDisplayable(false);
	channellist.myName=_global.ZAPPING_MANAGER.getCurrentChannelList().getName();
	channellist.myType=_global.ZAPPING_MANAGER.m_currentChannel.getType();
	//Display right background in case of radio
	if(channellist.myType == "RADIO") {_global.backradio._visible=true;channellist.title.text=RADIO_CHANNELS[_global.userlanguage];}
	else {_global.backradio._visible=false;channellist.title.text=TV_CHANNELS[_global.userlanguage];}
	// Channel list management
	channellist.myChannels=_global.ZAPPING_MANAGER.getCurrentChannelList().getItems(channellist.myType);
	channellist.myMaxi=parseInt(channellist.myChannels.length);
	//Fill channel list name
	if(channellist.myName!="MEGALIST")
		channellist.fav.text=FAVOR[_global.userlanguage]+" "+_global.ZAPPING_MANAGER.getChannelListUserName(channellist.myName);	
	else
		channellist.fav.text="";	
	// Get current indice and fill channel list
	var curind=_global.ZAPPING_MANAGER.getCurrentChannelIndex();
	if(channellist.myMaxi<12) {
		fillChannelList(0);
		placeFocus(curind+1);
	}
	else
	{
		fillChannelList(curind);
		placeFocus(1);
	}
	//Show
	channellist._visible=true;
	channelback._visible=true;
	channelfocuser._visible=true;
	//Start keyListener
	clearMyInterval(showinterv);
	showinterv=setMyInterval(71,"livetv","livetv",false,this,"enable_showchannels",2);
	//Update green icon visibility
	if ((channellist.myType=="TV" && _global.ZAPPING_MANAGER.getCurrentChannelList().getItems("RADIO").length>0) ||
		(channellist.myType=="RADIO" && _global.ZAPPING_MANAGER.getCurrentChannelList().getItems("TV").length>0))
	{
		channellist.green_icon._visible = true;
		if(channellist.myType=="TV") 
		channellist.other.text=RADIO_CHANNELS[_global.userlanguage];
		else channellist.other.text=TV_CHANNELS[_global.userlanguage];
	}
	else
	{
		channellist.green_icon._visible = false;
		channellist.other.text="";
	}
}

Merci d'avance pour votre aide
ghyosmik est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 10/05/2011, 17h36   #2
Candidat au titre de Membre du Club
 
Inscription : septembre 2005
Messages : 169
Détails du profil
Informations forums :
Inscription : septembre 2005
Messages : 169
Points : 14
Points : 14
Bon j'ai fais des tests sur ce bout de code et je trouve que ça m'affiche juste la liste des radios:

ce qui gére l'affichage de la liste
Code :
1
2
// Channel list management
	channellist.myChannels=_global.ZAPPING_MANAGER.getCurrentChannelList().getItems(channellist.myType);
je l'ai remplacé par ceci
Code :
1
2
// Channel list management
	channellist.myChannels=_global.ZAPPING_MANAGER.getCurrentChannelList().getItems("RADIO");

Comment puis-je afficher "RADIO"+ "TV"??

merciiiii
ghyosmik 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 11h14.


 
 
 
 
Partenaires

Hébergement Web