Clickable image
Can someone tell me how to make it appear a dialog box by clicking on an image?
Here is my sample code:
var pos2:Shape = new Shape(); pos2.graphics.beginFill(0xFF0000); pos2.graphics.drawRect(382,50,260,240); pos2.graphics.endFill(); pos2.addEventListener(MouseEvent.CLICK, openDialog); addChild(pos2); ... private function openDialog(event:MouseEvent):void { stage.nativeWindow.close(); var alert = new AlertDialog(); alert.title = "Warning"; alert.message = "This operation may harm your computer. Do you still want to proceed?"; alert.addButton("OK"); alert.addButton("CANCEL"); alert.addEventListener(DialogEvent.DIALOG_BUTTON_CLICKED, alertButtonClicked); alert.show(); }
Please and thank you!
Hey gyubok,
You can listen only MouseEvents on objects that implement or extend another class that implements the InteractiveObject class. Shapes are not part of this package. You will need to you something like a sprite in order to meet the MouseEvents such as click. Try to replace your shape with a sprite and see how that works for you:
var pos2:Sprite = new Sprite(); pos2.graphics.beginFill(0xFF0000); pos2.graphics.drawRect(382,50,260,240); pos2.graphics.endFill(); pos2.addEventListener(MouseEvent.CLICK, openDialog);addChild(pos2);
Hope that helps. Good luck!
Tags: BlackBerry Developers
Similar Questions
-
Button not clickable image in HTML5 Canvas export?
Everyone knows about this problem when you use an image as 'up' frame for a button symbol makes it not clickable when HTML5 canvas export?
Image button works when I "found" in Adobe animate CC, but when I export, it is not clickable, nor shows more status etc..
I tried to convert the image into an image in a button and a clip in a button, but does not solve the problem.
When I switch the contents of the frame button to a vector shape, it works fine.
Any ideas would be greatly appreciated.
Buttons do not seem to work perfectly. Even with the first image that contains a bitmap image.
Check if you use spritesheets. If you are and it's a JSON file, then things break. Use either don't not spritesheets, or put your files on a test server.
-
Blast from the past: how to draw clickable images in Dreamweaver CC 2014?
Need to update some old stuff and can´t find where to draw picture cards on the images.
First, you must be in Design mode to get the image map tools to appear.
Once there, the icons of image map should show when you select an image. If they are not, you can have your properties panel themselves are collapsed. There is a small triangle in the lower right corner of the properties panel, click that to expand the Panel to include the image tools.
-
Hello
I want to display an icon "favorite" that a user can click. Whenever a user clicks on the icon, I need to call a java method that I wrote which toggle favorite between true and false.
How can I accomplish this? What I need to use Javascript, or is it a component ADF I can use which has a property, I can put it.
Thank you!
MitchHello
You can sorround the image with the Commandlink and use the commandlink's action property to call the java method
Code:
shortDesc = 'test' id = "i1" / >
-
How to replace the image that contains clickable images?
I use RoboHelp HTML 8. Some of my help topics have an image that contains several interactive images that allow the user to click to see, for example, the field or button definitions on objects on this image. In the past, I was able to grasp or to create a new image file and give it exactly the same name as the old image file (for example, ccm_assessment_shg.gif)-a new replacing the old. and when I saw the image in RoboHelp HTML, the new image contain still all image maps of the original image.
However, now I see an image (.png) file in one of my subjects and I would like to replace it, but my old process 'replacement with the same name' does not seem to work. What is my problem? How can I do this in RoboHelp 8? Is the problem related to the file must be a gif instead of a png? (I must confess that it's been several months that I worked in RoboHelp, so I just forgot something. I can't find instructions on the use of image maps and self-help groups).
Thanks a lot for all the good advice!
Hello
Exactly how you try to replace the image? I ask, because if you open the dialog box Image and work this way, you will probably lose the connection with the regions of image maps. My preferred method is to simply work completely behind RoboHelp back by replacing the image using Windows Explorer. RoboHelp should be none the wiser as long as the file name and location are the same.
See you soon... Rick
Useful and practical links
Wish to RoboHelp form/Bug report form
Begin to learn RoboHelp HTML 7, 8 or 9 in the day!
-
In my flex-2 design, I have a need to put an image in the program, and then set the image points that trigger events.
In retail, I want a map of the United States, in which case the user is:
1 - click on a State.
2 - mouse on a State
(I haven't decided)
An event is raised I may popup a box and display data to the user.
I don't think I need to use a file pre-generated SWF to do this, as the flex should be able to handle this via AS - 3.
Here's a way to do it:
Create a new class that extends the canvas. Place your image (whether in the form of MXML or through ActionScript) in this class.
The class must have a child UIComponent are complemented by the Image so that it lies on top of the Image. In the updateDisplayList function or when the image has loaded (that is to say, certain events to trigger this), create a series of form s (see flash.display.Shape) object and add them to the UIComponent.
Draw your shapes with their graphical properties, but use a fill Uni with alpha = 0. You won't get the mouse events if only to draw something and alpha will make them invisible but selectable.
Add an eventHandler for the UIComponent to capture mouse clicks. The UIComponent will receive only clicks on the forms. You can then be shipping your own event depending on what form was taken or simply let the bubble of click event.
Note: you can draw directly on the chart of the UIComponent too, but it will be easier to say where the mouse was clicked if you use distinct forms.
Note: If you want to change the cursor in a helping hand on the form, set the UIComponent = "true" useHandCursor its buttonMode = "true"; its mouseChildren = "false". You need all 3 to see the hand cursor.
-
Hello
I open a new Jframe update whenever a user clicks on the "Update" button located on my main JFrame. Now, what I want is that user should not be able to click the update button again until it has cancel the update previously opened JFrame. I saw these senerios in which a user could do nothing else until it was close the open border as in the case of
Thanks and greetingsJOptionPane.showMessage....
UmerCreate the model instead of the JFrame JDialog.
-
How to make images orginated table ranked clickable report?
How do table came from the clickable images to the rank of report?
Do the small example application with page 4 click img which is IR report showing pictures of the table test_images and v1_test_images.
The v1_test_images is just seen on test_images that is necessary to seduce the 'blob format' to extract images from the same table on the same report.
Now, I would like to be able to click on the 'images' in the report and may for example branch to another page etc...
I know that on the line, there may be a clickable image from the shared components of work/application space images and the image name can be changed with sql.
But I would like to have multiple images on the same line and those who were taken from the table, as in the sample application.
workspace: imagetest_ws
application: 13418
page in question: https://apex.oracle.com/pls/apex/f?p=13418:4
user of the developer: guru
pass: meditation
rgrds Paavo
Doesn't seem to be possible to combine the BLOB format masks declarative with standard column links (it looks like a bug). What you can do is to use the
apex_util.get_blob_file_src
API method to get the URL of the image in the report query:... , apex_util.get_blob_file_src( 'P3_CONTENT' , case when e.sal > 2500 then 21 else 41 end) img1 ...
and create the link to the image in the HTML column report Expression attribute:
-
Image in the body of NotificationDialog
Hello
I try to include an image in the body of a triggered notificationDialog on the side without head of my application. I see several made BlackBerry applications such as calendar doing this. They have even managed to make the clickable image as ImageButton in qml.
Anyone know how I can achieve this? (image not clickage would be great to start)
Thank you.
* Edit: Added the screenshot of what I mean
I think his problem is that he use it to headless, as mentioned. Only NotificationDialog is available from headless.
-
How to open a link in the browser when clicking on Image?
I created a clickable image. Now, I want to open a link in the browser when clicking on Image.
How to get there?
Call Browser.getDefaultSession () .displayPage (String url)
-
Dreamweaver CC 2015.3 interactive images - Hotspots do drag and drop does not work
Dear all,
I use Dreamweaver CC 2015.3 and try to use the Image Map option. I'm not using it in Liveveiw so there must be another problem.
I have inserted a picture and give MapId image2. After that, I tried to drag and drop all three circle, polygon, and rectangle. Nothing happened.
No map tag is packed. Nothing happens. What is the reason?
Thank you
Amir
mamirs wrote:
... I have inserted a picture and give MapId image2.
As much I know "MapId" is not an attribute of html for creating / using the clickable images.
An image map using an attribute called 'well' in the tag which must match the attribute "name" of the
-
DREAMWEAVERCC 2015: Creating Image maps, please help!
I have had no problem of creating interactive images before this last update and now I can't even image to align, fine not the real problem: create and edit clickable images. Don't know what happened, I'm in a transitional doc 4.0 that I built the last image maps in. Now, the only way it appears is if I select the code, which is fine, but as soon as I try to draw the map/edit I'm stuck back.
Shot in the old code from the working file and I can't change it (same question, select code, option, select either the arrow select card or draw a shape, start drawing and then locked) so I'm not sure what should happen.
There are image maps for us in these pictures.
Are you accidentally in Live View mode?
Design and Live are now in a drop-down menu in the taskbar near Code and Split. The editor in Live mode does not image mapping again.
If you don't have the design view option in the dropdown menu with Live, you will need to make a small change to your fluid grid css file to retrieve.
If you are in Design mode and the Image Map tools are not displayed, you should see a small triangle at the bottom right of the main window of properties that you can click to retrieve the IM toolbar.
-
The picture card no longer works when the location of the image is changed
I spent a lot of time creating clickable images on a .png to a graphic image in Dreamweaver CS6. When I downloaded the file on the web, I realized that I had made the connection between a file that was in my downloads folder. When I changed the source for the file in Dreamweaver hotspots correspond more spots on the image! If I resize the image, the hotspots get resized too, so they no longer correspond. What can I do? The image is the exact same that was used originally, but I had resized it before adding the hotspots.
Thank you!!!
I found myself just to redo the map image to fit the new image. It was not as hard as I thought it would be. Based on questions from other people, I realized that there is no easy solution. Thanks a lot for your help!
-
JPG not accessing image map only or import media
I'm trying to link the WMV file with clickable images on a jpg file in a CHM created by RoboHelp 9. It seems that it works, and if I preview the page, the links work. But when I generate the CHM file completed, media are not accessible. I returned to the project manager and saw that the media had not imported to the project. I have a wen for the Windows file manager and media in the right area of the project. I tried to import as a medium and as a file. I tried as a luggage as well file by selecting the file in the destination list. Someone knows how to do this?
WIN7 TCS 3.5
Ok. I added the WMV files in hatracks then lie and output a new CHM file... it worked. Guess you have to do things a little different by connecting media images clickable with hyperlinks. Anyone know what indicates the area green bit on the icon of luggage?
-
An iFrame shows no images, others
Hi there, I'm a little crazy here. I have an old site running in GL CS2 with some pages that have an iFrame. Although there is that nothing has changed on the page, a page with an iFrame suddenly stopped showing their clickable images. This site has other pages with iFrames that show their images without any problems. The only thing different, is that they are not clickable. When I preview the GL to Firefox iFrame, everything is ok. When I do the same with the page that contains the iFrame that is ok too. The pages are fed by a template page I checked but can not see something wrong. In addition, it has worked before without problems. What Miss me?
The images appear to be fine.
There are a few adblockers and system security tools that can filter the images that appear in a path with the word "banners". See more info on this:
Maybe you are looking for
-
Firefox cannot connect to google in the search bar
I recently had an attacker change the IP address of the DNS server in my router to a bad. When it has been changed, I couldn't access google or facebook. I have fixed and can browse both sites, but the search bar in the upper right won't take me to g
-
Add more dedicated video RAM?
I was wondering if I can add more dedicated video RAM of my video card and if so, how? I have a HP Pavilion Slimline s5-1234. My graphics card is Intel(r) HD Graphics, model WDDM 1.1. My system says is 1696 MB total memory of avalible for my graphics
-
After uninstalling my XPSp3 o.e., I started getting the following error message: "the address book failed to load. Outlook Express is incorrectly configured, please re-install. "at the start of XP and the machine. Uninstalling included 7 entries regi
-
HP Color LaserJet 9500 - stapling feature missing in the printer driver Uviversal
Hello everyone, We use a Color LaserJet 9500 in an enterprise environment. He had a hardware failure, our service partner repaired. Since then, the stapling function is missing from the universal printer driver. On the machine itself, we are able to
-
How can I find my router mn500 Microsoft default password? What is this password?
I am trying to connect my Nook and Wii to my wireless router, but have lost the password. Can you help me? Please?