How to integrate a .abc file into swf by using mxmlc?
Enviroment: CrossBridge1.0.1, Flex SDK 4.6
I use g++ to compile 2 .cc files (the c2as wrapper) & a .a file (the logic) into a .swc file; then use this .swc as a library for mxmlc to compile the main .as file.
The Makefile is as follows:
"$(FLASCC)/usr/bin/g++" $(BASE_CFLAGS) -O4 -L. main.cc test_as3.cc -lmytest -emit-swc=sample.mytest -o mytest.swc
"$(FLEX)/bin/mxmlc" -static-link-runtime-shared-libraries -library-path=mytest.swc -debug=false MainView.as -o test.swf
everything is ok.
But when I add some function calls in .as file, it uses the CModule package:
in MainView.as:
import com.adobe.flascc.CModule;
CModule.malloc
CModule.writeBytes
CModule.free
the mxmlc complains that
Access of undefined property, CModule.malloc,
Access of undefined property, CModule.writeBytes,
Access of undefined property, CModule.free
Definition com.adobe.flascc:CModule could not be found.
I found the CModule.abc in sdk/usr/lib folder, and I explored that it do have those functions. but how to import this .abc package into .swf ?
the follow command doesn't work:
"$(FLEX)/bin/mxmlc" -static-link-runtime-shared-libraries -library-path=mytest.swc -import CModule.abc -debug=false MainView.as -o test.swf
First, you should check out the new version at CrossBridge — CrossBridge
1.0.1 is quite old.
For your problem, you don't need to compile Cmodule.abc into your swf, it is already present into your SWC file. Here is the reason why your import is not working.
When you compile directly to SWF with crossbridge, the compiler put all the crossbridge stuff (CModule included) into the com.adobe.flascc namespace.
The problem is that, when you build a SWC, there is no garantee that your end application won't include multiple SWC compiled by crossbridge. To prevent namespace clashing, (having multiple Cmodule under the same namespace), all the stuff in the SWC is namespace with the namespace you gave after the -emit-swc command. In this particular case "-emit-swc=sample.mytest" your namespace is "sample.mytest".
So you need yo change the import from :
import com.adobe.flascc.CModule;
to
import sample.mytest.CModule;
and it should work.
More detail in the documentation : http://crossbridge.io/docs/Reference.html#section_gcc
Building SWCs
A SWC is the Flash Runtime equivalent of a shared library. You can link a SWC into a pure ActionScript project either with an IDE (Flash Builder, for example), or via the command-line ActionScript compiler (named mxmlc). A SWC contains the compiled ActionScript bytecode, along with an API catalog so that Flash Builder can perform code hinting while a developer writes ActionScript that uses the API exposed by a SWC.
When you generate a SWC you must specify an AS3 package name to contain the generated code, and the internal Crossbridge boilerplate code. This lets you link multiple Crossbridge-generated SWCs into one SWF without any function or class collisions. Anywhere you would have previously seen a name starting with com.adobe.flascc this namespace will be replaced with the string passed in the gcc/g++ -emit-swc=... argument.
-emit-swc=
Emits a SWC that can be linked into a Flash Builder project or distributed for others to link into their own projects. You must specify the namespace that you want to use to replace the default com.adobe.flascc namespace, this lets you link multiple Crossbridge-generated SWCs into a single project.
Similar Messages
-
How to load a XML file into a table using PL/SQL
Hi Guru,
I have a requirement, that i have to create a procedure or a package in PL/SQL to load XML file into a table.
How we can achive this.ODI_NewUser wrote:
Hi Guru,
I have a requirement, that i have to create a procedure or a package in PL/SQL to load XML file into a table.
How we can achive this.
Not a perfectly framed question. How do you want to load the XML file? Hoping you want to parse the xml file and load it into a table you can do this.
This is the xml file
karthick% cat emp_details.xml
<?xml version="1.0"?>
<ROWSET>
<ROW>
<EMPNO>7782</EMPNO>
<ENAME>CLARK</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>09-JUN-1981</HIREDATE>
<SAL>2450</SAL>
<COM>0</COM>
<DEPTNO>10</DEPTNO>
</ROW>
<ROW>
<EMPNO>7839</EMPNO>
<ENAME>KING</ENAME>
<JOB>PRESIDENT</JOB>
<HIREDATE>17-NOV-1981</HIREDATE>
<SAL>5000</SAL>
<COM>0</COM>
<DEPTNO>10</DEPTNO>
</ROW>
</ROWSET>
You can write a query like this.
SQL> select *
2 from xmltable
3 (
4 '/ROWSET/ROW' passing xmltype
5 (
6 bfilename('SDAARBORDIRLOG', 'emp_details.xml')
7 , nls_charset_id('AL32UTF8')
8 )
9 columns empno number path 'EMPNO'
10 , ename varchar2(6) path 'ENAME'
11 , job varchar2(9) path 'JOB'
12 , mgr number path 'MGR'
13 , hiredate varchar2(20)path 'HIREDATE'
14 , sal number path 'SAL'
15 , com number path 'COM'
16 , deptno number path 'DEPTNO'
17 );
EMPNO ENAME JOB MGR HIREDATE SAL COM DEPTNO
7782 CLARK MANAGER 7839 09-JUN-1981 2450 0 10
7839 KING PRESIDENT 17-NOV-1981 5000 0 10
SQL> -
How to convert the TEXT file into an XML using plsql code
Hi all ,
I need to convert an TEXT file into an XML file how can i do it
Below is my sample TEXT file .
TDETL00000000020000000000000120131021115854ST2225SKU77598059 0023-000000010000
I want the above to be converted into the below format
<?xml version="1.0" encoding="UTF-8"?>
<txt2xml>
<!-- Processor splits text into lines -->
<processor type="RegexDelimited">
<regex>\n</regex>
<!--
This is used to specify that a message should be created per line in
the incoming file;
NOTE: this was designed to work with all the processors, however it
only works correctly with 'RegexDelimited' processors (check the
enclosing top processor type)
-->
<maxIterationsPerMsg>1</maxIterationsPerMsg>
<!-- For lines beginning with FHEAD (File Header) -->
<processor type="RegexMatch">
<element>FHEAD</element>
<regex>^FHEAD(.*)</regex>
<processor type="RegexMatch">
<element>OriginalLine</element>
<regex>(.*)</regex>
<consumeMatchedChars>false</consumeMatchedChars>
</processor>
<processor type="RegexMatch">
<element>LineSeq,Type,Date</element>
<regex>^(\d{10})(\w{4})(\d{14})$</regex>
</processor>
</processor>
<!-- For lines beginning with TDETL (Transaction Details) -->
<processor type="RegexMatch">
<element>TDETL</element>
<regex>^TDETL(.*)</regex>
<processor type="RegexMatch">
<element>OriginalLine</element>
<regex>(.*)</regex>
<consumeMatchedChars>false</consumeMatchedChars>
</processor>
<processor type="RegexMatch">
<element>LineSeq,TransControlNumber,TransDate,LocationType,Location,ItemType,Item,UPCSupplement,InventoryStatus,AdjustReason,AdjustSign,AdjustQty</element>
<regex>^(\d{10})(\d{14})(\d{14})(\w{2})(\d{4})(\w{3})([\w ]{13})([\w ]{5})(\d{2})(\d{2})([+-]{1})(\d{12})$</regex>
</processor>
</processor>
<!-- For lines beginning with FTAIL (File Tail) -->
<processor type="RegexMatch">
<element>FTAIL</element>
<regex>^FTAIL(.*)</regex>
<processor type="RegexMatch">
<element>OriginalLine</element>
<regex>(.*)</regex>
<consumeMatchedChars>false</consumeMatchedChars>
</processor>
<processor type="RegexMatch">
<element>LineSeq,TransCount</element>
<regex>^(\d{10})(\d{6})$</regex>
</processor>
</processor>
</processor>
</txt2xml>
ThanksSorry, that doesn't make much sense.
The XML you gave is a configuration file for txt2xml utility. It doesn't represent the output format.
Are you a user of this utility? -
How can i convert ppt file into a keynote using windows 7 ?
can i change a powerpoint file into a keynote file on my labtop using my windows 7 ?? if yes can i send it to someone who has mac OS and will it work well with him?
No, he'll download it as a PPT. Keynote can then open the PPT file, and he can choose to convert to the Keynote format once its open.
Keynote: Supported file formats - Apple Support
All he'll need to do is save it. -
How do i get .mov files into imovie? using jvc everio - help!
just purchased a jvc everio hard disk camcorder. i thought it would be easy to import the videos into imovie (but i have never used it before). needless to say it won't recognize the format. the formats say .mov & .moi (i think one is video and one is audio? maybe not). is there any way to import these files into imovie version 5??? sorry by the way if this has been answered before. the volume of questions on this forum is staggering. thanks in advance!!!
welcome sneakypablo to the boards of discussions...
no, iM does NOT support harddisk camcorders (yet), it is meant by concept to work with firewire connected miniDV cameras.. which use "dv" as codec...
.mov is just a container, but I guess, inside is some kind of mpeg...
Apple mpeg2 plugin (29$) + Streamclip (free) allows conversion of mpeg2 into something editable...
final hint: upper right, "search" field .. ;)) -
How to load a flat file into BW-BPS using Web Browser
Hello, i have a problem with the "How to do Paper". I want to upload a Excel CSV file , but the paper only describes a txt file Uplaod. Does anybody can help me ?Thanks !
You need to parse the line coming in from the flat file...
You can do this with generic types in your flat file structure (string).
Then you loop through the table of strings that is your flat file and parse the string so that it breaks up the line for each comma. There is an ABAP command called: SPLIT - syntax is as follows:
SPLIT dobj AT sep INTO
{ {result1 result2 ...} | {TABLE result_tab} }
[IN {BYTE|CHARACTER} MODE].
Regards,
Zane -
How to Load a Flat File into BW-BPS Using a Web Browser
Hello,
I'm using the upload functionality described in the how to guide.
When we want to have this functionality available for 12 different Planning levels. Do I have to create the Web Interface (as described in the how to guide) for each Planning Level separately, or can i pass a parameter in the URL (wenn calling the File Upload functionality) to determine which Planning level and Function it is.
This pice of coding i want to have a bit more flexible
*Execute planning function
CALL FUNCTION 'API_SEMBPS_FUNCTION_EXECUTE'
EXPORTING
i_area = 'ZIPM0001' " <<<< ADJUST
i_plevel = 'ZCAPB006' " <<<< ADJUST
i_package = '0-ADHOC' " <<<< ADJUST
i_function = 'ZEX00001' " <<<< ADJUST
i_param = 'Z0000001' " <<<< ADJUST
IMPORTING
e_subrc = l_subrc
TABLES
etk_return = lt_bapiret.
Does someone have an idea ?
Thank you
DieterHi Dieter,
you should be able to grab the variable value by the following statement (e.g. in this case 'area' is being passed along, works for whatever you want to send) is:
data: l_area type upc_y_area.
l_area = request->get_form_field( 'area' ).
in this case the calling URL looks like:
<normal URL>?area=example_area
example_area will then contain your value.
Then depending on the value execute your different SEM functions
Note that if you want to load different flatfile formats, more has to change in the functions as indicated in the white paper,
Hope it helps,
Regards,
MArc
I got it from the following document I found on SAPNet or SDN (forgot..) some time back:
How To Call a BPS Web Interface with Predefined Selections -
<?xml version="1.0" standalone="yes"?>
<Student_Details>
<Student Id="1">
<Name >sandeep</Name>
<Age>12</Age>
<Mobile>123456789</Mobile>
</Student>
<Student Id="2">
<Name >ololjk</Name>
<Age>kjlokmo</Age>
<Mobile>njonojniohuj</Mobile>
</Student>
<Student Id="3">
<Name >Sandeep Pr</Name>
<Age>12</Age>
<Mobile>9865231870</Mobile>
</Student>
<Student Id="4">
<Name>ololjk</Name>
<Age>kjlokmo</Age>
<Mobile>njonojniohuj</Mobile>
</Student>
<Student Id="5">
<Name>ololjk</Name>
<Age>kjlokmo</Age>
<Mobile>njonojniohuj</Mobile>
</Student>
<Student Id="6">
<Name>ololjk</Name>
<Age>kjlokmo</Age>
<Mobile>njonojniohuj</Mobile>
</Student>
<Student Id="7">
<Name>ololjk</Name>
<Age>kjlokmo</Age>
<Mobile>njonojniohuj</Mobile>
</Student>
<Student Id="8">
<Name>ololjk</Name>
<Age>kjlokmo</Age>
<Mobile>njonojniohuj</Mobile>
</Student>
<Student Id="9">
<Name>ololjk</Name>
<Age>kjlokmo</Age>
<Mobile>njonojniohuj</Mobile>
</Student>
<Student Id="10">
<Name>ololjk</Name>
<Age>kjlokmo</Age>
<Mobile>njonojniohuj</Mobile>
</Student>
</Student_Details>
Sandeep PuvvadiHave a look at the
XmlDocument class. Read the
documentation (it's all written there for us all). If you'll have implementation questions, feel free to ask again. At the moment, I can't see what you've already tried and what's not working.
Armin -
Load a flat file into BW-BPS using SAP GUI
Hi,
We are using BW BPS 3.5 version, i implemented how to guide " How to load a flat file into BW-BPS using SAP GUI" successfully without any errors.
I inlcuded three infoobjects in the text file costelemt, Posting period and amount. the same three infoobjects i inlcuded the file structure in the global data as specified in the how to document
The flat file format is like this
Costelmnt Postingperiod Amount
XXXXX #
XXXXX 1 100
XXXXX 2 800
XXXXX 3 700
XXXXX 4 500
XXXXX 5 300
XXXXX 6 200
XXXXX 7 270
XXXXX 8 120
XXXXX 9 145
XXXXX 10 340
XXXXX 11 147
XXXXX 12 900
I successfully loaded above flat file in to BPS cube and it dispalyed in the layout also.
But users are requesting to load flatfile in the below format
Costelmnt Annual(PP=#) Jan(PP=1) Feb(PP=2) ........................................Dec(PP=12)
XXXXX Blank 100 800 900
Is it possible to load a flat file like this
They wants load a single row instead of 13 rows for each costelement
How to do this. Please suggest me if anybody accorss this requirment.
In the infocube we have got only one Info object 0FISCPER3(Posting period) and one 0AMOUNT(Amount)
do we need 13 Infobjects for each posting period and amount.
Is there any possiblity we can implement any user exit which we use in BEX Quer's
Please share your ideas on this.
Thanks in advance
Best regards
SSHi,
There are 2 ways to do this.
One is to change the structure of the cube to have 12 key figures for the 12 posting periods.
Another way is to write an ABAP Function Module to fetch the values from each record based on the posting period and store it in the cube for the corresponding characteristic. This way, you dont have to change the structure of the cube.
If this particular cube is not used anywhere else, I would suggest to change the structure itself.
Hope this helps. -
HOW TO TURN A .FLV FILE INTO AN SWF IN ADOBE?
Questions,,,,,
1. In a flash slide,,,,,How do I add effects to the movie,
like an intro black curtain coming up from the top and closing down
on the bottom,,,,,,to make it look more
professional?,,,,,,,,,,,like this video-SUMMER NIGHTS-
http://music.yahoo.com/ar-289037-videos--Lil-Rob
2. How do I convert .flv files to swf files so I can upload
them to my site,,,,,because thats all it excepts?Peace,
I will try to answer both questions. You abviously know how
to creat an .FLV file. when you load you files on the server you
must place the .SWF and the .FLV in the same folder. With that you
will create your link to the .SWF file.
In regards to the other issue. I am incline to think that
what you see is a video effect and not a Flash one. If I where to
try this I would upload my video into the time line and add a new
layor to hold my effect. This should do it. But it will of course
make you .SWF larger than if you did the effect in a video editing
program.
I hope I helped some how.
Peace
Khnumtemu -
Wrapping .mov files into swf
Hey everybody-
Does anyone know how to wrap a .mov file into a swf?
I appreciate your time.The video file itself will be deployed to a server, so when I go through the 'import video' process, I have to reference it by source (http://example/example.mov).
When I just test it locally, with the video located on my local machine, it works. But when I try to refer it, it doesn't work.
Sorry if I'm making this confusing. -
How to insert a image file into oracle database
hi all
can anyone guide me how to insert a image file into oracle database now
i have created table using
create table imagestore(image blob);
but when inserting i totally lost don't know what to do how to write query to insert image fileHi I don't have time to explain really, I did have to do this a while ago though so I will post a code snippet. This is using the commons file upload framework.
Firstly you need a multi part form data (if you are using a web page). If you are not using a web page ignore this bit.
out.println("<form name=\"imgFrm\" method=\"post\" enctype=\"multipart/form-data\" action=\"FileUploadServlet?thisPageAction=reloaded\" onSubmit=\"return submitForm();\"><input type=\"FILE\" name=\"imgSource\" size='60' class='smalltext' onKeyPress='return stopUserInput();' onKeyUp='stopUserInput();' onKeyDown='stopUserInput();' onMouseDown='noMouseDown(event);'>");
out.println(" <input type='submit' name='submit' value='Submit' class='smalltext'>");
out.println("</form>"); Import this once you have the jar file:
import org.apache.commons.fileupload.*;Now a method I wrote to upload the file. I am not saying that this is correct, or its the best way to do this. I am just saying it works for me.
private boolean uploadFile(HttpServletRequest request, HttpSession session) throws Exception {
boolean result = true;
String fileName = null;
byte fileData[] = null;
String fileUploadError = null;
String imageType = "";
String error = "";
DiskFileUpload fb = new DiskFileUpload();
List fileItems = fb.parseRequest(request);
Iterator it = fileItems.iterator();
while(it.hasNext()){
FileItem fileItem = (FileItem)it.next();
if (!fileItem.isFormField()) {
fileName = fileItem.getName();
fileData = fileItem.get();
// Get the imageType from the filename extension
if (fileName != null) {
int dotPos = fileName.indexOf('.');
if (dotPos >= 0 && dotPos != fileName.length()-1) {
imageType = fileName.substring(dotPos+1).toLowerCase();
if (imageType.equals("jpg")) {
imageType = "jpeg";
String filePath = request.getParameter("FILE_PATH");
session.setAttribute("filePath", filePath);
session.setAttribute("fileData", fileData);
session.setAttribute("fileName", fileName);
session.setAttribute("imageType", imageType);
return result;
} And now finally the method to actually write the file to the database:
private int writeImageFile(byte[] fileData, String fileName, String imageType, String mode, Integer signatureIDIn, HttpServletRequest request) throws Exception {
//If the previous code found a file that can be uploaded then
//save it into the database via a pstmt
String sql = "";
UtilDBquery udbq = getUser(request).connectToDatabase();
Connection con = null;
int signatureID = 0;
PreparedStatement pstmt = null;
try {
udbq.setUsePreparedStatements(true);
con = udbq.getPooledConnection();
con.setAutoCommit(false);
if((!mode.equals("U")) || (mode.equals("U") && signatureIDIn == 0)) {
sql = "SELECT SEQ_SIGNATURE_ID.nextval FROM DUAL";
pstmt = con.prepareStatement(sql);
ResultSet rs = pstmt.executeQuery();
while(rs.next()) {
signatureID = rs.getInt(1);
if (fileName != null && imageType != null) {
sql = "INSERT INTO T_SIGNATURE (SIGNATURE_ID, SIGNATURE) values (?,?)";
InputStream is2 = new ByteArrayInputStream(fileData);
pstmt = con.prepareStatement(sql);
pstmt.setInt(1, signatureID);
pstmt.setBinaryStream(2, is2, (int)(fileData.length));
pstmt.executeUpdate();
pstmt.close();
con.commit();
con = null;
if(mode.equals("U") && signatureIDIn != 0) {
signatureID = signatureIDIn.intValue();
if (fileName != null && imageType != null) {
sql = "UPDATE T_SIGNATURE SET SIGNATURE = ? WHERE SIGNATURE_ID = ?";
InputStream is2 = new ByteArrayInputStream(fileData);
pstmt = con.prepareStatement(sql);
pstmt.setBinaryStream(1, is2, (int)(fileData.length));
pstmt.setInt(2, signatureID);
pstmt.executeUpdate();
pstmt.close();
con.commit();
con = null;
} catch (Exception e) {
con = null;
throw new Exception(e.toString());
return signatureID;
} -
Problems concerning "How to integrate MS Exchange Server into SAP EP"
Hi,
I want to realize the scenario in "How to integrate Microsoft Exchange Server into SAP Enterprise Portal" from the Microsoft-Website.
We´re using SAP NetWeaver 04, SAP NetWeaver Portal 6.0.14.0.0 and KMC 6.0.14.2.0 and Microsoft Exchange Server 2000 SP3.
I have created (as described in the document) the HTTP-System and a WebDAV RM. But the repository doesn´t appeaer in the KM-Content-iView.
I checked the Component Monitor and got this error-message for "servers" (it was marked with a red square)
last-error-3 2006-05-16T13:12:11Z: PROPFIND /public: 401 Access Denied
last-error-4 2006-05-16T13:15:04Z: PROPFIND /public: 401 Access Denied
last-error-6 2006-05-16T13:26:35Z: PROPFIND /public: 401 Access Denied
errors 8
last-error-2 2006-05-16T13:12:10Z: PROPFIND /public: 401 Access Denied
requests 8
last-error-7 2006-05-16T13:26:35Z: PROPFIND /public: 401 Access Denied
bytes-per-second 0
successes 0
response-average 194
last-error-1 2006-05-16T13:11:55Z: PROPFIND /public: 401 Access Denied
last-error-0 2006-05-16T13:11:54Z: PROPFIND /public: 401 Access Denied
last-error-5 2006-05-16T13:15:05Z: PROPFIND /public: 401 Access Denied
failures 0
Any idea, what´s wrong? And how to solve the problem.
Thanks for help,
Sven
Message was edited by: Sven KellerHi James,
How can I check the KM ACLs/Security Zones?
I had a look on "System Administration - System Configuration - Knowledge Management - Content Management - Repository Managers - Security Manager - WebDAV ACL Security Manager".
There was just "WDAclSecurityManager" and the Permission Rendering Class was "com.sapportals.wcm.control.acl.ResourcePermissionControl".
Or where do I have to look for the ACL? -
I shot video on a Panasonic P2 and I'm trying to import the MXF files to Final Cut Pro but when I try to import, the only thing that imports is a blurry image of each clip. There's no audio and no video...how can I import MXF files into Final Cut Pro?
at the end, you say "import preferences", which program are you describing?
So im safer using footage that is remotely being pulled from iphoto...
vs
using footage that is imported into FCP from imovie?
Is there anything i can do in fcp to make this footage more reliable or safer or more stable as i pull remotely from iphoto?
All the footage, and all the libraries to all programs, or on a new pegasus 12tb raid 5 setup fyi. -
How do I upload a file into my acrobat cloud? I am needing to do this in order to convert the pdf to excel.
Hi wesm34245063,
Here's a quick tutorial on using the ExportPDF online service to convert PDF files to Excel: Getting Started with ExportPDF | Adobe Community.
I think that you'll find it's pretty easy, but if you do run into questions/issues, please let us know.
Best,
Sara
Maybe you are looking for
-
ASA license for Cisco IP Phone over VPN
Hi, Are there special licenses required on the ASA to use Cisco IP Phones (Hard phone) over SSL VPN connection? Thanks
-
IPhone Will No Longer Sync. HELP
I connected my iPhone to charge last night and grabbed it this morning to go to work. At work I noticed that there were no songs or podcasts on the phone anymore... hmmm strange. When I got home I tried to sync the phone again and got the following m
-
Program keeps blocking signing in to email. Can sign in through web
Thunderbird was working perfectly. Suddenly I started getting messages that there was unauthorized use. Then it kept blocking me from signing in even though I went to google and changed the password 2x. I still can't get email to one account that I h
-
I have a physical standby: Oracle Database 11g Patch Set 1 11.1.0.7.0 I use rman to remove the applied archive logs. I don't use "ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY" because of some timing issues of the off-line backup. I run a rman com
-
ASA has messages log in denied from CSM to ASA
Hi Everyone, Since i added ASA to csm 4.3 our syslog server always see the message message : Login denied from x.x.x.x/56432 to inside y.y.y.y/https.or user "" where x is csm server ip y is fw interface ip. And after this message just after few