Précédent   Forum des professionnels en informatique > Webmasters - Développement Web > Flash/Flex > Flash > AS3
AS3 Questions relatives à la programmation ActionScript 3 (Cours AS3)
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 21/11/2010, 22h24   #1
Invité de passage
 
Inscription : novembre 2010
Messages : 3
Détails du profil
Informations forums :
Inscription : novembre 2010
Messages : 3
Points : 0
Points : 0
Par défaut Ajouter liens sur un menu Flash existant

Bonjour,

Je ne connais rien en actionscript... mais j'ai trouvé sur le web un menu sympa

Je ne sais pas comment ajouter mes liens.
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
import com.greensock.*;
import com.greensock.plugins.*;
TweenPlugin.activate([TintPlugin]);
 
var btnsArray:Array = ["Home", "Références", "Contact", " "];
var colors:Array= [0xCC0050,0xCC0050,0xCC0050];
 
 
 
 
createButtons();
 
function createButtons ():void{
for (var i :uint= 0; i < btnsArray.length; i++){
var btn:MyBtn = new MyBtn();
TweenLite.to (btn.btn_rect, 0, {tint: colors[i]});
btn.x = i*115;
btn.y = 0;
btn.btn_label.text = btnsArray[i];
 
btn.addEventListener(MouseEvent.MOUSE_OUT, btnOut);
btn.addEventListener(MouseEvent.MOUSE_OVER, btnOver);
btn.addEventListener(MouseEvent.CLICK,btnClick);
 
btn.buttonMode = true;
btn.mouseChildren = false;
addChild (btn);
}
}
 
function btnOver (e:MouseEvent):void{
var mc:MovieClip = e.currentTarget as MovieClip;
TweenLite.to (mc.btn_label, .5, {tint: 0xFFFFFF});
TweenLite.to (mc.btn_rect,.5, {height: 35});
}
 
function btnOut (e:MouseEvent):void{
var mc:MovieClip = e.currentTarget as MovieClip;
TweenLite.to (mc.btn_label, .5, {tint: 0x000000});
TweenLite.to (mc.btn_rect, .5, {height: 5});
}
 
function btnClick(e:MouseEvent):void{
 
????????
 
}

Pouvez-vous jeter un œil sur ce menu et me dire comment faire svp? Merci d'avance!!!!
charlotte_14 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 21/11/2010, 23h03   #2
Membre habitué
 
Développeur multimédia
Inscription : juin 2009
Messages : 128
Détails du profil
Informations professionnelles :
Activité : Développeur multimédia

Informations forums :
Inscription : juin 2009
Messages : 128
Points : 148
Points : 148
Tu veux qu'au cliques, le flash redirige vers une page web?

Code AS3 :
1
2
3
4
5
6
7
 
function btnClick(e:MouseEvent):void{
    var myURL:String = "http://www.google.fr";
    var myTarget:String = "_blank"; 
    var myRequest:URLRequest = new URLRequest(myUrl);
    navigateToURL(myRequest, myTarget);
}
fazermokeur est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 21/11/2010, 23h23   #3
Invité de passage
 
Inscription : novembre 2010
Messages : 3
Détails du profil
Informations forums :
Inscription : novembre 2010
Messages : 3
Points : 0
Points : 0
Merci pour ta réponse c'est sympa!
Je me suis mal exprimée. J'ai 3 boutons avec 3 pages html différentes. Je veux simplement qu'en cliquant sur mon bouton accueil on soit dirigé sur index.htlm, références= références.html etc.
Merci d'aider une bille!
charlotte_14 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 22/11/2010, 15h37   #4
Invité de passage
 
Inscription : novembre 2010
Messages : 3
Détails du profil
Informations forums :
Inscription : novembre 2010
Messages : 3
Points : 0
Points : 0
C'est bon j'ai trouvé de l'aide merci!
charlotte_14 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 03h18.


 
 
 
 
Partenaires

Hébergement Web