How to go to a random frame and stop ?
Hello there,
I have a little problem and I can't seem to find any solutions.
What I want is my symbol (="pijl1" in which there are 4 different keyframes on the timeline) to show just one of the keyframes, randomly, and then stop.
(I'm trying to make a game like this http://www.youtube.com/watch?v=sYGJ0TRWdRM in which my symbol would be one of the random arrows)
I made this:
import flash.events.Event;
var pijl1:pijl=new pijl();
pijl1.addEventListener (Event.ENTER_FRAME, randomdirect)
function randomdirect (event:Event) {
var randomFrame:Number=(Math.floor(Math.random()*4)+1);
trace (randomFrame);
pijl1.gotoAndStop (randomFrame);
addChild (pijl1);
pijl1.x=200
pijl1.y=200
but it won't stop. It just keeps on going (the output goes crazy).
I don't know if I made myself clear. But if someone understood my problem, could you please help me out ?
Piw
Your enter frame loop constantly "overrides" your gotoAndStop function.
you could simply remove the eventlistener after the gotoAndstop funtion
pijl1.gotoAndStop (randomFrame);
pijl1.removeEventListener (Event.ENTER_FRAME, randomdirect)
Similar Messages
-
How to merge borders of repeating frame and frame objects?
Hi All,
I have a repeating frame inside a frame.
Can someone tell me how to merge borders of repeating frame and frame objects?
I have searched this forum and spent lot of time. But I think I am missing simple thing.
THanks,
SathishI think 'Flex' mode is on. Change to Off. Flex mode icon is on the paper layout editor. For more, search report help for
Changing the current mode -
We have 3 locations coming up for our TV listings how do we make one the default and stop others?
There is Bed Room, Living Room and Family how can we make ONLY FAMILY COME UP?
When we check the listings or record from the TV Listing the LIVING ROOM comes up and only the Family has the controls to record.
THANK YOU.
Solved!
Go to Solution.Please provide more details.
What equipment do you have?
Where do you see this listing? On STB? Online? Verizon App?
If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem. -
in my iPhoto library i have photos of web pages i don't know how they got there there are hundreds of them ,how do i get rid of them and stop them please help me as i have no idea many thanks
im sorry to be a bit thick here i didnt know this was happening until i looked through all my photoes i use an sd card to put pictures on lap top and icloud from my phone but in library there are all web pages i have ever been to ie face book ebay etc i didnt know if there was any thing i should be turning off many thanks for ur last answer though
-
Why is itunes randomly starting and stopping?
I am running itunes on an iMac running MacOS 10.6.8. itunes is randomly starting and stopping. If there a fix for this?
I am having the same problem. I have recently bought and now use a track pad on my iMac. Also, I bought an app, rowmote that turns my iPhone as a remote.
-
How can I create a random number and letter in a text field...
Hi All,
I am using application express. I want to get a random number and letter for a text field but not sure how to do this. Say I have a licence form and I want to get the licence number automatically when user wants to create a new licence and it needs to be unique. The format I am looking for is - HQ2631 something like this.
I am thinking I have to create a trigger but not sure how to go about this....
advanced thanks,
TajuddinSomething to play with:
Your method can generate 26 * 26 * 10000 different licence_ids
Generating one million ids takes 20 seconds but produces between 70000 and 80000 duplicates and is rapidly getting worse (if that is something over 7%, doubling the ids generated that grows to something under 30%)
Just see if you can live with that.
select sum(collisions) all_duplicates,count(*) distinct_duplicates,max(collisions) max_multiple
from (select licence_id,count(*) - 1 collisions
from (select DBMS_RANDOM.STRING('',2) || trunc(DBMS_RANDOM.VALUE(1000,9999)) licence_id
from dual
connect by level <= :to_generate
group by licence_id
having count(*) > 1
)Regards
Etbin -
How to take input in one frame and display it in other frame of same page?
I need to take input (text) for the comment field in one of the frames and when submit button is pressed it should be displayed in the other frame on the same page.
I am able to get the input from the user but its not reflected in the other frame which basically is a table...............so let me know if you guys have any suggestions
I used following code
<form name="input" action="<%= base_url %>/index.jsp?yr=<%= y %>&mon=<%= m %>&day=<%= d %>" method="post">
Comment:
<input type="text" name="comment" size="20"/>The trick is to define paintComponent to all applicable panels and pass the Graphics parameter to a separate method which does the drawing for you.
class Component1 extends JPanel
//blah blah blah - put your code here
public void paintComponent(Graphics g)
//insert setup functions here
paintStuff(g);
//more arbitary code
public void paintStuff(Graphics g)
//do your drawing here
}And you would usually want to separate your UI components from the drawing so it doesn't intefere with the client's perception of the program. In other words, don't draw on the content pane, draw on a custom panel and add it to an appropriate part of the content pane.
Stephen -
How to use counter as an start and stop trigger in 6009
Hi ALL.
I'm using USB 6009 as a subject of to acquire data.
I would like to know on how to use the counter digital input as a start and stop trigger.
The acquisition will only start when the first pulse of the digital signal is received and it will stop when the desired number of pulse is received.
I was trying to use the VI as attachment as my reference. However, after tried, the VI is not working for USB 6009 as the counter input cannot be used as a trigger.
I would be happy if anyone could suggest me some ideas on this matter.
Thanks.
Attachments:
DigitalStartandStopTrigger.vi 32 KBHi Kate.
Thanks for your response.
For your information, I've design my VI using the counter method. However, it doesnt work well. Please see the figure below. The file also attached with this reply.
At first, the first counter from Device 2 will start counting. If the counting equal 0, then the acquisition for Device 1/AIO also the counter of Device 1/ctr0 begin acquiring data and counting the edges respectively.
However, when I did the test, it doesn't work as wanted. It is happened because when counter of device 2 in not equal to 0, the acquisition for Device 1 not happened as it will go to false state.
Is there anything that someone could suggest on how to start the acquisition for device 1 only and if the counter of device 2 is equal to 1. I would like the acquisition of device 1 start only when the counter of device 2 is equal to 1. I cannot use the trigger as 6009 is not support for it.
-Fird-
Message Edited by Fird on 07-02-2009 04:28 AM
Attachments:
Acquire Data Test 4.vi 27 KB -
How to control the line in--- PLAY and STOP ?
Hi,
This is the volume control library downloaded from NI wed site .It is help for my task.
My task is to control the line in with LabVIEW, for example STOP, PLAY and adjust volume with LabVIEW button.Though the example I see the volume control can be enablement.But I don't know how to design the PLAY and STOP button.
I see it is similar to the volume control.There is function to control the the PLAY and STOP in the system Library-winmm.dll. I don't know whether all I think is right.I have the following serial question. How to use the function?How to understand the system Library?I can't acquire some information from it and I don't know the input and output parameter in the funcion.
Can any one help me out please?
I'm sorry that my English is poor.
Thanks.
lizhi
Attachments:
VolCtrl.llb 193 KBI assume you are referring to audio line-in volume control and lerft-right balance...
If so, then check out this thread:
http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000D83A0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0
Look at the info near the bottom from Paul S & Spectre. They talk about "winmm.dll"
-cheers-
JLV -
I upgraded to v 10.0.2
I can't access the reload page and stop loading page buttons on the navigation toolbar, or add them to the toolbar, although I see them on the toolbar when I select Customize.Hi,
Please try to '''Reset toolbars and controls:''' and '''Make Changes and Restart''' in the [https://support.mozilla.org/en-US/kb/Safe%20Mode Safe Mode] start screen. Please note that you may have to customize the previous personal settings again. [https://support.mozilla.org/en-US/kb/how-do-i-customize-toolbars Customizing] -
Goto a new frame and stop the current movie clip?
In cs5.5, I have a frame with a movie clip on it. When a user clicks a button, I want the movie clip to stop and the user to be directed to another frame. It is correctly redirecting to a different frame, however, the movie clip is still on the stage and playing. How can I modify the following code to make it not just go to a different frame, but also stop the movie clip that is on that frame from playing?
btn_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);
function fl_ClickToGoToAndStopAtFrame(event:MouseEvent):void
gotoAndStop(10);That worked, it stopped the movie clip, however, the movie clip still shows on other frames. How do I modify the code to not only stop the movie clip but to make it disappear on the other frames?
Thanks!
btn_1.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);
function fl_ClickToGoToAndStopAtFrame(event:MouseEvent):void
movieClipInstanceName.stop();
gotoAndStop(10); -
The message icon on my iphone indicates that there is an unopened text message, but when i go into it, it just opens up a blank message, and there is no option to delete it. Any suggestions how i can get rid of this message, and prevent my phone from always opening up in the blank message whenever i go into my messages, rather than just opening as my inbox?
Many thanksHard restart.. While the phone is powered in, hold the power and home button. Hold them down and keep them held down. the phone will eventually shut itself off and reopen. keep held down till you see the appl elogo, then release. This will not delete anything off your phone, it will just force all apps to stop their current process. If you just turn the phone on and off, it will just pick up where it left off. Good luck
-
How to process very large internal tables and stop time limit
Hello Experts,
I am currently having a problem on how to fix a certain report where we process more than 500 thousand
records in the internal table. I can't think of any solution that can make the below code any faster.
I just checked in our prod server and the error time limit exceeded stops in the loop statement. Anyway,
Below is the code. Any input will be appreciated. Thanks guys and take care!
Get sales document and corresponding line item
SELECT avbeln bposnr a~auart
avkorg avtweg a~kunnr
bmatnr bpstyv b~spart
FROM vbak AS a
INNER JOIN vbap AS b
ON avbeln = bvbeln
APPENDING TABLE lt_vbap
WHERE a~auart IN lr_auart
AND a~vbeln IN s_vbeln
AND a~vbeln IN s_vbill
AND a~vbtyp EQ p_vbtyp.
LOOP AT lt_vbap ASSIGNING <wa_vbap>.
IF <wa_vbap>-auart EQ 'ZUCI' OR
<wa_vbap>-auart EQ 'ZURV' OR
<wa_vbap>-auart EQ 'ZUPR'.
Check ifa delivery document has been created
CLEAR wa_vbill.
SELECT SINGLE vbeln
FROM vbfa
INTO wa_vbill
WHERE vbelv = <wa_vbap>-vbeln
AND ( ( vbtyp_n EQ 'J' AND vbtyp_v = 'C' )
OR ( vbtyp_n EQ 'T' AND vbtyp_v = 'H' ) ).
IF sy-subrc <> 0.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ELSE.
Check if within selection parameters
CLEAR wa_likp.
READ TABLE lt_likp INTO wa_likp WITH KEY vbeln = wa_vbill.
IF sy-subrc <> 0.
SELECT SINGLE *
FROM likp
INTO wa_likp
WHERE vbeln = wa_vbill.
APPEND wa_likp TO lt_likp.
ENDIF.
IF NOT wa_likp-wadat_ist IN s_erdat.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
ENDIF.
ELSE.
Check if this has already been billed
CLEAR wa_vbill.
SELECT SINGLE vbeln
FROM vbfa
INTO wa_vbill
WHERE vbelv = <wa_vbap>-vbeln
AND ( ( vbtyp_n EQ 'M' AND vbtyp_v = 'C' )
OR ( vbtyp_n EQ 'O' AND vbtyp_v = 'H' ) ).
IF sy-subrc <> 0.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ELSE.
Check if within selection parameters
CLEAR wa_vbrk.
READ TABLE lt_vbrk INTO wa_vbrk WITH KEY vbeln = wa_vbill.
IF sy-subrc <> 0.
SELECT SINGLE vbeln fkdat
FROM vbrk
INTO wa_vbrk
WHERE vbeln = wa_vbill.
APPEND wa_vbrk TO lt_vbrk.
ENDIF.
IF NOT wa_vbrk-fkdat IN s_erdat.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
ENDIF.
ENDIF.
Get Material Type and Division
IF <wa_vbap>-spart IS NOT INITIAL.
SELECT SINGLE mtart
FROM mara
INTO lv_mtart
WHERE matnr = <wa_vbap>-matnr.
ELSE.
SELECT SINGLE mtart spart
FROM mara
INTO (lv_mtart,<wa_vbap>-spart)
WHERE matnr = <wa_vbap>-matnr.
ENDIF.
If material division is same as parameter division
IF <wa_vbap>-spart = p_spart.
If material is subsidiary-owned
IF <wa_vbap>-spart in lr_spart.
If customer is the same as that of parameter division
IF <wa_vbap>-kunnr NE lr_kunnr OR <wa_vbap>-auart EQ 'ZUDO' OR <wa_vbap>-auart EQ 'ZUS3'.
If item is a free good, tag order type as 'ZUPR' to treat
the item the same way as 'ZUPR'
IF <wa_vbap>-pstyv = 'TANN' OR
<wa_vbap>-pstyv = 'ZKNF' OR
<wa_vbap>-pstyv = 'ZKNN' OR
<wa_vbap>-pstyv = 'ZFLO' OR
<wa_vbap>-pstyv = 'ZKBF' OR
<wa_vbap>-pstyv = 'ZKLN' OR
<wa_vbap>-pstyv = 'ZREN'.
lv_auart = <wa_vbap>-auart.
IF lv_auart EQ 'ZUPR'.
CLEAR <wa_vbap>-pstyv.
ENDIF.
<wa_vbap>-auart = 'ZUPR'.
CLEAR: lv_mtart.
ENDIF.
Set Cost of Goods Sold Account
<wa_vbap>-cogshkont = '0050000010'.
CASE <wa_vbap>-auart.
WHEN 'ZUPR'.
CASE lv_mtart.
WHEN 'ZUL4'.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
WHEN OTHERS.
Check if division is defined in mapping table
READ TABLE lt_ulsub INTO wa_ulsub
WITH KEY spart = <wa_vbap>-spart.
IF sy-subrc = 0.
<wa_vbap>-kostl = wa_ulsub-kostlp.
<wa_vbap>-bukrs = wa_ulsub-bukrsp.
<wa_vbap>-type = 'TP'.
Set Cost of Goods Sold Account
IF lv_auart = 'ZUPR'.
<wa_vbap>-cogshkont = '0050000006'.
ENDIF.
ELSE.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
ENDCASE.
WHEN 'ZUCI' OR 'ZUDO' OR 'ZURD' OR 'ZUS3'.
Get cost center from header text
PERFORM get_cost_center USING <wa_vbap>-vbeln
CHANGING <wa_vbap>-kostl.
* Change by LGTE 11-02-2006
Check if Medvale sales
IF <wa_vbap>-auart EQ 'ZUCI' AND <wa_vbap>-kostl IS INITIAL.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
Check if UL Cost Center
ELSEIF <wa_vbap>-kostl NE gv_ul_kostl.
IF <wa_vbap>-kostl NE gv_ul_kostl.
* End change.
Get material division and check if subsidiary product
SELECT SINGLE spart FROM mara INTO <wa_vbap>-spart
WHERE matnr = <wa_vbap>-matnr.
READ TABLE lt_ulsub INTO wa_ulsub
WITH KEY spart = <wa_vbap>-spart.
IF sy-subrc = 0.
Get requestor's company code from cost center data
SELECT SINGLE bukrs
FROM csks
INTO <wa_vbap>-bukrs
WHERE kokrs = lc_kokrs
AND kostl = <wa_vbap>-kostl
AND datbi GE sy-datum
AND datab LE sy-datum.
IF sy-subrc = 0.
For donations, only include if a subsidiary company is donating
IF <wa_vbap>-auart EQ 'ZUDO' OR <wa_vbap>-auart EQ 'ZUS3'.
IF NOT <wa_vbap>-kunnr IN lr_kunnrnt.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
CHECK <wa_vbap>-kunnr IN lr_kunnrnt.
ENDIF.
For ZUCI, if the company code of the costcenter is UL, do not include
IF <wa_vbap>-bukrs EQ gc_ul_bukrs.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
IF <wa_vbap>-bukrs = wa_ulsub-bukrsp.
<wa_vbap>-type = 'RV'.
ELSE.
<wa_vbap>-type = 'RV'.
ENDIF.
ELSE.
Check if customer defined in table ZFI_DONATIONS
SELECT SINGLE kunnr FROM zfi_donations INTO <wa_vbap>-kostl
WHERE kunnr = <wa_vbap>-kostl.
IF sy-subrc <> 0.
lv_error = 'X'.
CONCATENATE 'Cost center/Customer' <wa_vbap>-kostl
'does not exist. Please check Sales Order'
<wa_vbap>-vbeln
INTO lt_disp-message SEPARATED BY space.
lt_disp-type = 'E'.
<wa_vbap>-del_ind = 'X'.
APPEND lt_disp.
CONTINUE.
ELSE.
<wa_vbap>-type = 'RV'.
ENDIF.
ENDIF.
ELSE.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
ELSE.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
WHEN OTHERS.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDCASE.
ELSE.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
ELSE.
<wa_vbap>-del_ind = 'X'.
CONTINUE.
ENDIF.
Get company code description
SELECT SINGLE butxt FROM t001 INTO <wa_vbap>-butxt
WHERE bukrs = <wa_vbap>-bukrs.
IF sy-subrc <> 0.
SELECT SINGLE name1 FROM kna1 INTO <wa_vbap>-butxt
WHERE kunnr = <wa_vbap>-kostl.
ENDIF.
Change by LGTE on 11-02-2006
Get Transaction Type
CASE <wa_vbap>-auart.
WHEN 'ZUPR'. "UL Promo/Samples
IF <wa_vbap>-pstyv = 'TANN' OR
<wa_vbap>-pstyv = 'ZKNF' OR
<wa_vbap>-pstyv = 'ZKNN' OR
<wa_vbap>-pstyv = 'ZFLO' OR
<wa_vbap>-pstyv = 'ZKBF' OR
<wa_vbap>-pstyv = 'ZKLN' OR
<wa_vbap>-pstyv = 'ZREN'.
<wa_vbap>-ltext = 'Free Goods'.
ELSE.
<wa_vbap>-ltext = 'Product Samples'.
ENDIF.
WHEN 'ZUDO'. "Donations - R/3
<wa_vbap>-ltext = 'Donations - R/3'.
WHEN 'ZUCI'. "Donations - ZUCI
<wa_vbap>-ltext = 'Donations - ZUCI'.
WHEN 'ZURD' OR 'ZUS3'. "UL Returns - Donation
<wa_vbap>-ltext = 'UL Returns - Donation'.
ENDCASE.
Get material description
SELECT SINGLE maktx
FROM makt
INTO <wa_vbap>-maktx
WHERE matnr = <wa_vbap>-matnr
AND spras = sy-langu.
Get division from material master
SELECT SINGLE spart FROM mara INTO <wa_vbap>-spart
WHERE matnr = <wa_vbap>-matnr.
Get division description
SELECT SINGLE vtext
FROM tspat
INTO <wa_vbap>-vtext
WHERE spras = sy-langu
AND spart = <wa_vbap>-spart.
Get Valuation Class
SELECT SINGLE bklas
FROM mbew
INTO lv_bklas
WHERE matnr = <wa_vbap>-matnr.
Determine G/L of FG Based on Valuation Class
READ TABLE lt_val_cls INTO wa_val_cls WITH TABLE KEY bklas = lv_bklas.
<wa_vbap>-fghkont = wa_val_cls-hkont.
Determine Cost Center of Cogs Account
READ TABLE lt_ulsub INTO wa_ulsub WITH TABLE KEY spart = <wa_vbap>-spart.
<wa_vbap>-cogskostl = wa_ulsub-kostlp.Hi!
First of all, don't use SELECT SINGLE inside of LOOP,
instead SELECT all relevated rows before LOOP in intertal tables (using FOR ALL ENTRIES) and then use
READ TABLE WITH KEY BINARY SEARCH.
it will match faster.
for example:
IF NOT lt_vbap[] IS INITIAL.
SELECT vbeln
FROM vbfa
INTO lt_vbill
FOR ALL ENTRIES IN lt_vbap
WHERE vbelv = lt_vbap-vbeln.
ENDIF.
SORT lt_vbap BY vbeln.
READ TABLE lt_vbill WITH KEY vbeln = <wa_vbap>-vbeln
BINARY SEARCH. -
How can i block stolen iphone 4 and stop all of its functionalities?
I lost my IPHONE 4 just few hours ago. I dont know how block all of its functionalities so no one can use it. I have the application of "Find My Iphone" turned on but I dont know how to use it. I dont even know my IMEI or Serial number. I am asking how can I retrieve it from my iCloud Account.
For those who could help me you can contact me at my Email account:
<Email Edited by Host>
Thanks!
Khen22First, it's a really bad idea to put your email address in a post to a public forum where millons of people, including some who have less than stellar ethics, will see it. At the least you will now be on thousands of spammer lists.
Log in to your account using your Apple ID and password at https://www.icloud.com and click "Find my iPhone". -
How can I unregister an old number and stop using it when I imessage or use Facetime?
Hello!
I just got a new iPhone and an old number appeared on the list of addresses that can be used while on iMessage or Facetime. How can i unregister it?
Thanks for the help!Hi there WebTee,
You may find the information in the article below helpful.
iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage
http://support.apple.com/kb/HT5538
Unlink a phone number
To remove a phone number from an Apple ID, sign out of FaceTime and Messages on your iPhone:
Settings > Messages > Send & Receive. Tap your Apple ID, then tap Sign Out.
Settings > FaceTime. Tap your Apple ID, then tap Sign Out.
This should remove your phone number from other devices using the same Apple ID with FaceTime and Messages. If the phone number is still available on other devices after you sign out of FaceTime and iMessage on the iPhone, you may need to sign out of iMessage and FaceTime on all your devices, then sign in to FaceTime and Messages again on devices you want to use.
Note: If you no longer have access to the iPhone that is using the number you want to remove, reset your Apple ID password.
-Griff W.
Maybe you are looking for
-
How many computers can I use Lion on? Do I need to use them on one ID?
Hello, My house has exactly 5 Mac's in it and I wish to upgrade all of these to Lion. In the past whenever I did an OS update I purchased the family pack instead of the standard edition which covered all 5 of the Mac's we own. Am I correct that now
-
Displaying multiple roles related to a single key value in a single view MVC 4
Dear Team, My name is Ajay Sutar. I am newly learning MVC 4, as we are about to initiate a new project in ASP .NET MVC 4. I am using a details scaffolding to display a single record. but now my single employee have multiple roles. As exampl
-
Intercompany Billing and GTS Export
Hello All, We have an inter-company billing scenario. As you may know, the Scheduling Agreement (S/A) has the Sales Company code (in this case our sister company in the EU) with the delivering plant in the US. When the S/A is sent to GTS, because of
-
URGENT:Oracle reports pdfs
Hello, I am working on oracle reports10g(10.1.2.0).i am new to it.Can anyone help me in finding good developer guide to learn oracle reports .
-
EK00 not triggered for batch split items
Hi experts, I have configured output type EK00 for picking List, here's what I've done, 1)V/38: Verified O/P type EK00. 2) OVLT: assigned shipping point to o/p type. 3) VP01SHP: maintained print parameters for shipping point. It works fine for non- b