NeoSoft Support Forum Forum Index  Your source for Plug-Ins, sample publications, source code and more...

Source Language:
Translate to:

NeoSoft Support Forum
NeoSoft Community Support Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   SmartFeedSmartFeed   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

pflash controle touche clavier

 
Post new topic   printer-friendly view   Reply to topic    NeoSoft Support Forum Forum Index -> NeoBook en Français
View previous topic :: View next topic  
Author Message
maxoureunion
NeoBooker


Joined: 15 Jan 2006
Posts: 149
Location: FRANCE

PostPosted: Fri Jan 29, 2010 7:03 am    Post subject: pflash controle touche clavier Reply with quote

bonjour la communauté

est-il possible sous pflash for javaCRIPT, de détecter si la touche avance et retour du clavier est actionnée ?

je cherche à faire un programme qui utilise les touches
" avance "
" retour " et la touche
" valider " .
des que l'utilisateur appuie sur une touche correspondante une action javascript est exécutée.

merci de m'aider
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Neosoft Support
NeoSoft Team


Joined: 31 Mar 2005
Posts: 4048
Location: Oregon, USA

PostPosted: Fri Jan 29, 2010 11:34 am    Post subject: Reply with quote

I'm not sure about pflash, but you can use NeoBook's Push Buttons' shortcut key to execute a script whenever a specific key is pressed. The Push Buttons can be located off-screen if you do not want them to be visible.
_________________
NeoSoft Support
Back to top
View user's profile Send private message Send e-mail Visit poster's website
maxoureunion
NeoBooker


Joined: 15 Jan 2006
Posts: 149
Location: FRANCE

PostPosted: Sat Jan 30, 2010 6:34 am    Post subject: Reply with quote

merci de votre réponse, mais si j'utilise un bouton de neobook, comment stopper une boucle lancé ?

exemple dans pflash j'ai ce code:

pf.pf_createClip("background");
pf.pf_createClip("pic");
pf.pf_load("background","resources/image2.jpg");


myarray=new Array();
myarray[1]="resources/picture1.jpg";
myarray[2]="resources/picture2.jpg";
myarray[3]="resources/picture3.jpg";
myarray[4]="resources/picture4.jpg";

current=0;
total=myarray.length-1;

function load(){
pf.pf_clearall("pic");
current=current+1;
if(current>total){
current=1;
}
pf.pf_load("pic",myarray[current]);
pf.pf_jscallback("pic","onload","onload();");
}
function onload(){
pf.pf_beginfill("pic",0xffffff,1);
props=pf.pf_getproperties("pic");
pf.pf_drawrect("pic",-10,-10,props.width+20,props.height+20,15);
pf.pf_endfill("pic");
pf.pf_dropshadowfilter("pic", 10, 45);
pf.pf_align("pic", {verticalCenter:0,horizontalCenter:0});
pf.pf_tweenfrom("pic",1,{x:-400,rotation:-90,scaleX:2.5,scaleY:2.5,ease:"Back.easeOut"});
pf.pf_tween("pic",1,{delay:3,rotation:90,x:+800,ease:"Back.easeIn",overwrite:false,onComplete:"load();"});
}
load();
pf.pf_jscallback("pic","onload","onload();");


Evil or Very Mad j"aimerai changer les images "picture1.jpg" à "picture4.jpg" dès que l'utilisateur appuie sur la touche "suivant" du clavier.
ma question: comment changer ses images avec d'autres ?

j'ai essayé mais cela crée un blanc avec:
BrowserLoadFromStr "WebBrowser1" ""
BrowserGoTo "WebBrowser1" "[PubDir]pf2.html"
BrowserExecScript "WebBrowser1" "[Code]" "JavaScript"

merci
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Neosoft Support
NeoSoft Team


Joined: 31 Mar 2005
Posts: 4048
Location: Oregon, USA

PostPosted: Mon Feb 01, 2010 11:02 am    Post subject: Reply with quote

I think this is something that the author of PFlash will need to answer.
_________________
NeoSoft Support
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Fabien
NeoBooker


Joined: 04 Dec 2008
Posts: 70
Location: France - Lyon

PostPosted: Thu Feb 04, 2010 5:56 pm    Post subject: Reply with quote

Salut,

Tu peux effectivement utiliser la détection de touche avec Neobook et utiliser la variable neobook dans pflash.

Exemple pour tes images de 1 à 4:
Remplace dans le fichier .js:
Code:
myarray=new Array();
myarray[1]=window.external.nbGetVar('[image1]');
myarray[2]=window.external.nbGetVar('[image2]');
myarray[3]=window.external.nbGetVar('[image3]');
myarray[4]=window.external.nbGetVar('[image4]');


Dans Neobook tu renseignes les variables suivantes:
Code:
SetVar "[image1]" "resources/picture1.jpg"
SetVar "[image2]" "resources/picture2.jpg"
SetVar "[image3]" "resources/picture3.jpg"
SetVar "[image4]" "resources/picture4.jpg"


Ce qui te permet de facilement modifier les images par la suite, voilà si ça peut te mettre sur la voie Wink

Fabien
_________________
¡ sǝıʇɹo sǝl suɐp éɯéɯ sɐd ǝssnod
Back to top
View user's profile Send private message MSN Messenger
maxoureunion
NeoBooker


Joined: 15 Jan 2006
Posts: 149
Location: FRANCE

PostPosted: Thu Feb 04, 2010 9:07 pm    Post subject: Reply with quote

merci beaucoup Fabien,
c'est exactement ce que je cherchais. je n'aurai jamais pu le deviner tout seul. merci encore
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    NeoSoft Support Forum Forum Index -> NeoBook en Français All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

Forum content © 2008 NeoSoft Corp. All rights reserved.