| |||||||
Du magst keine Werbung? Wir auch nicht!
Einfach registrieren und die Werbung ist weg. Diese Nachricht sehen nur nicht registrierte Nutzer.
![]() |
| | LinkBack | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Neuer User Registriert seit: Feb 2010
Beiträge: 3
| SWF in Flash
Hallo, ich lade via Flash per XML eine SWF Datei, die sich zwar aufbauen lässt, jedoch lassen sich die Objekte in der SWF nicht ändern. (Da die zu ladende SWF Daten über den Container aufruft <denk ich mal>) Leider kenne ich mich gar nicht damit aus. was ich meine: --> ?eker Parke - Her YER güzel olacak --> Menü-Btn: ÜRÜNLERIMIZ Hier die SWF.AS Datei die angesprochen wird: Code: package com.massiveProCreation.ball.sections
{
import flash.display.Sprite;
import flash.display.LoaderInfo;
import flash.display.Loader;
import flash.media.SoundMixer;
import flash.display.StageDisplayState;
import flash.net.URLRequest;
import com.massiveProCreation.events.CustomEvent;
import flash.events.Event;
// ONLY FOR LIGHTBOX
// import flash.external.ExternalInterface;
// ani.addEventListener(MouseEvent.CLICK, b1);
// function b1(event:MouseEvent) {
// ExternalInterface.call("SWFDelegate","kreator.swf","999","512","Ürünlerimiz");
// }
public class Swf2 extends Sprite
{
// swf2 loaderr
private var _loader:Loader = new Loader();
// swf2 holder
private var _holder:Sprite = new Sprite();
// swf2 url
private var _url:String;
public function Swf2()
{
super();
}
public function construct(url:String):void {
_url = url ;
//trace(_url);
this.addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
}
private function removed(e:Event):void {
this.removeEventListener(Event.RESIZE, onResize);
/*this.removeChild(_holder);
_holder = null;
_loader.unload();
_loader = null;*/
}
private function added(e:Event):void {
// we assign the events to the loader and then we load the actual swf2
//_loader = new Loader();
//_loader.unload();
//_loader = null;
//trace(_loader);
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, swf2Loaded, false, 0, true);
_loader.load(new URLRequest(_url));
stage.addEventListener(Event.RESIZE, onResize, false, 0, true);
}
private function onResize(e:Event):void {
if(stage.displayState==StageDisplayState.FULL_SCREEN){
_holder.x = (stage.stageWidth - 950) / 2;
_holder.y = (stage.stageHeight - 560) / 2;
}
}
public function swf2Unload():void {
_loader.unload();
this.removeChild(_holder);
_holder = null;
_loader = null;
// SoundMixer.stopAll();
trace("UNLOAD!!!!!")
}
private function swf2Loaded(e:Event):void {
// when swf2 is loaded we add it to the stage
// ONLY FOR LIGHTBOX //ExternalInterface.call("SWFDelegate","kreator.swf","999","512","Ürünlerimiz");
//trace("VIDEO LOADED!!!!!!!!!!!");
//_holder = new Sprite();
//_holder.graphics.beginFill(0xFF0000, 1);
//_holder.graphics.drawRect(0, 0, _loader.content.width, _loader.content.height);
//_holder.graphics.endFill();
//_loader.alpha = 1;
//_loader.visible = true;
_holder.addChild(_loader.content);
// trace(_loader.content);
this.addChild(_holder);
_holder.getChildAt(0).alpha = 1;
_holder.x = (stage.stageWidth - 950) / 2;
_holder.y = (stage.stageHeight - 560) / 2;
//trace(Object(_holder.getChildAt(0)).getChildAt(0));
//var obj:Object = Object(_holder.getChildAt(0)).getChildAt(0);
//trace(obj.getChildAt(0));
//obj.getChildAt(0).killVideo();
//trace("!!!VIDEO!!!");
//trace(this.x);
//trace(this.y);
//trace(this.width);
// trace(this.height);
// _holder.alpha = 1;
//this.alpha = 1;
// this.visible = true;
// _holder.visible = true;
dispatchEvent(new CustomEvent(CustomEvent.READY_TO_DISPLAY, true, false));
}
}
} Bin für jede Hilfe Dankbar. Geändert von juan90419 (20-05-2010 um 11:07 Uhr) |
| | |
![]() |
| Lesezeichen |
| Stichworte |
| flash as3, fullscreen, lightbox, objektzugriff, swf in fla |
| Themen-Optionen | |
| Ansicht | |
| |