Search Results

Search found 25888 results on 1036 pages for 'image map'.

Page 44/1036 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • Javascript - Canvas image never appears on first function run

    - by Matt
    I'm getting a bit of a weird issue, the image never shows the first time you run the game in your browser, after that you see it every time. If you close your browser and re open it and run the game again, the same issue occurs - you don't see the image the first time you run it. Here's the issue in action, just hit a wall and there's no image the first time on the end game screen. Any help would be appreciated. Regards, Matt function showGameOver() { ctx.clearRect(0, 0, canvas.width, canvas.height); ctx.fillStyle = "black"; ctx.font = "16px sans-serif"; ctx.fillText("Game Over!", ((canvas.width / 2) - (ctx.measureText("Game Over!").width / 2)), 50); ctx.font = "12px sans-serif"; ctx.fillText("Your Score Was: " + score, ((canvas.width / 2) - (ctx.measureText("Your Score Was: " + score).width / 2)), 70); myimage = new Image(); myimage.src = "xcLDp.gif"; var size = [119, 26], //set up size coord = [443, 200]; ctx.font = "12px sans-serif"; ctx.fillText("Restart", ((canvas.width / 2) - (ctx.measureText("Restart").width / 2)), 197); ctx.drawImage( //draw it on canvas myimage, coord[0], coord[1], size[0], size[1] ); $("canvas").click(function(e) { //when click.. if ( testIfOver(this, e, size, coord) ) { startGame(); //reload } }); $("canvas").mousemove(function(e) { //when mouse moving if ( testIfOver(this, e, size, coord) ) { $(this).css("cursor", "pointer"); //change the cursor } else { $(this).css("cursor", "default"); //change it back } }); function testIfOver(ele,ev,size,coord){ if ( ev.pageX > coord[0] + ele.offsetLeft && ev.pageX < coord[0] + size[0] + ele.offsetLeft && ev.pageY > coord[1] + ele.offsetTop && ev.pageY < coord[1] + size[1] + ele.offsetTop ) { return true; } return false; } }

    Read the article

  • Extract new image dimensions from timthumb

    - by jonthoughtit
    I'm using timthumb to resize my images because it scales them nicely if I only enter one of the dimensions. However I want to know if it's possible to extract the new resized image's dimensions so that I can add that dynamically to the img tag attributes. I tried this with no luck: $fullpath = '/lib/timthumb.php?src='.$image.'&w=100'; $my_image = array_values(getimagesize($fullpath)); list($width, $height, $type, $attr) = $my_image; Any ideas?

    Read the article

  • Swap button for image (Jquery)

    - by Skoder
    Hi I have a button and when it's clicked, I want to replace the button with an image. How can I do this in JQuery? Is it possible to replace the background of the image as well? The button itself is within a large div, and I don't want to add another div around the button because it messes up a previous layout. Thanks

    Read the article

  • Tool to generated rotated versions of an image

    - by John
    In sprite-based systems, it's common to fake rotation of a sprite by having many different images, each showing it rotated an extra few degrees. Is there any free tool which will take a single image, and output a single image containing several rotations? It should also ideally let us control how many images are in each row. e.g if I have a 32x32 sprite and I want it rotated at 10 degree intervals, the tool might generate a 320x32 file or a 160x64 file

    Read the article

  • iPhone Launch Image zoom animation not working on physical device

    - by user341542
    I have developed an iPhone app with a launch image. When starting the app in the simulator, the image zooms in as expected. However, when the app is deployed to my physical device, the zoom animation is very short and sometimes completes instantaneously. I'm sure it's nothing to do with my app start up as I put a sleep call in applicationDidFinishLoading to slow it down and this occurs after the zoom animation has completed.

    Read the article

  • C#: Accessing image added to project folder

    - by Petr
    Hi, I would like to know following: I added the folder "Graphics" into my project and placed one BMP to it. Now I would like to load the image from my code, but I cannot figure out how. I know its simple with resources but is there a way without adding the image into resources? Thanks

    Read the article

  • Convert webpage to image from ASP.NET

    - by Nissan Fan
    I would like to create a function in C# that takes a specific webpage and coverts it to a JPG image from within ASP.NET. I don't want to do this via a third party or thumbnail service as I need the full image. I assume I would need to somehow leverage the webbrowser control from within ASP.NET but I just can't see where to get started. Does anyone have examples?

    Read the article

  • Setting an image for a UIButton in code.

    - by Spanky
    Hi, How do you set the image for a UIButton in code? I have this: UIButton *btnTwo = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btnTwo.frame = CGRectMake(40, 140, 240, 30); [btnTwo setTitle:@"vc2:v1" forState:UIControlStateNormal]; [btnTwo addTarget:self action:@selector(goToOne) forControlEvents:UIControlEventTouchUpInside]; [self.view addSubview:btnTwo]; but don't see what will set the image for it. Any help appreciated, Thanks // :)

    Read the article

  • Android gridview open image in foreground

    - by mkirank
    I am able to create a grid view layout as shown Here when a image is clicked I would like to bring that image to the foreground (full screen) for 2 seconds and then go back to the grid layout. Can you please point me to the appropriate examples/docs or pointers on how to do this . Thanks

    Read the article

  • Add image contact in address book

    - by Paska
    Hi all, how can i use kABPersonImageFormatThumbnail or something else to set an image to a contact in address book??? I want use a /resources file. Now i use ABMultiValueAddValueAndLabel(multiPhone, @"+39-02-1234567", kABWorkLabel, NULL); to set a value in address book. An image seems to be the same behavior, but what type need use? ABMultiValueAddValueAndLabel(multiPhone, ?????, kABPersonImageFormatThumbnail, NULL); Thanks A

    Read the article

  • Get main article image with PHP

    - by PaulAdamDavis
    Hello! I'd like to get the main image for an article, much like Facebook does when you post a link (but without the choosing image part). The data we have to work with is the whole pages HTML as a variable. The page & URL will be different for every time this function runs. Are there any libraries or classes that are particularly good at getting the main body of content, much like Instapaper that would be of any help?

    Read the article

  • How does CSS 3 border-image work exactly?

    - by Tower
    Hi, I have an image of 4x4 in size and I want to use it all around a DIV's border. The following: -moz-border-image: url("../images/window/side.png") 4 4 4 4 / 4px 4px 4px 4px repeat repeat will place left and right borders, but not bottom and top. What's wrong with it? I think I have misunderstood the syntax and if that is so, how does this syntax really work?

    Read the article

  • How to display an image(all major formats), selected by JFileChooser in java

    - by Tushar Maroo
    I am developing an image editing app, so want to display an image selected by JFileChooser, so what would be best approach so that it can display all formats jpg, png, gif etc. OpenButton is used for invocation of filechooser. private void OpenActionPerformed(java.awt.event.ActionEvent evt) { int returnVal = fileChosser.showOpenDialog(this); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fileChosser.getSelectedFile(); // What to do with the file // I want code for this part try { //code that might create an exception } catch (Exception e1) { e.printStackTrace(); } } }

    Read the article

  • Help to learn Image Search algorithm

    - by R Manu
    I am a beginner in image processing. I want to write an application in C++ or in C# for Searching an image in a list of images Searching for a particular feature (for e.g. face) in a list of images. Can anybody suggest where should I start from? What all should I learn before doing this? Where can I find the correct information regarding this?

    Read the article

  • Background image flickering when mouseover - IE.

    - by snowalker
    Hello everyone, I have a contact form and I added an image as a background. The background image is flickering when I move the mouse over the fields in IE(6,7,8). If I remove the contact form (made with divs) everything is fine. I tried to build the form with table and I have the same problem. Any solution? Every idea is welcomed! Thanks!

    Read the article

  • How do I make image hyperlinks have a background image?

    - by Richard
    I want all .jpg links to have a certain background image. so a link on a page like 'http://mysite/myimage.jpg' would automatically be prefixed with a small icon. Actually all links to images, ie .gif .png as well with the same icon. If the link is to a website, ie .htm/.php/.html/.asp it should have a different image. I want it to be through classes in CSS. Any help appreciated. TIA

    Read the article

  • Node.js MMO - process and/or map division

    - by Gipsy King
    I am in the phase of designing a mmo browser based game (certainly not massive, but all connected players are in the same universe), and I am struggling with finding a good solution to the problem of distributing players across processes. I'm using node.js with socket.io. I have read this helpful article, but I would like some advice since I am also concerned with different processes. Solution 1: Tie a process to a map location (like a map-cell), connect players to the process corresponding to their location. When a player performs an action, transmit it to all other players in this process. When a player moves away, he will eventually have to connect to another process (automatically). Pros: Easier to implement Cons: Must divide map into zones Player reconnection when moving into a different zone is probably annoying If one zone/process is always busy (has players in it), it doesn't really load-balance, unless I split the zone which may not be always viable There shouldn't be any visible borders Solution 1b: Same as 1, but connect processes of bordering cells, so that players on the other side of the border are visible and such. Maybe even let them interact. Solution 2: Spawn processes on demand, unrelated to a location. Have one special process to keep track of all connected player handles, their location, and the process they're connected to. Then when a player performs an action, the process finds all other nearby players (from the special player-process-location tracking node), and instructs their matching processes to relay the action. Pros: Easy load balancing: spawn more processes Avoids player reconnecting / borders between zones Cons: Harder to implement and test Additional steps of finding players, and relaying event/action to another process If the player-location-process tracking process fails, all other fail too I would like to hear if I'm missing something, or completely off track.

    Read the article

  • 2D non-tile based map editor

    - by Jonesy
    I am currently developing a relatively simple 2D, topdown oriented adventure game for the iPhone and was wondering what would be the easiest way to create the maps for my game. I figured I would need some kind of visual editor that would give me immediate feedback and would allow me to place all objects in the world exactly where I want them. I could then load the saved representation of the world I create in the editor in my game. So, I am looking for a simple map editor that allows me to do this. All the objects in my game are simply textured rectangles build up from two triangles. All I need to be able to do is position different rectangles/objects in the map, and give them a texture. I am using texture atlases, so it would be useful to be able to assign portions of textures to the objects. I then need to be able to extract all the objects from the saved representation of my maps, together with the name/identifier of the texture(atlas) they use, and the area of the texture atlas. I have looked at some tile-based map editors like Tiled and Ogmo, but they don't seem to be able to do what I want. Any suggestions? EDIT: a more concrete example: something like the GameMaker level editor, but then with added export functionality in a handy format.

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >