Search Results

Search found 3131 results on 126 pages for 'upper stage'.

Page 8/126 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • What is the correct stage to use for Google Guice in production in an application server?

    - by Yishai
    It seems like a strange question (the obvious answer would Production, duh), but if you read the java docs: /** * We want fast startup times at the expense of runtime performance and some up front error * checking. */ DEVELOPMENT, /** * We want to catch errors as early as possible and take performance hits up front. */ PRODUCTION Assuming a scenario where you have a stateless call to an application server, the initial receiving method (or there abouts) creates the injector new every call. If there all of the module bindings are not needed in a given call, then it would seem to have been better to use the Development stage (which is the default) and not take the performance hit upfront, because you may never take it at all, and here the distinction between "upfront" and "runtime performance" is kind of moot, as it is one call. Of course the downside of this would appear to be that you would lose the error checking, causing potential code paths to cause a problem by surprise. So the question boils down to are the assumptions in the above correct? Will you save performance on a large set of modules when the given lifetime of an injector is one call?

    Read the article

  • Arrrg! MovieClip object refuses to moved in any rational way in as3?

    - by Aaron H.
    I have a MovieClip object, which is exported for actionscript (AS3) in an .swc file. When I place an instance of the clip on the stage without any modifications, it appears in the upper left corner, about half off stage (i.e. only the lower right quadrant of the object is visible). I understand that this is because the clip has a registration point which is not the upper left corner. If you call getBounds() on the movieclip you can get the bounds of the clip (presumably from the "point" that it's aligned on) which looks something like (left: -303, top: -100, right: 303, bottom: 100), you can subtract the left and top values from the clip x and y: clip.x -= bounds.left; clip.y -= bounds.top; This seems to properly align the clip fully on stage with the top left of the clip squarely in the corner of the stage. But! Following that logic doesn't seem to work when aligning it on the center of the stage! clip.x = (stage.stageWidth / 2); etc... This creates the crazy parallel universe where the clip is now down in the lower right corner of the stage. The only clue I have is that looking at: clip.transform.matrix and clip.transform.concatenatedMatrix matrix has a tx value of 748 (half of stage height) ty value of 426 (Half of stage height) concatenatedMatrix has a tx value of 1699.5 and ty value of 967.75 That's also obviously where the movieclip is getting positioned, but why? Where is this additional translation coming from?

    Read the article

  • Resize issue to fit dynamically with any browser size

    - by Qpixo
    I'm trying to make full flash site dynamically resize in any browser size. If the browser gets smaller than the site MC should constrain to fit in the browser. (EX: 1440x900) What I have right now works like 98% of the time, but when I switch to a bigger screen size, it screws up and makes the site tiny from left to right (menu, logo, etc.) (Ex:1680x1050) Does anyone know how to fix that issue?? positionScenesOnStage(); stage.align = StageAlign.TOP_LEFT; stage.scaleMode = StageScaleMode.NO_SCALE; stage.addEventListener(Event.RESIZE, handleObjectsOnStage); private function handleObjectsOnStage(event:Event):void { positionScenesOnStage(); } private function positionScenesOnStage():void { backgroundMC = new bgMC(); backgroundMC.x = 0; backgroundMC.y = 0; backgroundMC.width = stage.stageWidth; backgroundMC.height = stage.stageHeight; addChild(backgroundMC); logo_mc = new LogoMC(); logo_mc.x = stage.stageWidth - 1420; logo_mc.y = stage.stageHeight - 700; addChild(logo_mc); menuContainer = new MenuContainerMC(); menuContainer.x = stage.stageWidth - 400; menuContainer.y = stage.stageHeight - 680; addChild(menuContainer); }

    Read the article

  • how embed a video on EaselJS [on hold]

    - by user3697195
    i try to make a videoplayer with EaselJS and the console dont says about it this is my HTML http://pastebin.com/djY4cpyX this is my Javascript function init() { var stage = new createjs.Stage('gameCanvas');; video = document.createElement('video'); video.setAttribute('webkit-playsinline'); video.src = 'js/bitmap/trailer.mp4'; var Video = new createjs.Bitmap(video); stage.addChild(Video); createjs.Ticker.addEventListener(stage); createjs.Ticker.setFPS(24); stage.update(); }

    Read the article

  • ActionScript applying rotation of sprite to startDrag()'s rectangle bounds

    - by TheDarkIn1978
    i've added a square sprite to the stage which, when dragged, is contained within set boundaries. private function swatchBounds():Rectangle { var stageBounds = new Rectangle ( 0 - defaultSwatchRect.x, 0 - defaultSwatchRect.y, stage.stageWidth - defaultSwatchRect.width, stage.stageHeight - defaultSwatchRect.height ); return stageBounds; } if the square sprite is scaled, the following returned rectangle boundary works private function swatchBounds():Rectangle { var stageBounds = new Rectangle ( 0 - defaultSwatchRect.x * swatchObject.scaleX, 0 - defaultSwatchRect.y * swatchObject.scaleY, stage.stageWidth - defaultSwatchRect.width * swatchObject.scaleX, stage.stageHeight - defaultSwatchRect.height * swatchObject.scaleY ); return stageBounds; } now i'm trying to include the square sprites rotation into the mix. math certainly isn't my forté, but i feel i'm on the write track. however, i just can't seem to wrap my head around it to get it right private function swatchBounds():Rectangle { var stageBounds = new Rectangle ( 0 - defaultSwatchRect.x * swatchObject.scaleX * Math.cos(defaultSwatchRect.x * swatchObject.rotation), 0 - defaultSwatchRect.y * swatchObject.scaleY * Math.sin(defaultSwatchRect.y * swatchObject.rotation), stage.stageWidth - defaultSwatchRect.width * swatchObject.scaleX * Math.cos(defaultSwatchRect.width * swatchObject.rotation), stage.stageHeight - defaultSwatchRect.height * swatchObject.scaleY * Math.sin(defaultSwatchRect.height * swatchObject.rotation) ); return stageBounds; }

    Read the article

  • JavaFX: Use a Screen with your Scene!

    - by user12610255
    Here's a handy tip for sizing your application. You can use the javafx.stage.Screen class to obtain the width and height of the user's screen, and then use those same dimensions when sizing your scene. The following code modifies default "Hello World" application that appears when you create a new JavaFX project in NetBeans. package screendemo; import javafx.application.Application; import javafx.event.ActionEvent; import javafx.event.EventHandler; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.stage.Stage; import javafx.stage.Screen; import javafx.geometry.Rectangle2D; public class ScreenDemo extends Application { public static void main(String[] args) { Application.launch(args); } @Override public void start(Stage primaryStage) { primaryStage.setTitle("Hello World"); Group root = new Group(); Rectangle2D screenBounds = Screen.getPrimary().getVisualBounds(); Scene scene = new Scene(root, screenBounds.getWidth(), screenBounds.getHeight()); Button btn = new Button(); btn.setLayoutX(100); btn.setLayoutY(80); btn.setText("Hello World"); btn.setOnAction(new EventHandler() { public void handle(ActionEvent event) { System.out.println("Hello World"); } }); root.getChildren().add(btn); primaryStage.setScene(scene); primaryStage.show(); } } Running this program will set the Stage boundaries to visible bounds of the main screen. -- Scott Hommel

    Read the article

  • 'How decode my encode xml data?

    - by Alex
    Hi <% 'Stage 1 datas=Server.URLencode("<PaginationData currentPage=""1"" totalPages=""9""/>") response.write "Encode = " datas &"</br></br>" 'Stage 2 response.write "Decode = " 'How i again decode my encode data? %> In the "Stage 1" , i encode my xml data In the "Stage 2", How i decode the "Stage 1" Encode data? hoping your support

    Read the article

  • jQuery UI modal dialog box and the close button upper right: how to remove it.

    - by tahdhaze09
    I need to kill the close 'x' button at the top of the dialog box. I have a modal that opens with an OK button that redirects to the site. The site behind the modal is in an iframe. When the user agrees to the statement in the dialog box and clicks the 'OK' button, it redirects to the site that is outside the iframe. If the user clicks on the 'x', it goes to the iframe site, which I do not want to have happen. I need the modal to work as a one-way to the site it goes to. It basically forces the user to accept the user agreement. I would post code, but its an intranet site. Thanks everyone for your help!

    Read the article

  • IIS 6 forces AppRoot/Starting Point to upper case when Virtual Directory is imported from a file

    - by user276464
    I have searched the web for this and couldn't find anything (well one remotely relevant post), so here I am. We have multiple ASP.NET apps in IIS 6 using Forms Authentication with dedicated path for each app. Since path is case sensitive it must match URL's path section exactly. However, because of an incorrect casing in IIS 6 Metabase for AppRoot (or Starting Point in IIS UI) bowser doesn't send Form cookie to the server whenever URL is previously resolved on the server and sent to client in incorrect case. Example: App URL = "https://Test.net/Application1" Cookie path = /Application1 Metabase AppRoot = /LM/W3SVC/1393818691/ROOT/APPLICATIONPATH1 Resolved URL = "https://Test.net/APPLICATIONPATH1" Now to the root cause... We create virtual directories on test server manually in a specific case (matches Path for each application). We then export virtual directory using UI to an XML file, which is then imported to another server (let's say production), at which point IIS decides to uppercase AppRoot element of the metabase. Can anyone shed some light on this? Is there a setting on IIS I am not aware of? I am trying to avoid manual edit of metabase after the import. Is that a bug?

    Read the article

  • Positioning divs inside a container div without the content of an upper div affecting the position o

    - by silverCORE
    Hi. I'm trying to accomplish the following layout, and I'm almost there, except for the last green div, which is going lower and lower depending on the content of the content (white) div. If I set a value for the TOP property for the green div, and then I add some more text to the content div, the green div goes lower and lower. Since the green div is child to the main container div, and the green div is relatively positioned, isn't it supposed to be placed specifically at the position indicated by the TOP value of it? If I'm incorrect...can someone please tell me how can i make it so that the green div is always displayed at the same spot within the container (gray) div, regardless of the height of the content/white div? I tried to paste the css code here but was having problems with the brower. you can see the test site source/css at http://www.rae-mx.com/test tia for the help.

    Read the article

  • Python — How can I find the square matrix of a lower triangular numpy matrix? (with a symmetrical upper triangle)

    - by Dana Gray
    I generated a lower triangular matrix, and I want to complete the matrix using the values in the lower triangular matrix to form a square matrix, symmetrical around the diagonal zeros. lower_triangle = numpy.array([ [0,0,0,0], [1,0,0,0], [2,3,0,0], [4,5,6,0]]) I want to generate the following complete matrix, maintaining the zero diagonal: complete_matrix = numpy.array([ [0, 1, 2, 4], [1, 0, 3, 5], [2, 3, 0, 6], [4, 5, 6, 0]]) Thanks.

    Read the article

  • What stage of normalization is this? (moving repeating data into separate table)

    - by Sergio
    Hi There, I have noticed that when designing a database I tend to shift any repeating sets of data into a separate table. For example, say I had a table of people, with each person living in a state. I would then move these repeating states into a separate table and reference them with foreign keys. However, what if I was not storing any more data about states. I would then have a table with StateID and State in. Is this action correct? State is dependant on the primary key of the users table, so does shifting it into its own table help with anything? Thanks,

    Read the article

  • How do you efficiently generate a list of K non-repeating integers between 0 and an upper bound N

    - by tucuxi
    The question gives all necessary data: what is an efficient algorithm to generate a sequence of K non-repeating integers within a given interval. The trivial algorithm (generating random numbers and, before adding them to the sequence, looking them up to see if they were already there) is very expensive if K is large and near enough to N. The algorithm provided here seems more complicated than necessary, and requires some implementation. I've just found another algorithm that seems to do the job fine, as long as you know all the relevant parameters, in a single pass.

    Read the article

  • How to add a class to just upper element of trigger with Jquery?

    - by Ahmet Kemal
    Hello, I am working on a Jquery accordion stuff. I want to add a class to the div that contains the accordion trigger <a> tag. You can look at my code. I want to add "first" class name to just first "newsitems" class when clicked "Recession fashion in Japan Video" title. <!-- news items starts--> <div class="newsitems"> <h3 class="business"> <a href="#" title="expand"><img src="images/expand_icon.gif" alt="collapse" class="collpase" /> Recession fashion in Japan Video</a> </h3> <p class="timestamp">0100hrs</p> </div> <!-- news items ends--> <!-- news items starts--> <div class="newsitems"> <h3 class="sports"> <a href="#" title="expand"><img src="images/expand_icon.gif" alt="collapse" class="collpase" /> Murray survives five-set thriller at Wimbledon</a> </h3> <p class="timestamp">0100hrs</p> </div> <!-- news items ends-->

    Read the article

  • What am I missing in my compilation / linking stage of this C++ FreeType GLFW application?

    - by anon
    g++ -framework OpenGL GLFT_Font.cpp test.cpp -o test -Wall -pedantic -lglfw -lfreetype - pthread `freetype-config --cflags` Undefined symbols: "_GetEventKind", referenced from: __glfwKeyEventHandler in libglfw.a(macosx_window.o) __glfwMouseEventHandler in libglfw.a(macosx_window.o) __glfwWindowEventHandler in libglfw.a(macosx_window.o) "_ShowWindow", referenced from: __glfwPlatformOpenWindow in libglfw.a(macosx_window.o) "_MenuSelect", referenced from: This is on Mac OS X. I am trying to get GLFT_FONT to work on MacOSX with GLFW and FreeType2. This is not the standard Makefile. I changed parts of it myself (like the "-framework OpenGL" I am from Linux land, a bit new to Mac. I am on Mac OS X 10.5.8; using XCode 3.1.3 Thanks!

    Read the article

  • Interacts with dialog/whiptail on early boot rcX.d stage?

    - by nm
    Hi buddies, I'm developing on Ubuntu based, actually I got one script in-charged on GUI(console) setup. It runs before another scripts (rcX.d) start. Currently, I installed this script on rc2.d and start earlier than other ones. But when run on real machine, I can't input any keystroke on "dialog --inputbox" or whiptail through shell script. Additionally, It runs well on my Virtual Machine (Virtual Box and Vmware), that's so strange! So, does anybody give some help or point me any clues for overcome this ? Thanks

    Read the article

  • What is the best way to log errors in Zend Framework in my project at this stage?

    - by Pasta
    We built an app in Zend Framework and have not worked a lot in setting up error reporting and logging. Is there any way we could get some level or error reporting without too much change in the code? Is there a ErrorHandler plugin available? The basic requirement is to log errors that happens within the controller, missing controllers, malformed URLs, etc. I also want to be able to log errors within my controllers. Will using error controller here, help me identify and log errors within my controllers? How best to do this with minimal changes?

    Read the article

  • How do I Fix SQL Server error: Order by items must appear in the select list if Select distinct is s

    - by Paula DiTallo 2007-2009 All Rights Reserved
    There's more than one reason why you may receive this error, but the most common reason is that your order by statement column list doesn't correlate with the values specified in your column list when you happen to be using DISTINCT. This is usually easy to spot and resolve. A more obscure reason may be that you are using a function around one of the selected columns --but omitting to use the same function around the same selected column name in the order by statement. Here's an example:   select distinct upper(columnA)   from [evaluate].[testTable]    order by columnA  asc   This statement will cause the "Order by items must appear in the select list if SELECT DISTINCT is specified."  error to appear not because distinct was used, but because the order by statement did not utilize the upper() fundtion around colunnA.  To correct this error, do this: select distinct upper(columnA)   from [evaluate].[testTable]    order by upper(columnA) asc

    Read the article

  • How can I determine the first visible tile in an isometric perspective?

    - by alekop
    I am trying to render the visible portion of a diamond-shaped isometric map. The "world" coordinate system is a 2D Cartesian system, with the coordinates increasing diagonally (in terms of the view coordinate system) along the axes. The "view" coordinates are simply mouse offsets relative to the upper left corner of the view. My rendering algorithm works by drawing diagonal spans, starting from the upper right corner of the view and moving diagonally to the right and down, advancing to the next row when it reaches the right view edge. When the rendering loop reaches the lower left corner, it stops. There are functions to convert a point from view coordinates to world coordinates and then to map coordinates. Everything works when rendering from tile 0,0, but as the view scrolls around the rendering needs to start from a different tile. I can't figure out how to determine which tile is closest to the upper right corner. At the moment I am simply converting the coordinates of the upper right corner to map coordinates. This works as long as the view origin (upper right corner) is inside the world, but when approaching the edges of the map the starting tile coordinate obviously become invalid. I guess this boils down to asking "how can I find the intersection between the world X axis and the view X axis?"

    Read the article

  • Dojox Datagrid contains data, but shows up as empty

    - by Vivek
    I'd really appreciate any help on this. There is this Dojox Datagrid that I'm creating programatically and supplying JSON data. As of now, I'm creating this data within JavaScript itself. Please refer to the below code sample. var upgradeStageStructure =[{ cells:[ { field: "stage", name: "Stage", width: "50%", styles: 'text-align: left;' }, { field:"status", name: "Status", width: "50%", styles: 'text-align: left;' } ] }]; var upgradeStageData = [ {id:1, stage: "Preparation", status: "Complete"}, {id:2, stage: "Formatting", status: "Complete"}, {id:3, stage: "OS Installation", status: "Complete"}, {id:4, stage: "OS Post-Installation", status: "In Progress"}, {id:5, stage: "Application Installation", status: "Not Started"}, {id:6, stage: "Application Post-Installation", status: "Not Started"} ]; var stagestore = new dojo.data.ItemFileReadStore({data:{identifier:"id", items: upgradeStageData}}); var upgradeStatusGrid = new dojox.grid.DataGrid({ autoHeight: true, style: "width:400px;padding:0em;margin:0em;", store: stagestore, clientSort: false, rowSelector: '20px', structure: upgradeStageStructure, columnReordering: false, selectable: false, singleClickEdit: false, selectionMode: 'none', loadingMessage: 'Loading Upgrade Stages', noDataMessage:'There is no data', errorMessage: 'Failed to load Upgrade Status' }); dojo.byId('progressIndicator').innerHTML=''; dojo.byId('progressIndicator').appendChild(upgradeStatusGrid.domNode); upgradeStatusGrid.startup(); The problem is that I am not seeing anything within the grid upon display (no headers, no data). But I know for sure that the data in the grid does exist and the grid is properly initialized, because I called alert (grid.domNode.innerHTML);. The resultant HTML that is thrown up does show a table containing header rows and the above data. This link contains an image which illustrates what I'm seeing when I display the page. (Can't post images since my account is new here) As you may notice, there are 6 rows for 6 pieces of data I have created but the grid is a mess. Please help out if you think you know what could be going wrong. Thanks in advance, Viv

    Read the article

  • variables in abstract classes C++

    - by wyatt
    I have an abstract class CommandPath, and a number of derived classes as below: class CommandPath { public: virtual CommandResponse handleCommand(std::string) = 0; virtual CommandResponse execute() = 0; virtual ~CommandPath() {} }; class GetTimeCommandPath : public CommandPath { int stage; public: GetTimeCommandPath() : stage(0) {} CommandResponse handleCommand(std::string); CommandResponse execute(); }; All of the derived classes have the member variable 'stage'. I want to build a function into all of them which manipulates 'stage' in the same way, so rather than defining it many times I thought I'd build it into the parent class. I moved 'stage' from the private sections of all of the derived classes into the protected section of CommandPath, and added the function as follows: class CommandPath { protected: int stage; public: virtual CommandResponse handleCommand(std::string) = 0; virtual CommandResponse execute() = 0; std::string confirmCommand(std::string, int, int, std::string, std::string); virtual ~CommandPath() {} }; class GetTimeCommandPath : public CommandPath { public: GetTimeCommandPath() : stage(0) {} CommandResponse handleCommand(std::string); CommandResponse execute(); }; Now my compiler tells me for the constructor lines that none of the derived classes have a member 'stage'. I was under the impression that protected members are visible to derived classes? The constructor is the same in all classes, so I suppose I could move it to the parent class, but I'm more concerned about finding out why the derived classes aren't able to access the variable. Also, since previously I've only used the parent class for pure virtual functions, I wanted to confirm that this is the way to go about adding a function to be inherited by all derived classes.

    Read the article

  • flash as3, fade in/out layering problem

    - by Jackson Smith
    Ok, what im trying to do is make a day to night cycle behind my landscape. There is a sun and a moon, they rotate in a circle on opposite sides. (i.e. the sun is up when the moon is down and vice versa) when the sun is coming up it should fade from the night movieclip to the dawn movieclip, then when the sun is up a little bit more, fade into the day moviclip, this works quite well, but, for some reason, when it gets to the sunset, it just wont work :/ and the same goes for when it goes from the sunset to night :/ any and all healp is greatly appreciated, ive spent 5 hours trying to figure this out and cant! please help! stage.addEventListener(Event.ENTER_FRAME, daynightcycle) //setChildIndex(night, getChildIndex(day)); setChildIndex(sunset, 0); setChildIndex(day, 1); setChildIndex(dawn, 2); setChildIndex(night, 3); function daynightcycle(e:Event):void { if(sun.currentLabel == "dawn") { setChildIndex(sunset, 0); setChildIndex(day, 1); setChildIndex(dawn, 2); setChildIndex(night, 3); stage.addEventListener(Event.ENTER_FRAME, nightTdawn); }else if(sun.currentLabel == "sunset") { setChildIndex(dawn, 0); setChildIndex(night, 1); setChildIndex(sunset, 2); setChildIndex(day, 3); stage.addEventListener(Event.ENTER_FRAME, dayTsunset); }else if(sun.currentLabel == "night") { setChildIndex(day, 0); setChildIndex(dawn, 1); setChildIndex(night, 2); setChildIndex(sunset, 3); stage.addEventListener(Event.ENTER_FRAME, sunsetTnight); }else if(sun.currentLabel == "day") { setChildIndex(night, 0); setChildIndex(sunset, 1); setChildIndex(day, 2); setChildIndex(dawn, 3); stage.addEventListener(Event.ENTER_FRAME, dawnTday); }else if(sun.currentLabel == "switch") { stage.addEventListener(Event.ENTER_FRAME, switchLayers); } } function nightTdawn(e:Event):void { if(night.alpha != 0) { night.alpha -= 0.01; }else { stage.removeEventListener(Event.ENTER_FRAME, nightTdawn); night.alpha = 100; //setChildIndex(night, getChildIndex(sunset)); } } function dayTsunset(e:Event):void { if(day.alpha != 0) { day.alpha -= 0.01; }else { stage.removeEventListener(Event.ENTER_FRAME, dayTsunset); day.alpha = 100; //setChildIndex(day, getChildIndex(dawn)); } //day.visible = false; //sunset.visible = true; } function sunsetTnight(e:Event):void { if(sunset.alpha != 0) { sunset.alpha -= 0.01; }else{ stage.removeEventListener(Event.ENTER_FRAME, sunsetTnight); sunset.alpha = 100; //setChildIndex(sunset, (getChildIndex(day))); } //sunset.visible = false; //night.visible = true; } function dawnTday(e:Event):void { sunset.visible = true; day.visible = true; if(dawn.alpha != 0) { dawn.alpha -= 0.01; }else{ stage.removeEventListener(Event.ENTER_FRAME, dawnTday); dawn.alpha = 100; //setChildIndex(dawn, (getChildIndex(night))); } } function switchLayers(e:Event):void { setChildIndex(dawn, 0); setChildIndex(night, 1); setChildIndex(sunset, 2); setChildIndex(day, 3); night.alpha = 100; sunset.alpha = 100; day.alpha = 100; dawn.alpha = 100; stage.removeEventListener(Event.ENTER_FRAME, switchLayers); }

    Read the article

  • Flash Mouse.hide() cmd+tab(alt+tab) bring the mouse back

    - by DickieBoy
    Having a bit of trouble with Mouse.show() and losing focus of the swf This isn't my demo: but its showing the same bug http://www.foundation-flash.com/tutorials/as3customcursors/ What i do to recreate it is: mouse over the swf, hit cmd+tab to highlight another window, result is that the mouse is not brought back and is still invisible, (to get it back go to the window bar at the top of the screen and click something). I have an area in which movement is detected and an image Things I have tried package { import flash.display.Sprite; import flash.display.MovieClip; import com.greensock.*; import flash.events.*; import flash.utils.Timer; import flash.events.TimerEvent; import flash.utils.*; import flash.ui.Mouse; public class mousey_movey extends MovieClip { public var middle_of_the_flash; //pixels per second public var speeds = [0,1,3,5,10]; public var speed; public var percentage_the_mouse_is_across_the_screen; public var mouse_over_scrollable_area:Boolean; public var image_move_interval; public function mousey_movey() { middle_of_the_flash = stage.stageWidth/2; hot_area_for_movement.addEventListener(MouseEvent.MOUSE_OVER, mouseEnter); hot_area_for_movement.addEventListener(MouseEvent.MOUSE_OUT, mouseLeave); hot_area_for_movement.addEventListener(MouseEvent.MOUSE_MOVE, mouseMove); stage.addEventListener(Event.MOUSE_LEAVE, show_mouse); stage.addEventListener(MouseEvent.MOUSE_OUT, show_mouse); stage.addEventListener(Event.DEACTIVATE,show_mouse); hot_area_for_movement.alpha=0; hot_area_for_movement.x=0; hot_area_for_movement.y=34; } public function show_mouse(e) { trace(e.type) trace('show_mouse') Mouse.show(); } public function onActivate(e) { trace('activate'); Mouse.show(); } public function onDeactivate(e) { trace('deactivate'); } public function get_speed(percantage_from_middle):int { if(percantage_from_middle > 80) { return speeds[4] } else { if(percantage_from_middle > 60) { return speeds[3] } else { if(percantage_from_middle > 40) { return speeds[2] } else { if(percantage_from_middle > 20) { return speeds[1] } else { return 0; } } } } } public function mouseLeave(e:Event):void{ Mouse.show(); clearInterval(image_move_interval); } public function mouseEnter(e:Event):void{ Mouse.hide(); image_move_interval = setInterval(moveImage,1); } public function mouseMove(e:Event):void { percentage_the_mouse_is_across_the_screen = Math.round(((middle_of_the_flash-stage.mouseX)/middle_of_the_flash)*100); speed = get_speed(Math.abs(percentage_the_mouse_is_across_the_screen)); airplane_icon.x = stage.mouseX; airplane_icon.y = stage.mouseY; } public function stageMouseMove(e:Event):void{ Mouse.show(); } public function moveImage():void { if(percentage_the_mouse_is_across_the_screen > 0) { moving_image.x+=speed; airplane_icon.scaleX = -1; } else { moving_image.x-=speed; airplane_icon.scaleX = 1; } } } } Nothing too fancy, im just scrolling an image left of right at a speed which is generated by how far you are from the middle of the stage, and making an airplane moveclip follow the mouse. The events: stage.addEventListener(Event.MOUSE_LEAVE, show_mouse); stage.addEventListener(MouseEvent.MOUSE_OUT, show_mouse); stage.addEventListener(Event.DEACTIVATE,show_mouse); All fire and work correctly when in the browser, seem a little buggy when running a test through flash, was expecting this as ive experienced it before. The deactivate call even runs when testing and cmd+tabbing but shows no mouse. Any help on the matter is appreciated Thanks, Dickie

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >