crusy.net

  • home.
  • photos.
  • about.

 

11
Nov

Flashvars (von AS3 an AS2) übergeben

By crusy|Coding, Flash|Be the first to comment!

Problem: Man lädt eine externe SWF, und möchte dieser Flashvars übergeben. Die externe SWF ist in AS2 geschrieben, die eigentliche Anwendung in AS3.

Lösung:

private var _loader:Loader;

private function loadSWF():void
{
var variables:URLVariables = new URLVariables();
variables.name = “Homer”;
variables.essen = “Biernuesse”;

var request:URLRequest = new URLRequest( “file.swf” );
request.data = variables;

_loader = new Loader();
_loader.contentLoaderInfo.addEventListener( Event.COMPLETE, onSWFLoaded );
try
{
_loader.load( request, new LoaderContext(false, ApplicationDomain.currentDomain) );
}
catch(error:Error){}
}

private function onSWFLoaded( event:Event ):void
{
addChild( _loader.content );
}

Tagged as: Actionscript, AS2, AS3, Flashvars
Add your comment →

0 Comments

Leave your comment below! Cancel Reply

View More Posts:
  • ←
  • →

Suche:

Schubladen:

  • Apropos (55)
  • Computer (211)
    • Arduino (4)
    • Coding (157)
      • CSS (5)
      • Flash (87)
      • Java (2)
      • Javascript (17)
      • PHP (5)
    • Firefox (18)
    • OS X (18)
  • Lustig (86)
  • Musik (50)
  • Photo (30)
    • Photoshop (16)
  • Video (57)
  • Web (94)
  • Werbung (28)

@crusy:

Die HARIBO Goldbären werden dieses Jahr 90. Now you know.
2 hours ago from Twitter for Windows Phone
RT @DylanDogger: Paradox: Menschen, die über sich lachen können, nehme ich ernst.
2 hours ago from web
RT @Afelia: RT @fagri Dann gehen wir morgen halt "vorerst" gegen ACTA demonstrieren. #stopacta
2 hours ago from TweetDeck
Die Sonne scheint mir in's Gesicht. Das soll sie nicht.
2 days ago from web
optisch mittig my ass.
2 days ago from web

Kommentare:

  • crusy on Van Gogh meets Monkey Island (und mehr!)
  • Stefan Heller on Van Gogh meets Monkey Island (und mehr!)
  • crusy on Arduino mit Eclipse als IDE
  • michael on Arduino mit Eclipse als IDE
  • crusy on AIR Native Extension für Arduino

Tags:

Actionscript Actionscript 3 Addon Adobe AIR Apple AS AS3 Coding Comment Cover CSS Eclipse Facebook FDT Fehlermeldung Film Firefox Flash Flex Font Google Internet iOS iPad iPhone Javascript Kommentar Kunst Mac music Musik Obama OS X OSX Photoshop PHP Plugin Star Wars Video Web Werbung Wordpress XML Youtube

Projekte

  • Bent Larsen
    DAS Film Noir Point-and-Click-Adventure
  • crusy goes sf
    Photoblog aus San Francisco
  • Insignia
    Aufbau. Handel. Herrschaft.
  • nerdeln.de
    Nörgeln für Nerds
  • Photos
    Mein Photoblog
  • Tourtagebuch
    Von sechs Menschen, einer Stadt und keiner Wohnung

Powered by the inLine Minimal WordPress Theme