Up vote 2 down vote favorite share g+ share fb share tw.
I'm trying to create a fullscreen slideshow with as3. My problem now is that if I click the fullscreen button too quick (--> before the image has been loaded and hasn't therefore been added to the stage) the screen just stays black and nothing is working anymore (the following images aren't loading either. Here is a demo of the problem: eckquarters.com/watch.php?e6243444a9200c Here is the code: function onFirstSlideLoaded(e:Event):void { trace("FIRST SLIDE LOADED EVENT STARTED"); firstImage = imageLoader.
GetBitmap(e.currentTarget. Id); slides. Push(firstImage); firstSlideLoaded = true; currentImage.
AddChild(firstImage); mcSlideHolder. AddChild(currentImage); //den Inhalt des Loaders zu einem Container ausgeben trace("FIRST SLIDE ADDED EVENT FINISHED"); } function showFull(e:MouseEvent):void { trace("F U L L "); stage. ScaleMode = StageScaleMode.
NO_SCALE; var sw:Number = stage. FullScreenWidth; var sh:Number = stage. FullScreenHeight; //EventListener wenn sich Bildgröße verändert um Bildgröße zu aktualisieren; stage.
AddEventListener(Event. RESIZE, updateStage); if(firstSlideLoaded) { mcSlideHolder. AddChild(currentImage); stage.
AddChild(mcSlideHolder); stage. AddChild(fullScreenButton); stage. AddChild(slideButton); stage.
AddChild(closeButton); stage. AddChild(saveButton); stage. AddChild(nextButton); stage.
AddChild(prevButton); firstSlideLoaded = false; trace("child added"); } } The bug has been driving me crazy for days and i'm pretty much out of ideas:) if anyone could help me out flash actionscript-3 fullscreen link|improve this question asked May 8 '11 at 12:03haemse21219 84% accept rate.
Thx alot for your reply! Yah I already did that, it works just fine, however it isnt really a satisfying solution for me as the user experience suffers from it... – haemse May 8 '11 at 13:04 Then I suggest you test whether the image is loaded by storing it in a hash table once it is loaded. If it isn't loaded, put up a progress bar until you receive the event that tells you it is loaded.
– Robusto May 8 '11 at 13:15 As you can see, I add the current Image to the mcSlideHolder just when the onFirstSlideLoaded-event occurs ... so if you click the fullscreen button before it has finished loading the image it will add it afterwards when it's loaded ... so the image must be loaded then ... but why does the screen stay black? – haemse May 8 '11 at 13:46.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.