LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

embed flash into labview

Hello,

 

I am trying to embed an flash activeX component inside a labview container.  I am able to load a movie, but I keep recieving an error when trying to use the invoke node with the method CallFunction.  I would like to pass variables between flash and labview, trigger events from flash to labview, and to call a functions from labview to flash.  Any help will be appreciated. 

 

Thank you,

Mike

0 Kudos
Message 1 of 13
(8,744 Views)

Hey!

 

Maybe we can give you some help if you would post or descripe the error you receive.

 

Christian

Message 2 of 13
(8,723 Views)

Hi Christian,

 

try

{

      I have been trying to implement ShockwaveFlashObjects.ShockWaveFlashEvents method FSCommand, but I cant seem to connect it to ShockwaveFlashObjects.IShockWaveFlash , which holds the reference for the activeX container.   

 }

catch

{

     trace( "me wasting time" );

}

 

 

That is one of the problems I am having with debugging, among many when it comes to debugging activeX.  Here is the error message and error number that pops out from the CallFunction invoke node. 

 

-2147467259

Unspecified error
 in flashinteractive.vi

 

Also, this is the actionscript 3.0 I have far

 

//////////////////////////////////////////////////////

import flash.external.*;

 

ExternalInterface.addCallback("thecall1", callMe1);

 

function callMe1():void
{

..............
}

 

//////////////////////////////////////////////////////

 

 

I havent gone for passing variables or going from flash to labview here.  It isnt much yet , but its a start.

thank you again

~Mike

 

 

0 Kudos
Message 3 of 13
(8,700 Views)
Hi Mike,
 
The error you are receiving is an unspecified error and could be due to a number of possible causes. Ensure that you are calling into the ActiveX assembly correctly and referencing your function, and ensure that you are loading the flash SWF file before you attempt to CallFunction. The error is most likely undefined because LabVIEW has encountered an unknown error from the ActiveX control itself, lending me to think that the problem lies in the method used to register callback functions. I have attached a few great articles that include tutorials on how to write actionscript that takes advantage of ActiveX communication. 
 
An example of communication between JavaScript and Adobe Flash Player 
ExternalInterface: SWFs Communicate with the World Around Them
Example: Using the external API with an ActiveX container
Can I Use a Flash Animation Inside of LabVIEW?  
 
In one of the tutorials, there is also a sample flash file that correctly implements ActiveX communication. Try developing a quick LabVIEW example using this sample in order to ensure that you are correctly implementing LabVIEW ActiveX commands to the control. I have also included a link to a KnowlegeBase article that describes the basic procedure to correctly create a container and control on the front panel and load a SWF file for viewing. This is probably information that you already know, but it wouldn't hurt to ensure that you are following the same procedure outlined in this KnowlegeBase.
Asa Kirby
CompactRIO Product Marketing Manager
________________
Sail Fast!
Message 4 of 13
(8,657 Views)

THank you all, I am having much better luck with this now.

 

 

Regards,

Mike

Message 5 of 13
(8,640 Views)

Does anybody have any experience in writing or reading from Flash Variables (V3).

 

I have a Active X control, and can set and read one of the flash variables, but it doesn't reflect in the flash itself, i.e. I can;t see the value change, but I can read it back that it has changed.

 

ADL

0 Kudos
Message 6 of 13
(8,277 Views)

Hi ADL:

 

How are you currently setting the variable and what are you doing to see that the variable has changed?  It would be helpful to see the code you are using in your application.

Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 7 of 13
(8,247 Views)

Hi!

I`ve done a .swf using papervision3d, and try to load it  using ths methods:

http://digital.ni.com/public.nsf/allkb/E1BC3EE77B51781A86256CFA005EDC84?OpenDocument

but it just doesnt loads, the activeX just stay white... 

what can i do?

thnx

0 Kudos
Message 8 of 13
(7,778 Views)

Using the method in your linked document, I came up with the following program:

flash screenshot.png

 Try running this and let us know what happens.  The problem could potentially be with your flash file as well.  Post it if you want me to test it.

Message Edited by A Person on 07-27-2009 11:36 AM
Alex Person
NI-RIO Product Support Engineer
National Instruments
0 Kudos
Message 9 of 13
(7,735 Views)

Thanks for your answer.

Thats exactly what I did.

Try with others ".swf" but only recognizes the ones made in AS2.

Here  are my files.

0 Kudos
Message 10 of 13
(7,730 Views)