Flex :: How To Pass ID Of Image Currently Clicked
Nov 10, 2009
My application is going to have multiple images..
<mx:Image id="img1" source="@Embed(source='assets/mrute1.jpg')"
mouseDown="mouseMoveHandler(event);"/>
<mx:Image id="img2" source="@Embed(source='assets/mrute2.jpg')"
mouseDown="mouseMoveHandler(event);"/>
<mx:Image id="img3" source="@Embed(source='assets/mrute3.jpg')"
mouseDown="mouseMoveHandler(event);"/>
Then on the function I want to be able to know the id of the image that was currently being clicked. How do i do that?
mouseMoveHandler(event, ??)
View 2 Replies
Similar Posts:
Jun 14, 2010
There is an Image control that when I click on it I need to zoom in (using the center/transform point where the mouse is clicked). I have the zoom transition working great, but when I set transformX & tranformY (with autoCenterTransform false) it doesn't zoom into that point.
Here is my code that only zooms in (not to a specific point)
<fx:Script>
<![CDATA[
protected function imgLogo_clickHandler(event:MouseEvent):void {
transformer.play();
} ]]>
[Code] .....
View 1 Replies
Nov 1, 2011
Need to:1) Create bytearray from BitmapData in Flex2) Pass this bytearray (or maybe converted to string with b64) to php script3) Convert this bytearray again to image in PHP and show it.
View 1 Replies
Apr 18, 2011
I want to store images from the flex application to a asp net web service and at a later point will be sending these images back to flex application . Can you please give a example web method in c# or suggest a website to read about how to do this.
View 1 Replies
Jan 28, 2012
I have this code which allows me to replace the mouse cursor with an image but i would also like to change the image when the mouse is clicked down using a different image. the code i am using for just replacing the mouse cursor is[code]...
i tried using a different code which i found but it failed to work with my project can anyone help me please
View 9 Replies
Feb 2, 2011
Following is the part where i am trying to attach the enlarged images that are already placed in the folder but i dont know what to add to make it work. I only tried to enlarge the first thumb but it doesn't work on that either. All it does is show a small scaled thumb of that enlarged image on the stage.
enlargeMC is a mc that is on stage.
ActionScript Code:
for (p=1; p<=_global.imagesNumber1; p++)
{
//my_pb._visible = false;
[Code].....
View 6 Replies
Aug 5, 2009
I am trying to make an interactive slideshow. I have nine pictures thumbnail size and I want it so that when you click on one of them they will grow, then when you click again it will shrink.
View 3 Replies
Jan 25, 2012
I am changing image through flex every time i change it saved into server directory with same name(which i am referring to show). So when i refresh my page my browser didn't send new request to server since it's already in request.so didn't getting new image.Tip:- when i clear browser history it will come with new image
View 2 Replies
Oct 8, 2008
I have 36 images in a movie clip. Inside of that movie clip there are 36 other movie clips containing one separate image. I have figured out how to click on them and add it to the stage. But I can figure out how to get them to remove when another image is clicked. (ex. I click on image 1 it will appear on stage but when I click image 2 it show image 2 on top of image 1.) the thing is I don't want to have to click on the images in order. If any image is clicked the one showing on stage will automatically disappear.
View 9 Replies
Sep 18, 2011
I would like to know how can i appear an image when i clicked on sublink?
I have 3 MCs: sub_bg, ImgMc and bg.
the code's sub_bg is :
function linkF(s:String):Void
{
_root.bg.txt.htmlText = s;
}
[Code]....
View 29 Replies
Feb 3, 2009
I've got a few spites on stage that are created dynamically and live in an array. I'm rotating images through these sprites and now need to know which image is in a sprite when clicked. My code: loading the images:
[Code]...
View 1 Replies
Jan 19, 2008
I've adapated a carousel to work on a flat basis, and its working well. However i wish to add navigation to this that will scroll one image to the left/right when clicked. The problem is this navigation i've added works fine for first few clicks and then stops working due to it never reaching the correct destination... The formula im using is simple enough i just cant see why it fails....
[Code]...
View 3 Replies
Aug 1, 2009
I want to create a button that when clicked it shows a good looking box with a swf or an image inside. I've tried looking for a tutorial for something that resembles this, but couldn't. The closest thing I found were tooltips, but that's not what I need. The tooltip disappears and it's not meant for UI.
View 2 Replies
Aug 21, 2010
I need to make a series of 35 buttons that display an image when clicked. However, I need the previous displayed image to disappear when any other button is clicked.I have this to toggle the images on/off:[code]Any idea what I can add to the function to turn all the other buttons visibility to false when any other button is clicked?
View 2 Replies
Jan 23, 2011
I have just started using flash. I needed to do this presentation for a client. In one scene I have provided him with a photo-gallery, where some 30 photos are placed randomly ...when playing the movie (published as projector) user will click any photo to watch it. For this I have used swapdepth so that photo, user clicks comes to front. Also applied drag to all these photos.
My code look something like this:
on (press, dragOver) {
startDrag(_root.pic6);
} on (release, rollOut, dragOut) {
stopDrag();
} on (press, release, dragOver, dragOut) {
_root.x +=2;
_root.pic6.swapDepths(_root.x);
}
For doing this first I converted the photo to button ...then converted this button to a movie clip and gave a instance name to this. Then I went into the movie clip and applied the above code to the button placed inside the movie. Applying all this to all photos I placed them randomly on timeline. The problem is : code is working fine, it is dragging photos, bringing them to front etc. But I have user to go back and play another scene to continue the presentation. Problem starts here, the last photo clicked by user remains there, even though it is not present in that scene.
View 9 Replies
Oct 25, 2007
I have made an mp3 player where xml data is shown in an dynamic textbox in flash movie. It is correctly showing the html links in text box.
But I want that when user clicks the link of a song, it should open the artist image in an image-holder. How can I do that?
View 5 Replies
Oct 25, 2007
I have made an mp3 player where xml data is shown in an dynamic textbox in flash movie. It is correctly showing the html links in text box. But I want that when user clicks the link of a song, it should open the artist image in an image-holder. How can I do that?
View 5 Replies
Jan 23, 2009
I'm working with XML and setting up a portfolio gallery. I basically want a thumbnail to be clicked and have an image opening, but i want the instance name of a button that is clicked to be stored in a variable that can be used when calling the images from the XML. I'm just trying to get the number that is in the instance name of btn2, and use that number 2 to reference the ID # in the xml file. I know there are easier ways to do this, but I didn't want to write new functions for all the numerous thumbnails on the site.
PHP Code:
btn1. addEventListener(MouseEvent.Click, _onBtnClick);
function _onBtnClick( e:MouseEvent ):void {
var clickedBtn = event.target.name;
}
Also the thumbnails are not being loaded through the XML, would it be easier to load the larger images without functions for each thumb, if I had the thumbs being referenced through the XML?
View 1 Replies
Sep 7, 2010
I Managed to insert a photo gallery using lightbox...however, would like to make some changes:
1. Fixed previous and next buttons, been playing around with the code, with no successful result.
2. I have a group of photos, and if I want to enlarge the one I click, I cannot. Whatever photo I click, always the first one of the group appears.
This is the code I have in my html file:
HTML Code:
<head>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/scriptaculous.js?load=effects" type="text/javascript"></script>
<script src="js/lightbox.js" type="text/javascript"></script>
[Code].....
View 1 Replies
Dec 30, 2008
I'm creating a portfolio site with a handful of thumbnails. I want a short description of each thumbnail to appear when I rollover the thumbnail. I've got it set up to appear, but I want them to fade in. I can't seem to figure that out. In addition, I want an image to appear and move to the front when the thumbnail is clicked. I can get it to appear, but if it's not on top, then it will just show under the other images visible. I'm thinking that a simple command would solve all these issues, but I cannot seem to figure it out. I've included the action script for one thumbnail.
Ideally, I'd like for the clicked image to fade out and the next clicked image to fade in, but I think that that is beyond my Actionscript understanding for now.
View 5 Replies
Mar 3, 2012
I have a problem and I have potential solution. But I wanted to confirm if there is an easy and simple way to solve my problem.App type:Isometric Game.Problem statement:I am loading images in my flash app and have mouse events attached to them.The images I load are prop images like vehicles, trees, buildings etc., and all of them are transparent.Example: Red ball asset (please ignore the yellow background which I applied to describe the problem)If I click on the actual image area (colored in red), then every thing works perfect.I don't want to trigger mouseevent when I click on empty image part (or transparent area, which I have shown in yellow color)There is one way I know by creating masks in flash. I don't want to do it unless that is the final option left because I load image assets instead of flash assets and I don't want to create a new mask asset for all the assets.There is another method I was going to adopt by using getPixel method of Bitmap.
But there is another problem with this method.I might be able to ignore the click event when I click on the empty part of the asset but if there is some other asset is behind the image in the same location, then I need to process the click event for the occluded image.Well, thinking of solution to this problem takes me to the getObjectsUnderPoint where I can scan the occluded assets
View 2 Replies
Aug 30, 2011
I am trying to make an AIR application, that needs to pass an image (.jpg/.png) to a C++ app, that does number crunching.(this needs to be done very often, like every 2-3 seconds.) I've managed to pass the image by saving it to disk via AIR, then opening this file with the C++ program (and passing the filename as an argument to the C++ program), but this method is really slow, because it involves lots of disk I/O.
Is there a method to send an image directly to a native process?
Edit: There is a good Flash-C++ communication example at [URL] using sockets. The big problem with this method is, that some firewall settings can block the communication (i get a windows firewall warning, when i start the app).
View 1 Replies
Nov 16, 2009
i'm trying to pass image src from js on my html to flashe from some reason it's not working...
var result:Object = call("progress");
function call(func:String):Object
{
[code]....
View 2 Replies
May 8, 2008
i have and xml that passes these image details to be loaded into flash. image path, x,y,heigt,width, rotation i use moviecliploader and attachemovies with a for loop to load the images. but find difficult set images there respected property after onLoadComplete even if the movieclip loader as i can pass the approriate values in to movies.how to pass the properties into onLoadComplete even of the image
View 3 Replies
Jun 29, 2009
I have created a small image gallery for use in a CBT Program.What I am looking to do is, each image in the slide when clicked needs to go to a separate html page.I currently have it working as far as being able to execute a single External Call to go to a HTML Page, but it is working for the entire gallery not individual pictures.I am thinking of separating the way the MC are loading into the container, then tying External Calls Specific to the individual clips.
below is the current code.
--------------
import mx.transitions.Tween;
import mx.transitions.easing.*;[code].....
View 0 Replies
Feb 4, 2009
I pass an image ByteArray to PHP.Along with the image ByteArray I would also like to pass a single string variable to the same PHP script.[code]
View 2 Replies
Feb 6, 2009
I have a free transform tool simulator that rotates an image when the middle top button is clicked and held. The image rotates to 180 and then stops. Does anyone know why it is getting stuck?I have enabled viewsource for the code. the method is in WidgetEditor.as
View 3 Replies
Jun 9, 2010
I have 4 navigation button and like home, about us etc.... And i want to disable home when it is click and cannot clicked it until the user click another button first. means if a visitor is at home page then home navigation is disabled, and all other are active, and when they click at aboutus button then the pages goes to the about us page and the about us button is disabled and other get active. I want this solution in AS3 with oop concept.
View 6 Replies
Aug 11, 2011
I have a TabNavigator, and each tab is a Module. One of the modules is labelled Units and the full code of the module is posted in this post. There are several problems:
1) Forms are not populated with data from the datagrid selection.
2) Selecting a row and clicking delete gives the very-common error: TypeError: Error #1009: Cannot access a property or method of a null object reference.
A trace on the valueObject unit within the selectionChangeHandler function gives NULL. Why? Note: In other modules (other tabs of the TabNavigator), I have DropDownLists populated with units. This means that the valueObject Unit is defined in the other modules. However, valueObjects should be private to modules, and not shared.
[Code]....
View 1 Replies
Aug 11, 2010
I am creating one desktop application of facebook.
So here I am getting streams from facebook post. So when any facebook application's long image link I am getting that I can't display in Image container, this is not displaying image.
One also fact is that, When I am giving this link directly then it is working.....
When I have seen this in Charlse Debugging proxy then it is displaying 403,Forbidden error of image.
View 2 Replies