Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/07/2010, 08:25
Avatar de buhomorado
buhomorado
 
Fecha de Ingreso: enero-2005
Mensajes: 324
Antigüedad: 19 años, 3 meses
Puntos: 1
Por que fscommand en AS 3, alenta los gráficos y funciona con ERRORES!

Hola amigos de forosdelweb.
Tengo este código en el Frame 1 de mi película principal:

Código:
import flash.system.fscommand;
import gs.*;

fscommand("fullscreen", "true");
fscommand("allowscale", "false");

flabody.x = flabody.y = 30;
titulos.x = 2480;

var cargaGal:Loader = new Loader;
var cualGal:URLRequest = new URLRequest("swf/GALERIA_.swf");
cargaGal.load(cualGal);
addChild(cargaGal);

trace (cargaGal.x);
cargaGal.y = -1468;

var coraje:String;
var dondeestamos:String = "inicio";

magicbox.gotoAndPlay (2);

stop();

Tengo en mi escenario una instancia de un VIDEOPLAYER AS 3 que baje por ahí, con sig. código:
[CODE]



--- Ese si lo baje.

Ademas tengo este SoundPlayer, que importa una clase externa llamada Sonido.as, que también baje:
Es un MovieClip con 2 Fotogramas, al cual yo le agregue un tercero, por que quería que cuando le dieras clic al video se callara el loop de fondo, y al cambiar de escena volviera a "tocar". Más me encontre con el problema de que el usuario podría querer apagar de por vida el sonido y por eso creé un tercer fotograma.

EN este Clip que controla el sonido,


///////////////fotograma 1:::::::::::::::::::::::::::::

Código:
import flash.media.SoundMixer;

import Sonido;
var so:Sonido=new Sonido("musica.mp3",3,0,-1);

MovieClip(this.root).coraje="ruido"



function siguiente(e:MouseEvent):void {
	gotoAndStop(3);
}

suena.addEventListener(MouseEvent.CLICK, siguiente);

stop();
///////////// fotograma 2:::::::::::::::::::::::::::::::::::

Código:
import flash.media.SoundMixer;

import Sonido;
var so:Sonido=new Sonido("musica.mp3",3,0,-1);

MovieClip(this.root).coraje="ruido"



function siguiente(e:MouseEvent):void {
	gotoAndStop(3);
}

suena.addEventListener(MouseEvent.CLICK, siguiente);

stop();
////// fotograma 3::::::::::::::::::::::::::::::::::::::

Código:
import flash.media.SoundMixer;

import Sonido;
var so:Sonido=new Sonido("musica.mp3",3,0,-1);

MovieClip(this.root).coraje="ruido"



function siguiente(e:MouseEvent):void {
	gotoAndStop(3);
}

suena.addEventListener(MouseEvent.CLICK, siguiente);

stop();
///////


Y arriba tengo un Menu con 5 botones, cada uno de los cuales posee el sig. código:

Código:
import gs.*;
import gs.easing.*;
import caurina.transitions.*;
import caurina.transitions.properties.DisplayShortcuts;
DisplayShortcuts.init();

stop();

useHandCursor= true;
buttonMode=true;

gis.addEventListener (MouseEvent.CLICK, ira);
gis.addEventListener (MouseEvent.MOUSE_OVER, sobre);
gis.addEventListener (MouseEvent.MOUSE_OUT, fuera);

function sobre (evt:MouseEvent):void {
	Tweener.
	addTween(this,{_frame:15, time:0.5, transition:"linear"}
		 )
	}
	
function fuera (evt:MouseEvent):void {
	Tweener.addTween(this,{_frame:0, time:0.5, transition:"linear"}
		 )
	}


function ira(evt:MouseEvent):void{
	if( MovieClip (this.root).coraje != "silencio"){
		MovieClip(this.root).menuazul.rey.pie.soneto.gotoAndStop(1);
		}
		/// Detiene Video
	
	MovieClip(this.root).magicbox.nsStream.pause();
    MovieClip(this.root).magicbox.nsStream.seek(0);
	MovieClip(this.root).magicbox.vidDisplay.visible = false;
    
	MovieClip(this.root).magicbox.mcVideoControls.btnPause.visible = false;
	MovieClip(this.root).magicbox.mcVideoControls.btnPlay.visible = true;
	
	/////
	MovieClip(this.root).magicbox.gotoAndPlay(2);
    MovieClip(root).dondeestamos = "porquepublirey";
	trace (    "A ver que" + MovieClip(root).dondeestamos );
	TweenMax.to(MovieClip(this.parent.parent).cargaGal, 1.5,{y: -1768});
	TweenMax.to(MovieClip(this.parent).marillo, 1.5,{x: 184, width:180});
	TweenMax.to ( MovieClip(parent).tito.tirilla, 0.6, {y:-46.5});
	TweenMax.to(MovieClip(parent.parent).flabody, 4.5, {x:-2078, ease:Elastic.easeOut});
	
			TweenMax.to (MovieClip(this.root).magicbox , 2.45, {y:105, delay:1.9, ease:Elastic.easeOut});
	
	TweenMax.to(MovieClip(this.parent), 2.5, {y:690, delay:0.3, ease:Elastic.easeInOut});
			TweenMax.to(MovieClip(this.parent).rey, 1.5, {y:5.5, ease:Elastic.easeInOut});
	TweenMax.to(MovieClip(this.parent.parent).titulos, 1.5, {x:650, delay:0.7, ease:Bounce.easeIn});
	
		TweenMax.to(MovieClip(this.parent.parent).titulos.vid_inicio,0.37, {alpha:0});
	TweenMax.to(MovieClip(this.parent.parent).titulos.vid_porquepublirey,0.37, {alpha:0});
	TweenMax.to(MovieClip(this.parent.parent).titulos.vid_servicios,0.37, {alpha:0});
	TweenMax.to(MovieClip(this.parent.parent).titulos.vid_ubicaciones,0.37, {alpha:0});

	}


EN RESUMEN, TODO FUNCIONA A LA PERFECCION EN EL FLASH PLAYER, PERO SOLAMENTE LO MANDO AL PROYECTOR Y ME HACE UN FIASCO... TODO SE ALENTA, NO FUNCIONAN LOS VIDEOS, EL SONIDO SE CORTA TODO HORRRIBLE ETC ETC...

PROBE EXPORTANDO A PROYECTOR SIN EL COMANDO "FULLSCREEN" Y ME DOY CUENTA DEQUE FUNCIONA PERFECTO....

ES EL MALDITO CODIGO PRINCIPAL QUE AQUI REPITO:



Código:
import flash.system.fscommand; ////// ESTE JODIDO CODIGO CAUSA ERROR
import gs.*;   /// ESTE No, NOMAS ANDO IMPORTANDO TweenMax

fscommand("fullscreen", "true");  ///// ESTE JODIDO FULLSCREEN ME PATEA LAS BOLAS
fscommand("allowscale", "false");  ///// Y ESTE OTRO KE SE VAYA A LA "(/"#$()#



//////////// DIOS SALVE A ACTIONSCRIPT 3, TODO ESTO SE VE BIEN SIN LAS P)")##)#))= DE ARRRIBA....
flabody.x = flabody.y = 30;
titulos.x = 2480;

var cargaGal:Loader = new Loader;
var cualGal:URLRequest = new URLRequest("swf/GALERIA_.swf");
cargaGal.load(cualGal);
addChild(cargaGal);

trace (cargaGal.x);
cargaGal.y = -1468;

var coraje:String;
var dondeestamos:String = "inicio";

magicbox.gotoAndPlay (2);

stop();

Y PARA LOS OPTIMISTAS, ME TEMO QUE NO, NO SEÑORES, la SOLUCION NO HA SIDO REEMPLAZAR ESE ESCUATO PALABRERIO COMANDERO POR ESTE OTRO PEDAZO DE CÓDIGO:

Código:
import flash.display.Stage;
import flash.display.StageDisplayState;
import flash.display.StageScaleMode;

stage.scaleMode = StageScaleMode.NO_SCALE;
stage.displayState = StageDisplayState.FULL_SCREEN;
POR QUE PASA EXACTITO LA MISMA "#U(//$())!".

GRACIAS CABALLEROS POR SU ATENCIÓN.