Detect which object is clicked on several objects.
I want to make a game where it randomly generates a map, and players can click on the objects in the map. I want something that can happen to this object and I want the game to detect which item has been clicked and temporarily assign a name to this object so that I can do things for this object, I want the name to crush when I click on an object and want to be able to get back what I've done for other objects. Any help would be appreciated.
Thank you, you me headed in the right direction, here is my result:
public var target
public void DirtBlock() {//dirt given birth block
trace ("SPAWNED")
this.addEventListener (MouseEvent.CLICK, fl_click)
}
function fl_click(event:MouseEvent):void {//dirt clicked block
var dirtblock:DirtBlock = new DirtBlock();
trace ("clicked")
(Event.currentTarget) evidence //traces object that was clicked (object, dirtblock)
target = event.currentTarget// defines the purpose of 'target' so it can be manipulated
Target.Visible = false
Tags: Adobe Animate
Similar Questions
-
Database objects can be replicated using Oracle Streams and which object cannot be replicated?
Hi Experts,
I need clarification on the sub questions,.
Database objects can be replicated using Oracle Streams and which object cannot be replicated?
How can we check that what schema and objects are used streams replication and which schema and objects is not used in the replication stream?
Thanks in advance.
Select *.
of dba_streams_unsupported
where owner | '.' || table_name (...)order by 1, 2, 3;
-
Advanced action scripts - y at - it a variable that tells me which button is clicked?
Lilybiri gave me some great tips on the use of conditional tip action scripts. Now, I have another related question.
I have three buttons A, B and C. Each button performs exactly the same series of actions to hide everything on the page, but shows another group of objects depending on which button was clicked - that is, to display the Group A and Group B group C.
Currently, I have a separate advanced action script for each button (in fact a lot more than three) because of this difference, then want to combine in a single conditional script. However, I can't understand how I would like to know which button was clicked. In other words, I think that my conditional script should look like this:
The condition "always."
If 1 is equal to 1
[Script to hide all]...
Continue
Condition 'has '.
If MyButton is equal to 'A '.
See the group_A
On the other
Continue
Condition 'B '.
If MyButton is equal to 'B '.
See the group_B
On the other
Continue
Condition 'C '.
If MyButton is equal to 'C '.
See the group_C
My problem is that I don't know how to set or get the value of MyButton to perform conditional tests. Is there a system variable that returns the value of a selected object? I looked at all the variables, and I don't see one. Or y at - it another way to do what I'm missing?
You probably can find with Javascript, but not with advanced actions. All the available system variables that can be used - there are more - are in a table that you can download here: System variables in Captivate 8 - Captivate blog
I have several articles on the shared use of stocks. You apply the same instance of a common action several times and don't have that to indicate parameters, in your case these parameters will be for most groups and objects. I hope that stocks shared will expand more in the future. They have several advantages: given that you use multiple instances of the same action that they do not increase the file size as duplicate advanced actions. In addition, you have them in the library that makes management much easier.
-
DataGrid detect SINGLE/DOUBLE mouse click
Hello
I know that datagrid can detect changes in the mouse right-click
Add listener
myDataGridList.addEventListener (Event.CHANGE, myDataGridListChange);
public void myDataGridListChange(e:Event):void {}
trace (myDataGridList.selectedItem.id);
}
but they can detect the double mouse click?
My goal to do that is, if the user double clicks on a row of datagrid, I need me return the value of myDataGridList.selectedItem.id, while I am able to continue to proceed to the next step in my game.
Thank you
-Zainuu
You must activate your datagrid receive doubleclick events:
myDataGridList.doubleClickEnabled = true;
myDataGridList.addEventListener (MouseEvent.DOUBLE_CLICK, f);
function f(e:MouseEvent):void {}
//
}
-
I have four buttons on the frame one. When one of the buttons is activated, it then goes to two glory. There is not much difference between what the buttons do: addition, subtraction, multiplication and division. Ideally, the program would be
(1) check which button is clicked
2) go to section 2
(3) according to the which button has been clicked frame 1, make an addition, subtraction, multiplication, or division
I have a few questions
(1) is there a simple way to check which button has been clicked? I guess you could have different function calls in the function addEventListener for each button and then write a different function for each button. But I was wondering if there is a way to do it with if statements? This means that the same function is called in addEventListener for each button, press function controls which button triggered the function call. The code below shows what I would do (including pseudocode).
(2) how do I pass a variable of framework one part two? Here I could have 4 frames separate (one for each arithmetic operation), but I prefer not to have that one frame and pass the exact operator (+, -, *, /) to frame two and have then framework both make an addition, subtraction, multiplication or division according to operator was passed.You add to that more than complexity it takes probably, but I don't see the whole picture, so I'll cover a little.
You can use the events received by the function to determine which button was clicked:
var btnClicked:String;
function fnSolve(event:MouseEvent):void {}
btnClicked = event.target.name;
}btnAdd.addEventListener (MouseEvent.CLICK, fnSolve);
btnSubtract.addEventListener (MouseEvent.CLICK, fnSolve);
btnMultiply.addEventListener (MouseEvent.CLICK, fnSolve);
btnDivide.addEventListener (MouseEvent.CLICK, fnSolve);I don't know why you want to go to frame 2, but that's fine. You don't need to pass a variable to two of the frame, just to extend your actionscript layer up to now and whatever variables live in frame 1 are available in the frame 2 automatically.
The part of the function if() of this function could be moved to the 2 structure, if the function frame 1 would only need to be really...
function fnSolve(event:MouseEvent):void {}
btnClicked = event.target.name;
gotoAndStop (2);
}and in part 2, you would have...
If (btnClicked == "btnAdd") {}
Add stuff
} Else if (btnClicked == "btnSubtract") {}
subtract stuff
} else if... etc. -
Add several lines in tabular form which object to list different shows to all rows
Hello
Apex 4.2, oracle 11 g 2
I have a table on the emp table where when I click on Add button line
then I get no lines that are stored in the string.
for this element of the page creation PX_job that return the value of separate employment with two points separate values by the
for example seller: Analyst: Clerk: Manager: President
to add several lines to add lines.
by using the dynamic action
event: click on
selection type: button
Action: run javascript code
as follows
var a = $v("PX_job").split(":") // Delimiter is a string for (var i = 0; i < a.length; i++) { apex.widget.tabular.addRow(); }
This work that well it adds the number ranks equal to 5
now I'm post job as select list
now I want to display the list of work in form of tables as row 1 poster list entry, second row entry list second poster... last line shows last entry from list
but working this column in all the rows by first writing list of projects in the work list
How to solve this problem.
Leave.
Hi, go,
Yes, you need to replace "myvalue" with the return value of the select list. But even in this case it would be a problem because it would change all the lines.
In any case, I changed the code to do this:
apex.widget.tabular.addRow (); Add the line
var checkboxIndex is apex.jQuery('input[name=f01][value=0]').eq (i) .parent () .parent () .index ();. get the number of the line that was added
var SelectItem = apex.jQuery('select[name=f04]').eq (checkboxIndex); Use this number to get the selection list
iOption var = apex.jQuery (SelectItem) .children () .eq (i) .val (); Get the i option value
apex.jQuery (SelectItem) .val (iOption); Set the value of the option
I hope it's clear.
Kind regards
Joni
-
How to detect smart objects in Photoshop?
Hello
I need to detect the smart objects files related to local level to specific JavaScript locations in the HTML5 extension. How can I do this?
Consider this pseudo-code:
if (app.documents.length) { var doc = app.activeDocument; for (var ilayer = 0; ilayer < doc.artLayers.length; ilayer++) { var layer = doc.artLayers[ilayer]; if (LAYER_IS_LINKED_SMART_OBJECT(layer)) { var localFilePath = GET_SMART_OBJECT_REFERENCED_FILEPATH(layer); } } }
Here, I need implementations of two functions:
1 LAYER_IS_LINKED_SMART_OBJECT()
2 GET_SMART_OBJECT_REFERENCED_FILEPATH()
Thank you in advance!
Here is the final solution (with no error checking):
if (app.documents.length) { var doc = app.activeDocument; for (var ilayer = 0; ilayer < doc.artLayers.length; ilayer++) { var layer = doc.artLayers[ilayer]; if (layer.kind == LayerKind.SMARTOBJECT) { var ref = new ActionReference(); ref.putIdentifier(charIDToTypeID('Lyr '), layer.id ); var desc = executeActionGet(ref); var smObj = desc.getObjectValue(stringIDToTypeID('smartObject')); var localFilePath = smObj.getPath(stringIDToTypeID('link')); } } }
-
Determine which objects are encapsulated in Oracle
Hello
I use a process that uses DBMS_DDL. CREATE_WRAPPED to wrap a few user_objects which exist in the schema.
I might need to perform this procedure by different users and do not want to encapsulate the objects that are already wrapped.
How can I know who the user_objects which are not packaged/wrapped?
Thank you
SharminSharmin Jose wrote:
How can I know who the user_objects which are not packaged/wrapped?Well, there is no view data dictionary which show this info. However you can get it from data dictionary tables. Keep in mind, data dictionary table structure is not documented and therefore can change between versions:
SQL> CREATE OR REPLACE PROCEDURE P_NOT_WRAPPED IS BEGIN NULL; END; 2 / Procedure created. SQL> exec DBMS_DDL.CREATE_WRAPPED('CREATE OR REPLACE PROCEDURE P_WRAPPED IS BEGIN NULL; END;'); PL/SQL procedure successfully completed. select owner, object_name, case bitand(options,2) when 0 then 'NOT WRAPPED' else 'WRAPPED' end wrapped from sys.procedure$, dba_objects where object_id = obj# and owner = USER and object_name in ('P_WRAPPED','P_NOT_WRAPPED') / OWNER OBJECT_NAME WRAPPED ------------------------------ ------------------------------ -------------------- SCOTT P_NOT_WRAPPED NOT WRAPPED SCOTT P_WRAPPED WRAPPED SQL>
Another method would look for word wrapped in DBA_SOURCE. Something like:
select owner, name, case when regexp_like(UPPER(text),'^PROCEDURE ' || name || ' WRAPPED') then 'WRAPPED' else 'NOT WRAPPED' end wrapped from dba_source where owner = USER and name in ('P_WRAPPED','P_NOT_WRAPPED') and line = 1 / OWNER NAME WRAPPED ------------------------------ ------------------------------ -------------------- SCOTT P_NOT_WRAPPED NOT WRAPPED SCOTT P_WRAPPED WRAPPED SQL>
SY.
-
For which objects (on 40 in db) can create synonym?
Hello
For objects (on 40 in list below) we can create synonym?
SQL > Select DISTINCT object_type from dba_objects;
OBJECT_TYPE
-------------------
CONSUMER GROUP
INDEX PARTITION
SEQUENCE
QUEUE
ANNEX
TABLE PARTITION
RULE
JAVA DATA
PROCEDURE
OPERATOR
PARTITION OF LOB
WINDOW
LINK TO DATABASE
LOB
PACKAGE
PACKAGE BODY
LIBRARY
SET OF RULES
PROGRAM
BODY TYPE
FRAMEWORK
JAVA RESOURCE
XML SCHEMA
TRIGGER
JOB CLASS
UNDEFINED
DIRECTORY
TABLE
INDEX
SYNONYM
VIEW
FUNCTION
WINDOWS GROUP
JAVA CLASS
INDEXTYPE
CLUSTER
TYPE
RESOURCE PLAN
EVALUATION CONTEXT
JOB
40 selected lines.10.2 SQL Reference:
>
The schema object for which you create the synonym can be of the following types:*
Table or table object
*View or object
*Sequence
*Package, function, or stored procedure
*Materialized view
*Java class schema object
*User-defined object type
*Synonym
-
Is there a way to find which object DB is used in which all pages
Hi all
Is there a way by which we can find database objects all serve them in which all pages in an Application. Our Application is large enough and has many pages, so is there any report as a feature where I can check the DB of the objects used on each page or any underlying view where you can get this information.
Thank you
VikasHi Vikas,
There are a couple of APEX views that provide you with this information.
If you go to home > utilities > Application Express views
more views may be useful:
-APEX_APPLICATION_PAGE_DB_ITEMS
-APEX_APPLICATION_PAGE_PROCThere are a few others (e.g. if make you use of tables flash interactive reports etc.) but if you start with the above, you'll have a good starting point.
Kind regards
Dimitri
----------------------------------
http://dgielis.blogspot.com/
http://www.apex-evangelists.com/
http://www.apexblogs.info/ -
Hi team,
I'm new to BI Publisher and is having a bit of a roadblock. I am trying to add parameters to a data set to show the records but that fall between a certain interval (between), I can't do this.
I see the parameters in the xml view, but it has no effect on the data, he returned. Also, how would you get it replicate a between condition?
Thank you and best regards,
Shriddy
You are on the latest version of BI EE, refer to what it gives an idea. http://www.Oracle.com/WebFolder/technetwork/tutorials/OBE/FMW/bi/BIP/bip11g/gettingstarted/gettingstarted.htm?print=preview#T3
-
I use one laptop HP with Windows 7 Pro 64 bit. Since last week, I had to click on the button on the left of the mouse several times to get a shortcut or an app to start. He does it with Word, I.E. 10 and shortcuts. I ran a check full antivirus with Avast Internet 8.0 and it found nothing. When I did a boot with Avast scan it reported that I had a virus. Suspecting it was a 'false positive', I also ran a full scan with Malwarebytes and free download of Sophos. Malwarebytes and Sophos found nothing. I reported it to Avast, and they told me to run a full scan mode without failure, which found nothing to. Then I did a scan of long hours many with ODILE - he found nothing.
I also tried to change the batteries in the mouse, but with the same problem. I don't know what to do next, just that I'm tired of the execution of comprehensive security analyses. Should I update the driver for the mouse?
Any suggestions will be most welcome!
Thanks, Terry
I suggest picking upward another mouse - borrow one if necessary to confirm that the mouse itself has problems. It seems that the contact for the left button is dirty or defective.
I'm moving your question to the area of the drivers for Windows 7 and hardware sections because it is most certainly not a malicious software.
Regarding the potential virus detected by Avast start-up analysis, I suggest you contact Avast.
-steve
-
Use the Click Box several times
Hi all
I have seen several posts on very similar topics but I'm looking for advice on my particular problem. I have a slide that contains multiple images. I would like to have the learner click images and an explanation of the image both written and spoken. I finished this ok using the standard box click a speech of fixation to the legend of success on. I would like to provide several opportunities to see the content of the learner. Out of the box, click boxes seem to work only once. I saw a few other messages that refer to advanced actions and the ability to reset the time that the object was used. Can you please direct me to either a lesson on this particular issue, or post a solution here...? I discussed intensively on the internet and found nothing so far. I use 6 Captivate. Thank you!
Daniel
Very well, if you think that this question is answered, could mark you like that?
Lilybiri
-
(OSControl Xtra) How to detect when a user clicks on the bottom and upward when
Hi all
How can I detect when I click on a scroll bar downwards and upwards? I want something like:
If sprite (1) ravishing (#down) then
-do something
on the other
If sprite (1) ravishing (#up) then
-do something else
Any ideas? The question applies only to the OS control xtra
I do not understand why you put the sprite.value and maxValue for
a global event #prepareFrame - can you explain to us why, and 'who' it is
who is responsible for these values?
I tried to "simplify" your script, but I don't have a clear picture
what your problem is - can you maybe post a simple example
somewhere that clearly demonstrates?
--
pSprite property
pScrollAmt property
Global tMaxVal, maxbarvalueon beginSprite (me)
pSprite = sprite (me.spriteNum)
end beginSpriteon prepareframe
pSprite.maxValue = maxbarvalue
pSprite.value = tMaxVal - position of the thumb
endUpdate (me, aClickedPart)
CASES (aClickedPart)
#up:
pScrollAmt = - 5#down:
pScrollAmt = 5#thumb:
If pSprite.value< tmaxval="" then="" pscrollamt="">
otherwise if pSprite.value > tMaxVal then pScrollAmt = 10
else exit
CASES OF TERMINATION-It is important to 'catch up' the return value when you create a
-timeout object, even if it is in a local variable that will be
-immediately go out of scope
t = timeout("scrollImage"&me.spriteNum).new (10, #sendScrollMessage, me)
end -
Determine which button is clicked/button
Hi guys, I have a question of n00bish (and more to come sorry)
I created an array of buttons (i.e. the name of the buttons are: buttonDelete [0, 1, 2,... etc])
so they FieldChangeListener for each button.
Currently, I made choice of 10 buttons (generated with loop for) and 10 FieldChangeListeners
10 FieldChangeListeners seems to be very inefficient, so my question is:
can I make a table of FieldChangeListeners so that if a button is pressed, correct FieldChangeListener used?
Thanks in advance!
You can have a single FieldChangeListener assigned to all 10 buttons. Then in the listener, you can test which button has been activated and send to the appropriate action:
FieldChangeListener listener = new FieldChangeListener() { public void fieldChanged( Field field , int context ){ if (field == buttonDelete[0]) { // respond to button 0 } else if (field == buttonDelete[1]) { // respond to button 1 } // etc. } };
It's very ugly. Depending on your needs, you may be able to reduce this to a loop for.
There is an approach much more if you can set up your logic button - in other words, if you can set the response so all buttons do the same treatment, only on different data. To do this, you can use setCookie/getCookie:
FieldChangeListener listener = new FieldChangeListener() { public void fieldChanged( Field field , int context ){ process( field.getCookie() ); } private void process( Object data ) { // process the data stored as a cookie in the activated button } }; Object[] cookies = { // array of data that parameterizes button processing logic }; for (int i = 0; i < 10; ++i) { buttonDelete[i] = new ButtonField( ... ); buttonDelete[i].setChangeListener( listener ); buttonDelete[i].setCookie( cookies[i] ); }
Maybe you are looking for
-
Portege R100 and new hard drive
I think to put in a larger capacity internal hard drive - 40G is now a little bit :( Does anyone do this? The traps? Any suggestions on compatible drives? TIA
-
Is it possible to change the keyboard to Portege M700?
Is it possible to change a U.S. keyboard in a German keyboard at the Portege m700? Is how easy it to change? How much is a German keyboard? Are there other differences between a U.S. and a German Version of the M700? Ty, welcomesThomas
-
Satellite A200 PSAF0A - cannot use the DVD writer / reader more
HelloAnyone has any advice on this? Laptop: Satellite A200, PSAF0ARequire: DVD burner / player sofware. My hard drive died last week, so a techno guy installed a new and reinstalled the OS (Vista)... everything works fine. But don't have Toshiba Util
-
Satellite L30-134 - LAN and audio driver problem
I installed the LAN driver but my internet is not working and I have problem whit my sound. I can't make it work in the speakers.
-
Vista & pc games pc Yahoo Games does not open after download