How to give a button multiple functions
So I have a button for audio which plays it and a button that stops the audio. What would I need to do with the actionscripting to hide the play audio button when the music is playing and just show the audio off button, and then hide the off button when it's clicked and show the play button in its place?
import flash.events.MouseEvent;
play_btn.addEventListener(MouseEvent.CLICK, playFunc);
stop_btn.addEventListener(MouseEvent.CLICK, stopFunc);
play_btn.x=stop_btn.x;
play_btn.y=stop_btn.y;
stop_btn.visible=false;
function playFunc (e:MouseEvent):void {
play_btn.visible=false;
stop_btn.visible=true;
//the code to play
function stopFunc (e:MouseEvent):void {
stop_btn.visible=false;
play_btn.visible=true;
//the code to stop
Similar Messages
-
How to give push button in alv report output
hi,
my requirement is that , i have to give push button in alv report output(item level) not in application toolbar, i am using reuse_alv_grid_display FM, can any body provide me sample code
regards,
siva kumarhave a look at this thread, also has a sample report at the end from Uwe Schieferstein.
[button on alv list|How to add and program a pushbutton on ALV grid line;
seems not to work try this:
How to add and program a pushbutton on ALV grid line
Edited by: Micky Oestreich on May 15, 2008 10:20 PM -
One button, multiple functions
Hello.
I have used the loader script to load an external swf into current project. I have added a button to unload the external file when wanted, and was wondering if you could have multiple functions for that button, so that when you click it to unload it works as a 'home' button as well, and takes the user back to the mainpage again?
AS3 btw.
Might be wise to mention that im kinda new to adobe flash and as3, and not sure if the way i have used to load the external swf was the easiest. Seems like a few have had some issues with this subject before me as well.
All pointers in the right direction is appreciated. Cheers.Thanks alot for answer Ned Murphy.
As I've might failed to mention, is that the button is intended to do two things, unload and return to main page, at the same time. So basically a one click operation.
To update the situation, I've tried this as a code;
btnHeim.addEventListener(MouseEvent.CLICK,unloadSwf);
function unloadSwf(e:MouseEvent):void {
loader.unload();
btnHeim.addEventListener(MouseEvent.CLICK,tilbaks);
function tilbaks(event:MouseEvent):void{
gotoAndStop(1,"Mainpage");
It kind of work, as it unloads and takes you back to the main page. Only thing then is that the buttons on mainpage doesnt work any longer, and one of them disappear?
I've never been this deep into AC3 i think, so not sure what the problem is, except for the fact that there is some issues going on.
This is the error that shows up on 'output' after btnHeim is clicked.
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Mappevurdering_web_fla::MainTimeline/frame2()
at flash.display::MovieClip/gotoAndStop()
at Mappevurdering_web_fla::MainTimeline/tilbaks()
Thanks again -
How can I customize button's function in N73
Hi
Can any one help me on this? I need to customise the functioning of my N73 buttons. Currently left button has 'Messaging' and right button has 'Home' functions assigned to it. I mistakely press right button some time which takes me Orange home page and unnecessary charges me for internet connection.
I want to customise right button to somethine else like Contacts or Image Galary etc...
is there a way to do this?
cheers
Solved!
Go to Solution.I love the RTFM response, and this is totally a person who cant be bothered to read the manual.
Having said that, i will be a help and tell you how to do this.
But just because your lazy
Menu > Tools > Settings > Phone > Standby Mode.
From there, you will be able to change the left and right selection keys.
My posts are my opinion and in no way the direct views of Nokia.
If my posts are helpful, please give me some KUDOS using the green star on the left. -
How to use Labview ""buttons"" to functioning the program?
i'm trying to use the ok button to operate the program to add the value in the cluster X Y (millemetre) [which is from the machine vision operation] with the value X Y offset [which i gonna input them myself] but .. i dont' know how to make it done , now i'm trying to use event structure but it's not working
plz give me some advice thanks ... by the way i'm got to make this thing done by 3 days due to my project schedule ... thank you
also this software is to locate the orientation for robot to grip the object by using CCD camera
Message Edited by NuMetal on 01-04-2010 10:55 AM
Message Edited by NuMetal on 01-04-2010 10:55 AM
Solved!
Go to Solution.
Attachments:
Project1.vi 97 KB
1.jpg 92 KBPlace the Event structure inside a while loop. Have a look at some of the examples that ship with LV, they for sure show this.
Then use the value change event for the ok button (place the button's terminal in that fram to have the latching behaviour set correctly).
You can pass the data of XY to the loop output in the same event frame to read it at the very moment, the ok button is pressed.
Felix
www.aescusoft.de
My latest community nugget on producer/consumer design
My current blog: A journey through uml -
"must fill all requiered fields" - how can i push button multiple selection
hi friends,
i have a selection screen:
subty for pa0001-subty obligatory.
so_persk for pa0001-persk
pa_vac as checkbox.
the user have to fill subty and
(so_persk or pa_vac.).
the user want that when she push the "multiple selection" it wont give her error: you must type all requierd fields".(it obligatory)
what can i do?
thanks,
Michal.Hi Michal,
This must be oyur code
Select-options: s_subty for pa0001-subty obligatory,
so_persk for pa0001-persk.
pa_vac as checkbox.
As per your query the user enters s_subty as its obligatory fine
next user either enters so_persk or pa_vac
Am I right????
Now at the selection screen make the validations from where did the multiple selection come in this point,
Please revert with much more clarity
Thanks and Regards
Srikanth P -
How to add push button in function module
I want to add Push button( yes/no) in same screen. I used POPUP_TO_CONFIRM,
but this popup is coming on next screen when I click on cancel button.There is no scope to create a push button in application tool bar. Instead of that we can add in a menu bar.
-
How do I get buttons that function and move as they did in firefox 2?
In firefox 2 the back button was separate from the forward button. This was ideal for me because I could move them around. I always had "stop" in the middle which was useful for sites that redirect you numerous times and returning to the content I was at before. I almost never use the forward button. Is there a way to pull the buttons from Firefox 2 and put them into current versions? This merged button is like button 3 after they took away buttons 1 and 2. I want 1 and 2 back. Even if it means writing separate add ons (which I'm not currently able to do on my own). Most of the current add ons which "separate" them do not let you actually move them apart. Customizing my panel myself optimizes my work speed.
Use this to open the tab history list:
* Right click on the Back or Forward button
* Hold down the left mouse button on the enabled Back or Forward button until the list opens
You can look at this extension:
* Backward Forward History Dropdown: https://addons.mozilla.org/firefox/addon/backforedrop/ -
Radio buttons in function module.
Hi,
I have developed a function module which internally calls abap report with SUBMIT command. However, the abap report has radio buttons on selecton screen. So I would like to know how to define radio buttons in function module or is there any alternative to overcome this problem?
ABAP code in function module :
submit zodmr_report with p_vkorg = bukrs
with s_off in vkbur
with s_vtweg in vtweg
with s_spart in spart
with s_dsa in dsa
with s_ext in allocation_id
with p_yyyymm = year_month
and return.
( ABAP report "ZODMR_REPORT" has two radio buttons)
Regards,
SantoshHi,
To the best of my knowledge you need to create an IMPORT parameter of type SY-DYNNY And pass your selection screen to the FM. If this will not serve your purpose, then Instead of Standard Selection Screen with number 1000, use custom defined Screen number.
Cheers
Ram -
How to give only one function module execution Auth for a User ?
Dear Experts
I have reviewed S_DEVELOP auth object. It is not ful filling my requirement
Any Ideas !!
RgdsRakesh...Firstly thanks for reply.
As i said i reviewed these and found it is not meeting my requirement.
As we aware We can control auth to Function modules thru object type
Filed OBJTYPE----
FUGR --> 1st control
and with Function Group Name
Field OBJNAME----
<Function Group Name> --> 2nd control
In my scenario - I have given the authroizations as below
++++++++++++++++++++++++++++++++++++++++++++++++++++
ACTVT Activity Display, Execute
DEVCLAS Package *
OBJNAME Object name ZECC_FG
OBJTYPE Object type FUGR
P_GROUP Authorization group ABAP/4 pro *
++++++++++++++++++++++++++++++++++++++++++++++++++++
The above authroization is giving all Function modules authrozation under ZECC_FG Function Group.
My Requirement
I shoudl be able to give only one Function Module of a Function group where multiple function modules exist under the same Function Group.
How can i acheiveit. Any Custom Control can be place to acheive this.
I am sure S_DEVELOP will not solve my requirement (I Beleive)
Regards -
How to keep multiple function modules under one Web service
Hi Experts,
I have Three RFC function modules and i need to create one web service for these three RFC function modules. I know How to crearte a web service for one function module.
please suggest me How to keep multiple function modules under one Web service.
Thanks in advance
LakshminarayanaHi Lakshmi,
The best way to do it is to assign all the three RFC Enabled FM's to one function group. Later on the top menu in Utilities you get an option to Create a Webservice from a Function Group.
You can create one single Webservice using all the the 3 FM's.
I hope this helps.
Thanks,
Manu -
How can I run a BW Function from EXCEL-IN-PLACE (BPS)using VBA??? Please give any example.
I would like to run my function module ZMY from EXCEL-IN-PLACE using VBA and get a result.if you are using excel in place in the web application environment I doubt you can, you've never really had any macro functionalty there.
If you are in the gui environemnt (Planning folders) it will depend on how you want to invoke the module... -
How to create SAVE button in Workbook using BI IP Functionality
Hi All,
I have Real-time Infocube (ZCUBSDID) with me. Planning has been done on the cube using BI-IP (like Aggregation level, filter, planning function and planning sequence are present there).
As an Input i have everything in Quality system like I can access query in Bex Anlyzer (Input Ready Query) and also i have workbook associated with the query. SAVE button is also present on workbook which is giving result based on fiscal year and version.
Now my task is to create workbook on Development system with the same functionality as Quality System.
I have same Query available on DEV system also. I created new Workbook but SAVE button is not available in my workbook.
Can anyone suggest how to create SAVE button in my new workbook.
I am new in IP side so please let me know if i can get any help from workbook which is already present in Quality system.
Which type of analysis i should do to come out with solution.....otherwise let me know step by step procedure to create SAVE button on workbook using BI-IP functionality.
It will be great help. My advance thanks goes to you people.
Thanks,
Rupali SinghCheck points 19 & 20 on this link http://help.sap.com/saphelp_nw2004s/helpdata/en/43/a033e0f56e21b5e10000000a1553f6/frameset.htm.
Command to be called on SAVE button is SAVE_AREA as explained in the point 20.
Regards,
Deepti -
Hi ,
i am using BAPI_ACC_DOCUMENT_POST to post accounting document. This accounting document is used to post amount from reconcilation account to bank GL account.the table parameter am using is ACCOUNTGL (in the function module)Now i want to give posting keys to the function module parameter. can anyone please guide me how to give posting keys?
Edited by: Santhosh Kumar Cheekoti on Dec 18, 2008 7:48 AMHi,
As pointed out in one of the previous post, posting key will be decided by the BAPI depending on the sign of the amount. Have a look at bthe following code:-
DATA: doc_header LIKE BAPIACHE09,
criteria LIKE BAPIACKEC9 OCCURS 0 WITH HEADER LINE,
doc_item LIKE BAPIACGL09 OCCURS 0 WITH HEADER LINE,
doc_ar LIKE BAPIACGL09 OCCURS 0 WITH HEADER LINE,
doc_values LIKE BAPIACCR09 OCCURS 0 WITH HEADER LINE,
return LIKE bapiret2 OCCURS 0 WITH HEADER LINE,
extension1 like BAPIACEXTC occurs 0 with header line,
obj_type LIKE bapiache08-obj_type,
obj_key LIKE bapiache02-obj_key,
obj_sys LIKE bapiache02-obj_sys,
docnum LIKE bkpf-belnr.
*DATA:
* ITEMNO_ACC POSNR_ACC
* FIELDNAME FIELDNAME
* CHARACTER ACPI_RKE_CRIGEN
* Fill Document Header
doc_header-bus_act = 'RFBU'.
doc_header-bus_act = 'RMRP'.
*doc_header-bus_act = 'SD00'.
doc_header-username = sy-uname.
doc_header-header_txt = 'TEST BOC BAPI POSTING'.
doc_header-comp_code = 'IN10'.
doc_header-compo_acc = 'FICA'.
doc_header-doc_date = '20060127'.
doc_header-pstng_date = sy-datlo.
doc_header-doc_type = 'SA'.
** Fill Line 1 of Document Item
*doc_item-itemno_acc = '1'.
*doc_item-gl_account = '0000500001'.
*doc_item-pstng_date = sy-datum.
*doc_item-item_text = 'TEST POSTING DEBIT ITEM'.
*doc_item-costcenter = ''.
*doc_item-quantity = '1'.
*doc_item-base_uom = 'ST'.
*APPEND doc_item.
*CLEAR doc_item.
** Fill Line 2 of Document Item
*doc_item-itemno_acc = '2'.
*doc_item-customer = '0000000016'.
*doc_item-gl_account = '0000000016'.
*doc_item-pstng_date = sy-datlo.
*doc_item-item_text = 'TEST POSTING CREDIT ITEM'.
*APPEND doc_item.
*CLEAR doc_item.
doc_ar-itemno_acc = '1'.
doc_ar-gl_account = '0000500001'.
doc_ar-pstng_date = sy-datum.
doc_ar-item_text = 'TEST POSTING DEBIT ITEM'.
doc_ar-costcenter = ''.
doc_ar-quantity = '1'.
doc_ar-base_uom = 'ST'.
APPEND doc_ar.
CLEAR doc_ar.
* Fill Line 2 of Document Item
doc_ar-itemno_acc = '2'.
doc_ar-customer = '0000000016'.
doc_ar-gl_account = '0000000016'.
doc_ar-pstng_date = sy-datlo.
doc_ar-item_text = 'TEST POSTING CREDIT ITEM'.
doc_ar-stat_con = ' '.
doc_ar-costcenter = '0000201681'.
APPEND doc_ar.
CLEAR doc_ar.
* Fill Line 1 of Document Value.
doc_values-itemno_acc = '1'.
doc_values-currency_iso = 'INR'.
doc_values-amt_doccur = '200.00'.
doc_values-currency = 'INR'.
doc_values-CURR_TYPE = '00'. "Doc currency
APPEND doc_values.
CLEAR doc_values.
* Fill Line 2 of Document Value
doc_values-itemno_acc = '2'.
doc_values-currency_iso = 'INR'.
doc_values-amt_doccur = '200.00-'.
doc_values-currency = 'INR'.
doc_values-curr_type = '00'. "Doc currency
APPEND doc_values.
CLEAR doc_values.
* Add tax code in extension1 table.
extension1-field1 = 'BAPI CALL'.
APPEND EXTENSION1.
* Fill CRITERIA for CO-PA
*refresh criteria.
*criteria-ITEMNO_ACC = '1'.
*criteria-FIELDNAME = 'ARTNR'.
*criteria-CHARACTER = '000000000001312251'.
*Append criteria.
*criteria-ITEMNO_ACC = '1'.
*criteria-FIELDNAME = 'WERKS'.
*criteria-CHARACTER = 'IN91'.
*Append criteria.
*criteria-ITEMNO_ACC = '1'.
*criteria-FIELDNAME = 'KNDNR'.
*criteria-CHARACTER = '0000000016'.
*Append criteria.
*criteria-ITEMNO_ACC = '1'.
*criteria-FIELDNAME = 'FKART'.
*criteria-CHARACTER = 'ZIN2'.
*Append criteria.
*criteria-ITEMNO_ACC = '1'.
*criteria-FIELDNAME = 'KAUFN'.
*criteria-CHARACTER = '0000000633'.
*Append criteria.
*criteria-ITEMNO_ACC = '1'.
*criteria-FIELDNAME = 'KDPOS'.
*criteria-CHARACTER = '000010'.
*Append criteria.
*criteria-ITEMNO_ACC = '1'.
*criteria-FIELDNAME = 'VKGRP'.
*criteria-CHARACTER = '009'.
**Append criteria.
* All tables filled - now call BAPI.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
EXPORTING
documentheader = doc_header
IMPORTING
OBJ_TYPE = doc_header-obj_type
OBJ_KEY = doc_header-obj_key
OBJ_SYS = doc_header-obj_sys
TABLES
* criteria = criteria
accountgl = doc_item
ACCOUNTRECEIVABLE = doc_ar
currencyamount = doc_values
return = return
EXTENSION1 = EXTENSION1.
LOOP AT return WHERE type = 'E'.
EXIT.
ENDLOOP.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = doc_header
IMPORTING
OBJ_TYPE = doc_header-obj_type
OBJ_KEY = doc_header-obj_key
OBJ_SYS = doc_header-obj_sys
TABLES
* criteria = criteria
accountgl = doc_item
currencyamount = doc_values
return = return
EXTENSION1 = EXTENSION1.
LOOP AT return WHERE type = 'E'.
EXIT.
ENDLOOP.
IF sy-subrc EQ 0.
WRITE: / 'BAPI call failed - debug and fix!'.
ELSE.
CLEAR return.
REFRESH return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
* EXPORTING
* WAIT =
IMPORTING
return = return.
WRITE: / 'BAPI call worked!!'.
WRITE: / doc_header-obj_key, ' posted'.
ENDIF.
Regards
Raju Chitale
Edited by: Raju Chitale on Dec 18, 2008 8:31 AM -
The red, green and yellow buttons in the upper left corner of the screen disappear whenever I open Safari. I cannot minimize the Safari window which I often need to do if I am coordinating multiple windows between different applications. Does anyone know how to get those buttons back? I guess I could just switch betwen appliations, but I am used to doing it the other way.
You're welcome
You had Safari in full screen mode.
Maybe you are looking for
-
Cable? Old Sony Camcorder to New iMac (Thunderbolt or USB)
I have a new iMac with only USB and Thunderbolt ports. I'd like to import old Digital 8mm taped recordings from my Sony DCR-TRV460 camera. I used to use my firewire 4-pin (camera) to firewire 800 (macbook pro) but as I said the iMac has only Thunde
-
How do you embed a pdf into a pdf?
I have a word document, that has files embedded in it. There are excel, word, ppt and pdf files embedded in it. I want to convert the word document to a pdf but want the pdf to contain the embedded docs within it.
-
Problem with Message Collecting in BPM
Hello, I want to develop a Business Process, which collects messages with the same ID. After 5 minutes the process should send all messages in one new message. I copieed the XI 3.0 Demo Process "BpmPatternCollectTime". My problem is, that only the fi
-
MPG file, used QT7.x Pro to convert to iPod: No Sound
I have some MPG files from my camera and when I load them into iTunes, they work, but I cannot get them on my iPod. When I run the iPod convert (either in iTunes or QT7Pro) The conversion works, but the video has no sound. Any ideas?
-
hello o all once again, so i was worried about my MBP being slower and posted a lot of questions on here.... so today i was doing the backup with time machine of everything.... and my computer just turned off.... so i tried to restarted and i hear th