Windows iTOps Tube

Monday, May 14, 2012

Open pdf in reader, not in the browser as3

Greetings, I have the following...

It is a game, interactive cd (opens in full screen)

First think a class .as called Callback...there I have this code:

code:

package{

public class Callback{

public static function create(handler:Function,...args):Function{

return function(...innerArgs):void{
handler.apply(this,innerArgs.concat(args));
}

}
}
}


Then in my file flash I have this code:

code:

import Callback;
function abrirPDF(e:MouseEvent,RUTA:String){
navigateToURL(new URLRequest(RUTA))
}
abrirpdf_btn.addEventListener(MouseEvent.CLICK,Callback.create(abrirPDF,"EncuestaNacionaldeNiniezODNNA.pdf"));


But when I do the executable, and give click, I open the browser...QUE PASA?

Help with that by fa...

Thanks......

Topic Replies: 0



0 comments:

Post a Comment