Questions tagged [addcallback]

14 questions
4
votes
3 answers

as3 ExternalInterface.addCallback is not working right

I was trying to access swf from javascript, so this example in livedocs is what I'm trying to modify. http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html#includeExamplesSummary However,it is not working…
shibbydoo
  • 569
  • 4
  • 18
  • 32
3
votes
2 answers

How to create multiple add_callback in tornado?

I'm trying to add multiple callbacks in tornado main loop. But when I run this code: def task(num): print 'task %s' % num if __name__ == '__main__': for i in range(1,5): tornado.ioloop.IOLoop.instance().add_callback(callback=lambda:…
DukeLog
  • 43
  • 1
  • 5
2
votes
1 answer

How do I get this function in ActionScript to return an array to JavaScript using ExternalInterface

I am very new to both JavaScript and ActionScript. I am trying to get javascript to call a function in ActionScript and store the returned array. I have looked everywhere for help and i cant seem to get this to work. My actionscript is below:…
2
votes
2 answers

swfObject causing "Object doesn't support" error in __flash__addCallback function

So, I have been stuck on this problem for some time now and it has caused a lot of frustration. I have found a lot of people over the many forum pages I have scoured who share the same problem but no one who has gave a clear answer as to why is this…
2
votes
0 answers

Many callback buffers for camera preview

I'm working with camera in Android and I'm using preview callback with byte buffer. If I call the function addCallbackBuffer many times, it will add several buffers. In what order will be used added buffers when the catching frame - in order of…
2
votes
1 answer

How can I remove an addCallback?

I have a Flash game which send and receive lot of messages from JavaScript. Sometimes I need to stop listening some of those functions, but ExternalInterface doesn't have a removeCallback function. So I'm doing somthing ugly: using a boolean to…
Breno LarC
  • 104
  • 7
1
vote
1 answer

How can I test @onFailure method?

How could I go to "@Override public void onFailure(Throwable ex) { ... }"? It always go "@Override public void onSuccess(SendResult result) {...}. I want to print log.error("Unable to send…
sujinkim
  • 11
  • 1
1
vote
0 answers

ajaxResponseRenderer.addCallback calling require(javascript) is never executed from ajax call by tapestry 5.4.0, but works fine with 5.3.8

I want to update input to a javascript function using a javascriptcallback. the javascript code in the addInput.js script that is pushed to the client does not get executed when triggered from the onAjaxEvent call, but works fine when called from…
danny
  • 11
  • 2
1
vote
1 answer

getPage inside of deferred object printing?

I'd like to create a callback that does a getPage on a specific url and prints that out when the operation is complete. Currently when I print d or page (see code below), I get a reference to the deferred object vs. the contents of page. Why does…
user1675884
  • 67
  • 1
  • 6
0
votes
1 answer

Using twisted to proxy memcache calls on attribute access '__getattribute__'

I was attempting to trigger twisted memcache calls from getattribute and return values to my objects. Is this possible ? My thinking was that gatherResults waits for the call to succeed or fail and then returns the results - which it does but the…
0
votes
1 answer

add_callback with thread pool, but Exception about "Cannot write() after finish()."

I'm using thread pool while using Tornado to do some work. This is the code: common/thread_pool.py import tornado.ioloop class Worker(threading.Thread): def __init__(self, queue): threading.Thread.__init__(self) self._queue =…
aoyoo
  • 13
  • 3
0
votes
1 answer

Error 2060 occured in Chrome and FireFox but not IE when calling ExternalInterface.addCallBack()

I search almost the internet but not find the solution. I just use ExternalInterface.addCallBack() in AS3, and it throws exception when I loaded this swf by Chrome or FireFox. But it's ok with IE. The code I used( the last example in this AS3…
Zachary
  • 127
  • 1
  • 2
  • 15
0
votes
2 answers

why call flash function from javascript work but FileReference don't work in flash?

I need call flash function from javascript. I use flash.external and addCallback to do this. all things work well but when I use FileReference in my flash, function did not open my browser ... please see below describtion: I call my function in…
Reza Amya
  • 89
  • 1
  • 10
0
votes
2 answers

Referencing problem when adding callbacks to Exernal Interface in Flash/ActionScript3

I have a method: myMethod() {} that I want to make accessible to javascript. I've done a bit of research and found out you need to add a callback to ExernalInterface, so here's what I have done: ExternalInterface.addCallback("invokeMyMethod",…
Matt
  • 5,547
  • 23
  • 82
  • 121