HTML/javascript interaction with swf content - can I call swf functions from JS?
Hi,
I've created an AIR application where the
intialWindow.content is a HTML page / JavaScript application. On
this HTML page I want to include some SWF content as a plugin (a
Flex 3 app), so I have an object tag.
From my SWF I can call out to JavaScript using
flash.external.ExternalInterface fine. I can also call methods
within the AIR and Flex APIs via the window or runtime objects.
However, if I try to call methods within my SWF from
JavaScript, nothing happens. Further, I can pass a function
reference from my SWF to JavaScript (via ExternalInterface), and
while I can see a valid function reference in JavaScript, calling
it doesn't call the function within the SWF.
Is this not supported? Or is this something else, like an
applicationDomain issue? My SWF object is loaded via the app:/ uri,
so I didn't think it would be that.
I hadn't tried that, and it does work. Thank you. Everyone
should note though that the documentation here
Flex
3 - External Interface
and
Flash
9 - ExternalInterface.html
says:
"Note: Adobe AIR currently does not support the
ExternalInterface class."
which by my reading means that none of this should work,
although it clearly does.
The page
Example:
Using the external API with a web page container was most
helpful in finding the solution, since it mentions referencing the
object id of the plugin (e.g.
window['my-object-id'].functionToCall()) when referencing the
callback function.
This
page has a more concise example.
Similar Messages
-
I have a function from a dll that return a double* string and an integer. How can I call this function from LabVIEW? There is a possibility to work in LabVIEW with a double* string?
pcbv wrote:
> Hello all,<br><br>The header of the function is:
>
> "HRESULT WRAPIEnumerateDevices(WRAPI_NDIS_DEVICE **ppDeviceList, long *plItems);"
>
> where WRAPI_NDIS_DEVICE have this form:
>
> typedef struct WRAPI_NDIS_DEVICE<br>{<br>
> WCHAR *pDeviceName;<br>
> WCHAR *pDeviceDescription;<br><br>}
> WRAPI_NDIS_DEVICE;<br><br>
>
> The function is from WRAPI.dll, used for communication with wireless card.
> For my application I need to call in LabVIEW this function.
Two difficulties I can see with this.
First the application seems to allocate the array of references
internally and return a pointer to that array. In that case there must
be another function which then deallocates that array again.
Then you would need to setup the function call to have a pointer to an
int32 number for the deviceList parameter and another pointer to int32
one for the plItems parameter.
Then create another function in your DLL similar to this:
HRESULT WRAPIEnumExtractDevice(WRAPI_NDIS_DEVICE *lpDeviceList, long i,
CHAR lpszDeviceName, LONG lenDeviceName,
CHAR lpszDeviceDesc, LONG lenDeviceDesc)
if (!lpDeviceList)
return ERROR_INV_PARAMETER;
if (lpDeviceList[i].pDeviceName)
WideCharToMultiByte(CP_ACP, 0,
pDeviceList[i].pDeviceName, -1,
lpszDeviceName, lenDeviceName,
NULL, NULL);
if (lpDeviceList[i].pDeviceName)
WideCharToMultiByte(CP_ACP, 0,
pDeviceList[i].pDeviceDescription, -1,
lpszDeviceDesc, lenDeviceDesc,
NULL, NULL);
return NO_ERROR;
Pass the int32 you got from the first parameter of the previous call as
a simple int32 passed by value to this function (and make sure you don't
call this function with a higher index than (plItems - 1) returned from
the first function.
Rolf Kalbermatter
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
Can LabVIEW call a function from a .sys file or is LabVIEW limited to dll access?
My vendor has sent me a .sys file with functions accessing their hardware. Can i call these function from labview directly or do I have to wrapper the .sys with a dll?
Well a sys file is a kernel device driver. LabVIEW does not have any direct way of accessing such a driver. The way kernel drivers are accessed is usually through a DLL which makes calls to WinAPI functions such as CreateFile(), ReadFile(), WriteFile(), CloseHandle() and DeviceIORequest(). Since these WinAPI calls are basically just DLL calls too, you could theoretically use the Call Library Node to call them and access the kernel device driver in such a way.
However for any kernel device driver with more than one or two device driver calls, it will certainly be easier in terms of development, debugging and maintenance of the code, to write actually a dedicated DLL in C/C++ for this device driver and access that DLL from LabVIEW, especially if you consider the LabVIEW datatype limitations when designing the DLL interface (Basically this same DLL can then be called from any other Windows development environment, be it Visual Basic (similar datatype limitation as LabVIEW), Delphi, (Visual) C, LabVIEW or also various scripting environments like Python and Lua.
Some of the necessary WindAPI calls are rather involved and pose quite a bit of trouble to get the parameter data right in LabVIEw.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
How can I call a function from a procedure
I have a function named: f_calc_value which return the variable v_result. This function is part of a package.
How can I call this function from a new procedure I am creating?
Thanksor refer this theread....calling function from procedure
-
How can we call actionscript functions from js
hi
how can we call Action script function from js file . i
tried ExternalInterface. add Callback() .but it throws an error .is
there any other chance to call action script method .thnx in
advanceangadala,
some people have found it is good to include the full
qualification path, ie
if (flash.external.ExternalInterface.available)
flash.external.ExternalInterface.addCallback("ext_method_name",int_method_name);
} // if (flash.external.ExternalInterface.available)
There are also browser differences which affect how you find
the Flex application object which are documented at
http://www.adobe.com/livedocs/flex/3/html/help.html?content=passingarguments_5.html
Richard -
Can I call a "function" from a servlet?
A few of my servlets need to perform about the same computations (have large sections of identical code).
It would save some disk space to be able to call a procedure from different servlets.
Can this be done? How?
Thank you all.A few of my servlets need to perform about the same
computations (have large sections of identical code).
It would save some disk space to be able to call a
procedure from different servlets.
Can this be done? How?This wouldn't be the way to do it.
Since Java is an object oriented programming language, you should use it's concepts to implement a 'basic' class and than extend it. This means: Create a class that contains the basic procedures (you will never create an instance of this class) and then create all the serlvet classes by extending the 'mother' class. Like this you have the common code once in the 'mother' class and the specific code in the specific servlets. -
How can i call my function from a procedure?
My function is:
create or replace FUNCTION test(pAttributeName IN NUMBER)
RETURN VARCHAR2 IS
ret VARCHAR2(100) := NULL;
VAR n1 NUMBER
BEGIN
SELECT Klartext INTO ret FROM piclist WHERE ATTRIBUTNAME = 'voltage_level' and PICLIST_ID =pAttributeName;
RETURN ret;
Insert into BM_ATTRIB(ID_ERFASSUNG,ID_ATTRIBNAME,ATTRIB_CHA,BM_ATTRIB_ID) VALUES(1,1,ret,1);
exception
when no_data_found then
ret := 'AAA' ------- you can return any default value,if you like
--return ret;
return NULL;
when others then
dbms_output.put_line('Exception:'||sqlerrm);
End;
I want to call it from a procedure!
Please help!
Nicoleif the function is in the same package as the procedure then merely specify the function name and parameters:
retcode := functionname(param1..paramn);
If in another package then:
retcode := packagename.functionname(param1..paramn);
If the function is in another schema then you need to grant execute rights to the package/function to the schema trying to run the function:
grant execute on packagename/functionname to otherschema;
you need to be the package/function schema owner to do the above grant. -
Can't interact with any open windows, can't interact with flash content
I've already tried reinstalling, resetting and deleting my profile, nothing's changed.
I can't close any Firefox window by pressing "x", or by pressing Alt+F4, I can only close it through the task manager or task bar. Minimising or going into windowed mode is also impossible.
If a new window opens itself (e.g. A download) I can't interact with it at all - It's visible on top of the main window, but nothing I do affects it.
I also can't interact with flash content (like pausing a youtube video)
There is absolutely no feedback when I try. The icon doesn't change.
I recently reset firefox, there are no add-ons, themes etc. installed, the problem persists.
I am running Windows 7 64bit, everything else (including other browsers) appears to be working fine and a virus scan (Avast! free version) turned up nothing.
I'd really appreciate any help!Hello,
'''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
''(If you're not using it, switch to the Default theme.)''
* You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
* Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
''Once you get the pop-up, just select "'Start in Safe Mode"''
'''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''
Thank you. -
API for interacting with the Content Server (formerly Stellent) repository.
Is there any API out there that can be used to interact with the Content Server (formerly Stellent) repository? Where can I find the documentation?
Hi Chris,
I have downloaded CIS v8.0 to communicate with the UCM 10gR3 installed on a remote machine. I am able to search but whenever I try to checkin / checkout it throws a ClassCastException.
I would like to know if you have any info on this. and I am working with Java.
regards
Ravi. -
If i got an iphone 5 and synced it with my computer,
can i get the contract from my iphone 4 to a iphone 5 without upgrading the contract?
(So that i will still have the same contract) (I have verizon.)Ask Verizon.
You will have to activate the phone through them. -
Can we call a Function Module with in a loop
Hi,
Can we call a Function Module within a loop . Does it reduces the performance.
Can you please guide regarding this.
With Best Regards
Mamatha.hi Mamatha,
You can call .. but it is better to avoid calling it within a loop...
Loop at it_tab.
call function 'CONVERSION_EXIT_ALPHA_INPUT'
exporting
input = it_tab-vbeln.
importing
output = it_tab-vbeln.
endloop.
Regards,
Santosh
Message was edited by:
Santosh Kumar Patha -
i ave an ipad 2 with wifi only, can i get internet access from any cell phone, or do i need a specific phone or type of phone
I received an iPad 2 for Christmas (the 1st Apple item I've ever owned!) and own a Nokia N95 8GB mobile (that's pretty much on its last legs/ready to die any day).
On the Nokia I've got 2 apps (downloaded from/via Nokia's 'Ovi' app store): JoikuSpot & HandyWi. Both are the free versions.
I've not used HandyWi much - if at all - but JoikuSpot has been great. Basically, it creates a wifi hotspot (as pjl123 mentioned) in a couple of straightforward steps, and allows a few devices to be connected. It displays who/what is connected at a given time - so you can check if the guy having coffee behind you is piggybacking your hotspot or not! - data packets sent received etc.
The paid version has the benefit of allowing you to secure the hotspot and other security features. Their website is www.joiku.com, FYI.
Given how slow behind the 8 ball Nokia has been, their phones are getting cheaper and cheaper - given Joiku's meant to work with Nokia S60, Symbian ^3, Maemo, Meego & Sony Ericsson S60, this might be a cost effective option.
Ps. Ah! One more thing - Joiku's website specifies that 3G must be used; that WAP will not work. Good luck, enjoy! -
Can I call a function with an arguement of %ROWTYPE directly from SQL?
I have the following function in a 10g DB:
CREATE OR REPLACE FUNCTION f_is_eligible2 (in_dm_row IN amplify_dm%ROWTYPE)
RETURN NUMBER
IS
I know I can call that function from another pl/sql function but I'm wondering if I can call that function directly from a SQL statement, something like this:
SELECT f_is_eligible2(dm.*)
FROM amplify_dm dm
or
SELECT f_is_eligible2(dm%rowtype)
FROM amplify_dm dm
neither of those worked so I'm thinking it's not possible but I thought I'd ask anyway.
Thanks in advance!Not possible as said - but - based on what I'm seeing - you could simply pass the parameter(s) that are key on that table and - accomplish the same thing by modifying the function.
not sure why you'd need the whole row if I'm interpretting the code excerpt. -
Call Actionscript function from Javascript
Can anyone show me a simple example of calling an
actionscript function from within javascript? Everything I have
found searching online refers to using the ExternalInterface but I
was sure I also read that Adobe Air does not support it. I am
currently using htmlloader to load a html page containing
javascript into an <mx:HTML>. But I cant seem to touch the
actionscript functions from within javascript. I am specifically
trying to work with the FCKeditor that I have integrated so if
anyone has any examples other methods of integrating the editor I
would love to see them as well.
Thanks!Let's assume u have embeded swf object named "flashObj"
<embed src="MYSWF.swf" quality="high"
width="100%" height="100%" name="flashObj"
play="true"
loop="false"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="
http://www.adobe.com/go/getflashplayer">
</embed>
On each time onblur is called it invoke AS function
myActionScriptFn
window.onblur = function() {
if(flashObj != null){
flashObj.myActionScriptFn(navigator.appName);
You need to add a listener in Action Script code
ExternalInterface.addCallback("myActionScriptFn",
myActionScriptFn);
public function myActionScriptFn(appName:String):void
// Any code here
Regards -
Can we call a function module in ADHOC query
Hi
Can we call a function module in ADHOC query if yes how.
Also we ned to know how to call a function module in SAP query.
An early responce is appreciated.
Thanks and best regards
RajeevOkay as far as I understand your aim is:
To fill a field in the output list with a value that is based on the current line information and calculated by a function module
So go to SQ02 and create an additional field in the InfoSet.
You can refer in the coding to the technical names you can see in the left tree window like P0000-PERNR.
More information is avaiable in the Help part look for additional field in SQ02.
Regards,
Michael
Maybe you are looking for
-
VDI 3.4 Inegrate with Windows Server 2008 R2 Active Directory
OK,I follow the official documents step by step,I installed the vdi 3.4 in Oracle Linux 5.7(oraclevdi.jiayutester.com),then installed a window server 2008 r2 64bit(jiayudc.jiayutester.com) that made it to be the Domain Controller(jiayutester.com) and
-
Hi, I have a set of tables that are in multi level hierarchy. Here is the example. Table1 (id is primary key) Table2 (id,loc is primary key. and id is refering to table1.id) Table3(id,name is primary key and id is refering to table1) Table 4(emp_id,g
-
I want to recover a previous iphone backup data
I backed up my data from my iPhone on my Macbook Pro, and accidentaly synced it again, which over-wrote the previous back up. And now I need my original back up as it contains all my data. How can i recover data from my previous back-up? Please Help!
-
Reporting: using operators with relative selection
Dear all, i am facing an problem when trying to create a certain report. The requirement is to gather all opportunities for which the sales phase has started more than 1 month ago. Phase start date is a characteristic you can use using data sources f
-
Iinstalled lated version of flash player, but it des not show as active
I installed lates version ov flash paler but it is not active(keeps saying not there