El problema viene que el ejemplo encontrado tiene las clases metidas en un .as y yo necesito que estén en la linea de tiempo. Mi pregunta es si es posible crear esta distorsión sin importar clases y teniendo todo el código en la linea de tiempo del .fla.
Os dejo el código que encontré, que funciona a las mil maravillas... pero importando

Código ActionScript :
package { import fl.video.FLVPlayback; import fl.video.VideoAlign; import fl.video.VideoEvent; import fl.video.VideoScaleMode; import flash.display.Shape; import flash.display.Sprite; import flash.events.Event; import flash.geom.Point; import jel.com.display.SpriteCenter; import jel.com.effects.DeformSprite; [SWF(backgroundColor="0x000000", frameRate="25")] public class PantallaTv extends SpriteCenter { [Embed(source="assets/imagenes/fondo.png")] private var FondoPantalla:Class; private var video:FLVPlayback; private var pantalla:Sprite; private var pantallaDeformada:DeformSprite; public function PantallaTv() { super(1280, 720); addChild(new FondoPantalla()); pantalla = new Sprite(); var fondoNegro:Shape = new Shape(); fondoNegro.graphics.beginFill(0x000000, 0.0); fondoNegro.graphics.drawRect(0, 0, 739, 410); pantalla.addChild(fondoNegro); video = new FLVPlayback(); with(video) { x = 0; y = 0; autoPlay = true; autoRewind = true; bufferTime = 1.0; source = getUrl("flv/video_1.mp4"); align = VideoAlign.TOP_LEFT; scaleMode = VideoScaleMode.NO_SCALE; skin = null; addEventListener(VideoEvent.COMPLETE, onCompleteFlv); } pantalla.addChild(video); pantallaDeformada = new DeformSprite(pantalla, false, false, 6, 4); pantallaDeformada.smooth = true; pantallaDeformada.transformBezier( new Point(28, 293), new Point(690, 318), new Point(690, 656), new Point(28, 690)); addChild(pantallaDeformada); addEventListener(Event.ENTER_FRAME, onEnterFrameListener); } private function onCompleteFlv(evt:VideoEvent):void { video.play(); } private function onEnterFrameListener(evt:Event):void { pantallaDeformada._sprite = pantalla; pantallaDeformada.render(); } private function getUrl(url:String):String { if (!(url.indexOf(":") > -1 || url.indexOf("/") == 0 || url.indexOf("\\") == 0)) { var rootURL:String; if (root) { rootURL = root.loaderInfo.url; if (rootURL) { var lastIndex: int= Math.max(rootURL.lastIndexOf("\\"), rootURL.lastIndexOf("/")); if (lastIndex != -1) { url = rootURL.substr(0, lastIndex + 1) + url; } } } } return url; } } }
Gracias por la paciencia