How to Insert and call custom Code in CaptivateMainTimeine.as?
I have been trying to get my head around this, using various blog postings by Jim Leichliter as my guide. However, so far I have been defeated.
This is what I attempted (in Captivate 5):
1) I inserted the following code into CaptivateMaintimeline.as, just above the private function AddEICallbacks() section:
public function helloWorld(){
alert('hello world');
2) Just above the EICallbacksAdded = true; line, I inserted
ExternalInterface.addCallback("helloWorld", helloWorld);
3) I created a one-slide Captivate 5 presentation with a button whose "On Success" action is set to "Execute Javascript".
4) In the "Execute Javascript" Script_Window, I entered this code:
Captivate.helloWorld();
5) I published the presentation and viewed it in Chrome, Firefox and IE 9, which all reported an error, as follows:
(Chrome) "Uncaught TypeError: Object #<HTMLEmbedElement> has no method 'helloWorld'"
(Firefox) "Captivate is not defined"
(IE 9) "Object doesn't support property or method 'helloWorld'"
6) I changed the script window code to
document.Captivate.helloWorld();
and published and viewded in Chrome in Firefox, with the following results:
(Chrome) "Uncaught TypeError: Object #<HTMLEmbedElement> has no method 'helloWorld'"
(Firefox) "document.Captivate.helloWorld is not a function"
7) I also tried
document.getElementById('Captivate').helloWorld();
and published and viewed in IE 9, getting the same error as previously,
"Object doesn't support property or method 'helloWorld'"
Can anyone see what I am missing here?
Thanks, Jim. Your example got my "proof-of-concept" working.
I had jumped to the unwarranted conclusion that core JavaScript functions were directly accessible from ActionScript. Investigating further as a result of your comment, I discovered the ExternalInterface.call technique for using JavaScript functions in ActionScript when I actually need to. (Ref. http://codingrecipes.com/calling-a-javascript-function-from-actionscript-3-flash and http://www.actionscript.org/resources/articles/745/1/JavaScript-and-VBScript-Injection-in- ActionScript-3/).
Some background: I wrote my first program in Fortran in 1966 and having been coding ever since. For most of the last two decades, most of what I have written has been in the VB, VB.NET, and ASP.NET worlds, but now I am going through a steep Captivate + ActionScript + JavaScript learning curve as I use Captivate to create course materials for the learning institution where I work. It would be simpler if the materials were only ever going to be run from our web server, but as well as on-campus students we have distance students across the country. We provide the distance students with a computer preloaded with the materials, but not all students have an Internet connection, so I am trying to create materials that can be run stand-alone from the computer's file system or served from a web server with equal facility.
Add in the complication that there are many keyboard shortcuts that Internet Explorer doesn't pass through to Flash, therefore hobbling some of the training and assessment simulations, and you can see that the Captivate presentations have to have sufficient logic built in to detect the environment in which they are running and adjust accordingly. As I will be calling upon this logic over and over again, I would like it to be in one place and access it by a simple JavaScript call from the opening slide of every presentation, thus populating a number of Captivate variables with the environmental information which can then be used to branch the presentation to alternative slides wherever necessary. Therefore, embedding the logic into a customized version of CaptivateMainTimeLine.as seemed the way to go, but if anyone can suggest a better strategy, I am open to all ideas!
Trevor
Similar Messages
-
Hello.
I just know the muse and I need an organization of customers in alphabetical order. The problem is that you will always get new customers. I need to know how to insert a new customer (square) and it already comes in alphabetical order on the page. The site will be like in the link below, and each client will be a window of these: http://www.connary.com/. I look back.
A hug, Murilo.I believe you are referring to thumbnail image rectangles as customers on page ? not exactly customer database ?
You can add rectangle with different effects with mouse rollover state and regarding adding new ones , you would need to do that manually in design mode .
Thanks,
Sanjit -
How to create and call a COM component in Java
Hi All,
can you suggest how to create and call a COM component..or if have any sample simple application can you send it to me...i will try to develop my project.
actually i am configuring a OCR Engine using SDK which is in VB .Net when i contacted their support they told that if i have any sample COM based component Project they will help me...
So please can you help in this.
Thanks in advance.As said by my fellow posters Java Devolopment Environment (Except Microsoft implementation of JVM,this is no longer supported by MS themseleves) does not provide an built-in support to serve this cause.
If you are looking to devolop a custom based solution the below is a good place to start with where end user is talking about Java <=> JNI <=> Native <=> COM connectivity.
[http://bloggershetty.blogspot.com/2004/12/java-jni-com-activex-bridge-lots-of.html]
However,if you are looking for ready made solutions ?
Implementation any one of the solutions stated below might serve your cause.
Open Source Solutions:
[http://j-interop.org/]
[http://www.danadler.com/jacob/]
Commercial Solutions:
[http://javacombridge.com/]
[http://www.jnbridge.com/]
[http://www.nevaobject.com/j2cdetails.asp?kw=java%20com%20bridge]
[http://j-integra.intrinsyc.com/]
Hope this might help :)
REGARDS,
RaHuL -
How to insert and delete fragments by clicking a button and how to script it?
I have a question on livecycle. I am collecting the inventor information as a bunch of text fields, each asking for a certain details. Please see below
Now I have grouped them all in to one fragment called inventordetails and saved as .xdp file, so I could reuse this entire block. I want to add a button underneath this block, “ADD MORE INVENTORS” and when clicked this will insert another block and so forth and so on. However I was not sure as to how to insert and delete a fragment. Do you think you can help with this? I appreciate any help in this regard.
Best
Subashini1. I have a subform1 which is flowed
2. I have subform2 inside subform1 which is positioned
3. Inside subform2 I have two buttons 1. ADD INVENTOR 2. DELETE INVENTOR
4. Also inside subform1 I insert a fragment called inventor
Now I want to script the buttons so that when clicked the inventor fragment either gets inserted again or deleted.
I greatly appreciate any help in this regard.
Best
Subashini -
Call function and call customer function
Hi
Can anybody let me know what is the difference between CALL FUNCTION AND CALL CUSTOMER- FUNCTION .
i know call customer- function is used while we r working on user exits .
but is their any specific reason of difference ...
ThanksCALL CUSTOMER-FUNCTION function_exit parameter_list.
Effect
This statement can be used in programs delivered by SAP. It includes the function module exit specified in function_exit . The function module exit is a customer exit. In an SAP program, it enables you to call a function module provided by SAP and implemented by the customer.
The indicator function_exit must be a three-digit text field literal. A function module exit is specified by SAP using the transaction SMOD and can be activated using the transaction CMOD in customer systems.
Specifications by SAP
An empty or partly implemented function module must be assigned to the function module exit using the transaction SMOD. The name of the function module consists of EXIT_, the program name, which contains the statement CALL CUSTOMER-FUNCTION, and the three-digit indicator in function_exit. The interface of the function module is completely defined by SAP.
Activation in the customer system
The transaction CMOD enables the customer to implement the source code of the function module within an enhancement project and to activate the function module exit. If the function module exit is not activated, the statement CALL CUSTOMER-FUNCTION is ignored. If the function module is activated, the corresponding function module is called in the same way as the general function module call.
Syntax and meaning of the parameter_list for the assignment of the actual parameters to formal parameters and for the exception handling are the same as in a general function module call. It is not possible to dynamically fill the interface.
CALL FUNCTION func
Syntax
CALL FUNCTION func { parameter_list
| parameter_tables }.
Effect
This statement calls the function module specified in func. The identifier func must be a character-type data object, which contains the name of a function module in uppercase letters during the statement execution. Each function module of an SAP system has a unique name, which is why you need not specify the function group.
Use additions parameter_list or parameter_tables (as of release 6.10) to statically or dynamically assign actual parameters to the formal parameters of the function module and return values to the non-class-based exceptions.
Note
If the name of a function module is specified by a constant or as a literal, the extended syntax check can check the statement.
Exceptions
Catchable Exceptions
CX_SY_DYN_CALL_ILLEGAL_FUNC
Cause: The called function is known but not active.
Runtime Error: CALL_FUNCTION_NOT_ACTIVE
Cause: The called function is unknown.
Runtime Error: CALL_FUNCTION_NOT_FOUND
CX_SY_DYN_CALL_ILLEGAL_TYPE
Cause: The type of the actual parameter does not fulfill the requirements of the function interface.
Runtime Error: CALL_FUNCTION_CONFLICT_GEN_TYP
Cause: The actual parameter does not have the length expected by the function.
Runtime Error: CALL_FUNCTION_CONFLICT_LENG
Cause: The actual parameter does not have the type expected by the function.
Runtime Error: CALL_FUNCTION_CONFLICT_TYPE
Cause: Only those functions can be called in the update task that are intended for it.
Runtime Error: CALL_FUNCTION_NO_VB
Cause: An actual parameter does not fulfill the alignment requirements of the respective formal parameter.
Runtime Error: CALL_FUNCTION_WRONG_ALIGNMENT
CX_SY_DYN_CALL_PARAM_MISSING
Cause: The function expects a parameter, which has not been passed by the caller.
Runtime Error: CALL_FUNCTION_PARM_MISSING
CX_SY_DYN_CALL_PARAM_NOT_FOUND
Cause: The caller has passed a parameter, which is not known to the function.
Runtime Error: CALL_FUNCTION_PARM_UNKNOWN
plz reward points if it helps -
How to set and save Custom Print Settings in Aperture?
How to set and save Custom Print Settings in Aperture
Hi,
I am printing 12x18" images on 13x19" sheets. I find it difficult to enter the 13x19" dimensions because each value jumps to another random value when I move to enter the second dimension. For instance 13 jumps to, say, 8.5 as I type 19 into the second box. Same with the sheet dimensions.
Also, when I finally get it all correctly, the margins don't set themselves automatically - which I would I expect.
Then, even though I save the setting by clicking Save Setting at the gear below, next time I turn Aperture on, it's all gone.
Any ideas? Thanks.
RaphaelFor me, it is working with these settings, Raphael.
Does your image have a 12x18" aspect ratio? You may want to crop it to the desired aspect ratio before printing.
I can only test with Aperture 3.6 on Yosemite 10.1. -
How to create and call webservices in VC?
Hi Experts,
Please tell me the steps to create web services and how to connect and call in VC.
Regards,
NutanHi,
all steps are described in the two attached document:
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a160392c-0e01-0010-7784-9cc564d871d2">How to Consume ES Workplace Enterprise Services in Visual Composer</a>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e017128b-0c01-0010-fa85-e3a576f1a40d">Consume a Web Service from Visual Composer</a>
Rgds,
Karim -
How to develop and call Asynchronous web service
Hi All,
I need to have a java web service that will be called asynchronously.
That should execute, once triggered and caller shouldnt need to wait till its completion.
How to develop and call asynchronoue web service ?
Thanks
SaikrishnaLet your web service start its own background thread (*) somehow and move your business logic from web service to this thread. Then you can return from your web service. The client won't be blocked and your application will run on your server after service callout will be finished.
I hope that's what you need. Anyway, there is only "asynchronous communication" and nothing like "asynchronous web service". At least from HTTP point of view, every call is synchronous - you have request and response.
(*) You shouldn't start your own thread since you are in JEE world. Look at documentation for your container. E.g. for weblogic there are workers you can use this way. Or you can choose the other way. I hope that for any container you can just enqueue your web service request to any JMS queue and move your business logic to an appropriate MDB. Then, your web service will be just a simple JMS producer and your web service client won't be forced to wait for business logic to finish.
Last but not least, next time choose a better forum. :-) -
How to insert and dispaly japanese charectors?
how to insert and dispaly japanese charectors?
can one know how to do above thing,
i am using oracle 9i, what are the settings
required?
please give any one may send some guidence or help,
thanks
pullareddyAssuming that you can already type and display Japanese characters on your platform. In terms of db storage, you need to create a database using a character set that can stored Japanese characters such as JA16SJIS, JA16EUC, UTF8, AL32UTF8 etc. Next you need to set your NLS_LANG to the character set on your client platform, so that Oracle can convert between the client and database character sets.
Check out the FAQ on the Globalization Support OTN web site for more info. http://technet.oracle.com/products/oracle8i/htdocs/faq_combined.htm
Regards
Nat -
If u are not the account ownr, how can text and call logs be erased
if I am account owner, and no one e;se is allowed on my account, how did text and call logs disappear today
What do you mean by "disappear"? If you are at the end of your billing cycle, the current logs will reset and the previous info will be unavailable for a couple of days while your bill is generated.
Once the bill is generated, you can got to "view bill" and see the usage details for the completed cycle. The details for the current cycle will show as unbilled usage on your home screen. -
How to insert Method in ABAP code
Hi Gurus,
Plz tell me how to insert a METHOD in ABAP code as we do in the case of inserting function in ABAP code using PATTERN.Button
Rgds
rajeshHi,
Try this.
Click pattern tab ans select AABAP object patterns.
Select call method.
Then give the instance name , class/interface name and the method name.
Sharin. -
Calling Customer code in java application
Hi,
in my java application running on WAS 6.40 I want to call some customer code.
Basically I create a data structure (DOM XML tree) and want to pass this to customer code to be able to modify it as needed.
My idea would be to define an interface which would than be implemented by customer java classes. But how do I load these classes?
In theory I would create a configuration table in my app where the customer would specify the classname of his classes implementing this interface and I would do a Class.forName("...")
But those classes will be unknown to my application'S classloader, right? Because they won't be deployed with my application and I can't have references as I do not know if and what the customer will deploy. What's the best approach to this? WOuld EJBs help better?
Thanks
BrunoHi Bruno,
We did this for our application. We needed a weak reference from our deployable DC to a specific DC (e.g. DC\customerExit) The customer then creates this DC and adds their classes to it. Since it is a weak reference, it does not need to exist for your application to work. You can use the customizing to be able to lookup the specific class name that they created.
hope this helps,
Rich -
How to find unused ABAP custom code?
Hi,
how can I identify the unused ABAP custom code outside of the SAP Solution Manager?
Thanks in advance.
NoraLike a Google for ABAP, the Salt Code Ferret app provides incredibly fast searching of custom ABAP programs or modified standard SAP programs across all your SAP systems. Sniffing out specific pieces of code, Code Ferret is a huge timesaver in locating multiple instances of potentially conflicting code, code errors, or code that developers want to access or replicate. www.saltapps.com
Try Salt free for 90 days – it’s a suite of eight virtual appliances running on VMware or Hyper-V for understanding what’s happening in SAP systems and across SAP landscapes. -
How to insert a new customized user status in an existing business transaction?
Hi Gurus:
We have a service request where we need a new user status, but I have in a productive system service requests created already.
We customized the new user status for the transaction type that we are using, but how to retrieve in the old business transactions created this new user status?
Is there a way to insert the new customizing in old transactions? Is possible to force by some ABAP code to insert the new user status in some old business transactions?
I'll appreciate your inputs.
SusanaHi Susana,
Can you try the report of note
1289525
If this is not working may be you can use partaily the code of the report .
Best regards
Christophe -
How to insert and view images from oracle using jsf
Can anyone please give me some code example or link of article explaining that how can i insert and view images to/from oracle using jsf?
Thanks in advance.You mean you want to view image data stored in the database, right?
Create a servlet that streams the image data to the response (setting the appropriate content-type), then reference this servlet in your img tag. Here is an example:
http://balusc.blogspot.com/2007/04/imageservlet.html
Storage is something different. What exactly don't you understand there? Perhaps you want a file upload component?
Maybe you are looking for
-
I meant to pose this as a question.
-
Dreamweaver 8 does not preview correctly
Hello group, When I try to preview my .html pages in Dreamweaver 8 it does not know the page. The only thing that shows up is a page that "Cannot be found" with a strange extension (TMPztriqmk5y3.htm). This happened after I tried to design a page usi
-
Authorize more than 5 computers
How do I authorize more than 5 computers in iTunes? And yes I know the limit issue is agreements with the music industry. But I do not want to listen to music. I need to support a business network with the following 1 OS X Server on mac mini 4 iMacs
-
Hello Friends, Can anyone plz help in to design the Roles and profiles here in the BW 3.5 system. We have around 8 company codes to be seen. So we need to prepare Base roles and derived roles for the requirement. So looking for and idea of a Role mat
-
Where is ADRN2 field in SA BAPI BUS2012
Hi, We have to populate address number under delivery address tab in SA and we are creating SA using LSMW BAPI method . So wanted to know under which structure (from below mentioned) at step4 ADNR2 field is available so that field mapping can be done