is possible call a js function? or post a score on facebook?

perfectskills

  • Posts: 6
hi!!!, my question is if it is possible call a javascript function, like ┬╗function score();┬ź
is because i want to publish it on my website and use var (score) to post it on facebook,
or is another way to post variables in facebook with stencyl?

captaincomic

  • *
  • Posts: 6109
To communicate between Flash and Javascript you need to use the ExternalInterface class in AS3
http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7cb1.html

 

perfectskills

  • Posts: 6
To communicate between Flash and Javascript you need to use the ExternalInterface class in AS3
http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7cb1.html
thanks a Lot!!! i think this will Work!

perfectskills

  • Posts: 6
To communicate between Flash and Javascript you need to use the ExternalInterface class in AS3
http://help.adobe.com/en_US/as3/dev/WS5b3ccc516d4fbf351e63e3d118a9b90204-7cb1.html
But i would Like To know if there is another way to call a external javascript function, may with the code block of stencyl?

Innes

  • *
  • Posts: 1963
You really don't need to make all your text huge! Just type it using the default font - it's much easier to read (unless you have a visual impairment, in which case, the large text is understandable but, in this case, I would recommend using the zoom feature of your browser).
Visit www.TheStencylBook.com - the only published book for learning Stencyl.

perfectskills

  • Posts: 6
You really don't need to make all your text huge! Just type it using the default font - it's much easier to read (unless you have a visual impairment, in which case, the large text is understandable but, in this case, I would recommend using the zoom feature of your browser).
that is the plan, but i need to call a javascript function from stencyl to get a scrore like
var score=parseInt;
function scoreup(){
    score+=5;
    document.getElementsById('scoreid').innerHTML=score;
} then i will only need to pass that variable to PHP and that way i could post it on Facebook but the code (ExternalInterface.call("scoreup");) doesn't work so i need a way to call a function to the people be aailable to post they score. :)