Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

PHP und ActionScript

Empfohlene Antworten

Veröffentlicht

Hallo.

Zur Zeit lerne ich gerade Flash 8 mit ActionScript 2.0

Mit Actionscript will ich über PHP mit MySQL kommunizieren. Leider habe ich schon einige Probleme:

Mit LoadVars.Send() versteh ich mich voll und Ganz. Aber mit den Loaderfunktionen SendandLoad() und Load() hab ich so meine Probleme.

Mein Actionscript code sieht so aus:


on(release)

{

        var loader:LoadVars = new LoadVars(); // Empfangen

        loader.load("URL..../flash.php");

        output.text = load.username;

}

Der PHP Code so:

<?
echo "&username=achillis&"
?>[/PHP]

Output.text = achillis, so die Theorie: In der Praxis: undefined.

Wo ist das Problem?

Liebe Grüße

errox

  • 1 Monat später...

Hi...

Kurz mal vorweg: Das Laden ist ein asynchroner Prozess.

Das heisst dass die Daten die du anforderst irgendwann mal eintrudeln, aber gewiss nicht im selben moment in dem Flash den Code ausgeführt und die Daten ausgeben will - daher bleibt die Variable auch noch undefiniert.

Versuchs mal hiermit:


myLoadVars.load("Datei.php");

myLoadVars.onLoad = function(){

	anzLadeversuche++;

	if(myLoadVars.loaded){

		gotoAndStop("Geladen");

	}

	else{

		if(anzLadeversuche<maxLadeversuche){

			myLoadVars.load("datei.php");

		}

		else{

			gotoAndStop("Fehler");

		}

	}

}


Hier wird mehrfach erfragt ob die Ladesequenz erfolgreich war und dann kommt die Behandlungsroutine.

Ich hab mich jetzt extra wegen deinem Thread registriert ^^ - wieso nutzt du denn kein Flashforum? Dein Thread ist vom 01.09.2009 und keiner hat dir geantwortet - versuchs mal mit Tutorials.de - ich laufe da auch rum, frag nach Mike :).

Machs gut ;).

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.