IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VBScript Discussion :

Flash dans une application visual basic


Sujet :

VBScript

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2011
    Messages
    21
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 21
    Points : 11
    Points
    11
    Par défaut Flash dans une application visual basic
    Serait-il possible d' inserer un code flash comme celui ci-dessous :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <table style="margin:0 0 10px 0; width:244px; background:#fff; border:1px solid #F3F3F3;" cellspacing="0" cellpadding="0"><tr><td style="font-family:verdana; font-size:11px; color:#000; padding:5px 5px;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="640" height="480"><param name="movie" value="http://www.jeuxclic.com/jeux/bubblez.swf"><param name="quality" value="high"></param><param name="menu" value="false"></param><embed src="http://www.jeuxclic.com/jeux/bubblez.swf" width="640" height="480" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false"></embed></object></td></tr><tr><td style="font-family:verdana; font-size:11px; padding:5px 10px; border-top:1px solid #F3F3F3;" align="center"><strong><a href="http://www.jeuxclic.com/jeux.php?id=421" target="_blank">Bubblez</a></strong> |  <a href="http://www.jeuxclic.com">Jeu</a> avec <a href="http://www.jeuxclic.com" title="Jeux avec Jeuxclic.com">Jeuxclic.com</a></td></tr></table>
    et de faire une application-jeux.

  2. #2
    Expert éminent
    Avatar de hackoofr
    Homme Profil pro
    Enseignant
    Inscrit en
    Juin 2009
    Messages
    3 840
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 49
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 840
    Points : 9 224
    Points
    9 224
    Par défaut

    voila tu dois copier et coller ce code et l'enregistrer sous par exemple en Bubblez.hta
    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
    <HTA:APPLICATION 
        ICON="icon.ico"
        APPLICATIONNAME = "BUBBLEZ" 
        BORDER="dialog"
        BORDERSTYLE="complex"
        CONTEXTMENU="no"
        SYSMENU="yes"
        MAXIMIZEBUTTON="no"
        SCROLL="no" 
    >
    <title>BUBBLEZ © Jeuxclic.com</title> 
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
    <link rel="stylesheet" type="text/css" href="https://s.yimg.com/lq/i/reg/css/yregbase_sec_ui_1_9.css">
    <style>
        body{
            background-color: lightblue;
        }
        label,.btn{
            font-weight: bold;
        }
    </style>
    <script language="VBScript">
    Sub window_onload()
            CenterWindow 690, 570   
        End Sub
     
        Sub CenterWindow(x,y)
            window.resizeTo x, y
            iLeft = window.screen.availWidth/2 - x/2
            itop = window.screen.availHeight/2 - y/2
            window.moveTo ileft, itop
        End Sub
    </script>	
    <body>
    <table style="margin:0 0 10px 0; width:244px; background:#fff; border:1px solid #F3F3F3;" cellspacing="0" cellpadding="0"><tr><td style="font-family:verdana; font-size:11px; color:#000; padding:5px 5px;"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="640" height="480"><param name="movie" value="http://www.jeuxclic.com/jeux/bubblez.swf"><param name="quality" value="high"></param><param name="menu" value="false"></param><embed src="http://www.jeuxclic.com/jeux/bubblez.swf" width="640" height="480" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" menu="false"></embed></object></td></tr><tr><td style="font-family:verdana; font-size:11px; padding:5px 10px; border-top:1px solid #F3F3F3;" align="center"><strong><a href="http://www.jeuxclic.com/jeux.php?id=421" target="_blank">Bubblez</a></strong> |  <a href="http://www.jeuxclic.com">Jeu</a> avec <a href="http://www.jeuxclic.com" title="Jeux avec Jeuxclic.com">Jeuxclic.com</a></td></tr></table>
    </body> 
    </html>

  3. #3
    Membre à l'essai
    Profil pro
    Inscrit en
    Février 2011
    Messages
    21
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2011
    Messages : 21
    Points : 11
    Points
    11
    Par défaut Re:
    Un grand merci à hackoofr
    Maintenant ça marche
    Encore merci a+
    Je clos le sujet

  4. #4
    Expert éminent
    Avatar de hackoofr
    Homme Profil pro
    Enseignant
    Inscrit en
    Juin 2009
    Messages
    3 840
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 49
    Localisation : Tunisie

    Informations professionnelles :
    Activité : Enseignant

    Informations forums :
    Inscription : Juin 2009
    Messages : 3 840
    Points : 9 224
    Points
    9 224
    Par défaut

    voici une autre méthode mais celle-ci pour télécharger le .SWF dans votre disque dur et de jouer en locale offline et vous pouvez le jouer en plein écran aussi
    C'est un autre jeu que je l'ai testé en le téléchargeant grâce à ce vbscript
    Pour tester ce script enregistrer-le sous Coast Bike.vbs
    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
    Dim strFileURL,strHDLocation
    ' ---------------------------------Les paramètres à modifier pour télécharger le jeu---------------------------------
        strFileURL = "http://www.jeuxclic.com/jeux/game-1270029047.swf"
        strHDLocation = "c:\Coast Bike.swf"
    ' ---------------------------------Les paramètres à modifier pour télécharger le jeu---------------------------------
    ' Récupérer le fichier
        Set Ws = CreateObject("WScript.Shell")
        Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
        objXMLHTTP.open "GET", strFileURL, false
        objXMLHTTP.send()
    If objXMLHTTP.Status = 200 Then
    Set objADOStream = CreateObject("ADODB.Stream")
    objADOStream.Open
    objADOStream.Type = 1 'adTypeBinary
    objADOStream.Write objXMLHTTP.ResponseBody
    objADOStream.Position = 0    'Set the stream position to the start
    Set objFSO = Createobject("Scripting.FileSystemObject")
    If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation
    Set objFSO = Nothing
    objADOStream.SaveToFile strHDLocation
    objADOStream.Close
    Set objADOStream = Nothing
    End If
    Set objXMLHTTP = Nothing 
    'Autoriser le contenu actif à s'exécuter dans les fichiers de la zone Ordinateur local
     LockDown="HKLM\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN\"
     Keysec1=LockDown & "iexplore.exe"
     itemtype = "REG_DWORD"
     WS.RegWrite Keysec1,0,itemtype 
    Ws.Run "%comspec% /c Start iexplore " & strHDLocation, 0, 1 
    wscript.sleep 3000
    WS.SendKeys "{F11}" 'pour mettre internet explorer en plein écran
    Set WS = Nothing
    de même vous pouvez choisir un autre jeu, juste vous remplacer ces 2 lignes
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    strFileURL = "http://www.jeuxclic.com/jeux/game-1270029047.swf"
        strHDLocation = "c:\Coast Bike.swf"
    par ceci en l'enregistrant par exemple sous le nom Offroad Madness.vbs
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    strFileURL = "http://www.jeuxclic.com/jeux/game-1308170823.swf"
        strHDLocation = "c:\Offroad Madness.swf"
    et ceci en l'enregistrant sous Blade Striker.vbs
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    ' ---------------------------------Les paramètres à modifier pour télécharger le jeu---------------------------------
        strFileURL = "http://www.jeuxclic.com/jeux/game-1255462411.swf"
        strHDLocation = "c:\Blade Striker.swf"
    ' ---------------------------------Les paramètres à modifier pour télécharger le jeu---------------------------------
    Bon Divertissement

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 10
    Dernier message: 12/05/2010, 11h10
  2. Animation Flash dans une application
    Par Nemix dans le forum Débuter
    Réponses: 4
    Dernier message: 13/10/2008, 11h10
  3. comment intégrer du flash dans une application fénétré
    Par inno007 dans le forum Eclipse Java
    Réponses: 3
    Dernier message: 19/08/2008, 14h08
  4. Réponses: 4
    Dernier message: 28/03/2007, 13h47
  5. [débutante]Intégrer flash dans une application java
    Par bouba83 dans le forum Interfaces Graphiques en Java
    Réponses: 6
    Dernier message: 11/05/2006, 11h11

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo