PDA

View Full Version : problema carica video in action script 3


Dhavamba
28-05-2012, 10:47
Ciao, sto facendo un gioco in flash e mi č capitato un problema molto strano: devocaricare un video, ecco tutto bene tranne che il file SWF si vede lento (solo leimmagini come la musica va a velocitā normale, la creazione di un fastidiosi ritardi)non riesco a capire il motivo (se posso caricare altri video si caricano a velocitā normale!) Questa č la classe




package Screens
{
import Events.ScreenEvent;
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.events.TimerEvent;
import flash.media.SoundTransform;
import flash.utils.getQualifiedSuperclassName;
import flash.utils.Timer;
import Managers.ScreenManager;
import Managers.SoundManager;
import ScreenObjects.Button;
import ScreenObjects.SoundButton;

public class GameIntro extends Screen
{
[Embed(source = '../../lib/gameIntro.swf')]
private var Video:Class;

private var clip:MovieClip;
private var timer:Timer;
private var skipButton;
private var skipButton:SkipButton;
private var sound:SoundButton;


public function GameIntro()
{
clip = new Video();
timer = new Timer(1000, 28);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, showSkip);
}

private function showSkip(e:TimerEvent=null):void
{
timer.stop();
timer.removeEventListener(TimerEvent.TIMER_COMPLET E, showSkip);
ScreenManager.getInstance().activateBackground();
setNext(new Menu());
notifyNextScreen();
removeChild(skip);
}

override public function load():void
{
addChild(clip);
clip.y = -5;
timer.start();
dispatchEvent(new ScreenEvent(ScreenEvent.LOADED));;

var skipButton:SkipButton = new SkipButton();
skip = new Button(skipButton);

skip.x = 440;
skip.y = 377;
skip.buttonMode = true;
skip.setClickedFunction(showSkip);
skip.width = 80;
skip.height = 26;
addScreenObject(skip);

sound = new SoundButton();
sound.x = 531;
sound.y = 372;
sound.width = 23;
sound.height = 26;
addScreenObject(sound);


}
override public function unload():void
{
clip.soundTransform = new SoundTransform(0);
removeChild(clip);
}
override public function update(e:Event):void
{
super.update(e);
}

}

}

Dhavamba
30-05-2012, 10:22
nessuno mi sā rispondere???

Hardware Upgrade Forum Database Error
Database Error Database error
The Hardware Upgrade Forum database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.hwupgrade.it home page, then try to open another page.
  • Click the Back button to try another link.
The www.hwupgrade.it forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.