Re: [flexcoders] SWC class like Main Class in Flash CS4

2010-03-24 Thread David Serrano
The idea is to create a SWC with all classes and give the FLA to change the
visual appearance. For this reason I need the main class must be in a
library, so a designer simply adapts the graphical aspect. Is there another
way to do this?

Regards,

David

2010/3/24 Oleg Sivokon 

>
>
> What's the point of recompiling the SWC in this way? Why not just extract
> the SWF from it?
>
> Best.
>
> Oleg
>
>  
>


[flexcoders] SWC class like Main Class in Flash CS4

2010-03-24 Thread David Serrano
Hi, I have a problem using a SWC library in Flash CS4 IDE. The problem is I
need to use a class inside SWC like Main Class of a fla file. Is it
possible?
The only workaround I have found is create a class that extends one of my
SWC classes. With this, the flash compiles perfectly, but if I change to one
SWC file  directly, the compiler doesn't find the class. Anybody has done it
anytime?

Thanks,

David


[flexcoders] Strange Issue with Loader

2008-04-18 Thread David Serrano
Hello, I have a strange problem with a external swf file loaded with Loader
Class. The problem is that the buttons inside of the swf don't work (no
click, no rollover..), however if I test it in local environment, it works
perfectly. In addition, if I start Charles or Service captures, the swf
works perfectly on the web.

I think it would be SandBox trouble, but I don't understand why with a HTTP
sniffer, It works always.

I post a piece of code:

public function load(skin:String):void
{
var request:URLRequest = new URLRequest(skin);

loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,
ioError);

loader.contentLoaderInfo.addEventListener(Event.COMPLETE,completeHandler);
try {
loader.load(request);
}catch (error:SecurityError) {
trace(error);
}
}

private function completeHandler(event:Event):void
{
skin_content = MovieClip ( loader.content );
this.addChild(skin_content);
this.loadButtons();
this.registerEvents();
dispatchEvent(new
SkinEvent(SkinEvent.SKIN_EVENT,SkinEvent.SKIN_LOADED,null));

}

 public function registerEvents():void
{

this.play_button.addEventListener(MouseEvent.CLICK,playButtonHandler);

this.pause_button.addEventListener(MouseEvent.CLICK,pauseButtonHandler);

this.stop_button.addEventListener(MouseEvent.CLICK,stopButtonHandler);
this.seek_handle.addEventListener(MouseEvent.MOUSE_DOWN,
seekDownHandler);

this.mute_button.addEventListener(MouseEvent.CLICK,setMuteHandler);
}


I ve tried to load with a  loader.load(request,new
LoaderContext(false,ApplicationDomain.currentDomain)); but with the same
result.

If you want see it online, see http://www.canalculturatv.cat/. Is the player
controlbar. No button works. With Charles or Service Capture started, it
runs.