w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Flash AS3 stage.colorCorrectionSupport always resolves to unsupported - what happened to stage.colorCorrection?
(yeah this is an old question, but I was product manager for Flash Player 10, so I thought I'd answer) It works with window mode because Flash Player gets the rectangle in the browser and gets pretty much full control of the rendering stack and doesn't have to deal with compositing with items it doesn't know the color status of. When you switch to something like wmode transparent, you go into a pretty crazy back and forth process compositing with the rendered elements above and below it. When you go into wmode GPU, the rendering stack is largely handed over to the GPU (not surprisingly). In both cases, Flash Player loses some control of the rendering stack and at that point things like color correction aren't possible. The primary reason for this feature in Flash Player 10 was to enab

Categories : Actionscript

'stage' parameter for building the boost: "don't know how to make stage"
As @Stigmha pointed out very often it is the case that we can avoid building boost by using the MSVC compiled version of binary. Response from Boost.Build community: If the goal is to build all the boost tools, then you have to run the build commands from the boost build root. --prefix is meaning-less if you're doing a 'stage' build of Boost, as it only matters when doing an 'install' build. --build-type is spelled with a dash in the middle.

Categories : C++

Maps is working on development stage, but not release stage?
Add you production certificate to your google maps API key. One maps key can easily work with multiple certificates, which allows you to have one Google Maps key, and do not bother which certificate your app is currently signed with. To assign more certificates to one Google Maps key, simply put certificate hash and package name in separate line, i.e.: AA:BB:CC.......;com.webnetmobile.test XX:DD:ZZ.......;com.webnetmobile.test where AA:BB:CC... is certificate hash. One entry is for your debug certificate another for production. You can also edit current key, to add new entries, so no need to recreate. BTW: invalid key causes no crash anyway.

Categories : Android

AS3 - PrintJob - print stage or part of stage
Printjob's addPage method is expecting a Sprite as first parameter. What are you trying to achive by passing 0? If you want a blank page, try: var myPrintJob:PrintJob = new PrintJob(); myPrintJob.start(); /*Initiates the printing process for the operating system, calling the print dialog box for the user, and populates the read-only properties of the print job.*/ myPrintJob.addPage( new Sprite() ); myPrintJob.send(); Another example with a red square: var s:Sprite = new Sprite(); s.graphics.beginFill(0xFF0000); s.graphics.drawRect(0, 0, 80, 80); s.graphics.endFill(); var myPrintJob:PrintJob = new PrintJob(); myPrintJob.start(); /*Initiates the printing process for the operating system, calling the print dialog box for the user, and populates the read-only properties of the print job

Categories : Actionscript

AS3 - use of stage in an external swf
No, there's only one stage. In your case it will represent the parent SWF's stage. But to get around your fullscreen problem you could still set the stage to fullscreen mode and then scale stage_mc to fill the parent SWF.

Categories : Actionscript

Run a second stage as dialog
FXMLLoader loader = new FXMLLoader(); loader.setLocation(getClass().getResource("/fibonaccipriceretracement/FibonacciPriceRetracementDialog.fxml")); Parent content = (Parent) loader.load(); Stage stage = new Stage(); stage.setScene(new Scene(content)); stage.show();

Categories : Java

Get dimensions of stage
You should use "stage.stageWidth" for width of stage or "stage.stageHeight" for height of stage. Remember that if you use nested movie clips into your flash project, and you want to control some objects in them; it's better x and y coordinates of your movie clips that contain your objects set in zero values; if x and y coordinates is set to another value, you must find some calculations for achieve to what you want to do. If you want to know about differences between stage.stageWidth and stage.width or stage.stageHeight and stage.height, please check following links: Difference between calling stage.width and stage.stageWidth? Difference between stage.width and stage.stageWidth For better understanding, I describe it with an example. Imagine that we have a stage with 1024px width and

Categories : Misc

C++ multi-stage linking
Ouch. So many misunderstandings. You don't need the previously compiled object files to compile further source files to object code. However, you do need to link them together at the end of the compilation process, including any libraries required. All in all: gcc -c pegio.c -o pegio.o g++ -c PegIOHandler.cpp -o PegIOHandler.o -std=c++0x g++ -c PegRTU.cpp -o PegRTU.o -std=c++0x g++ -o executable_name *.o -lopendnp3 # or whatever linker flag is needed for OpenDNP3 And pretty please, read this.

Categories : C++

Advancing Stage in jQuery
What you have there doesn't make much sense, so I'm guessing this is what you're trying to do : $(function(){ var textContainer = $('#text'), inputLine = $('input'); textContainer.text('What is your name?'); inputLine.focus().on('keyup', function(e){ if (e.which === 13) { e.preventDefault(); textContainer.text('Hi there, ' + this.value + '.'); this.value = ""; } }); }); FIDDLE There is no way stage could be anything other than zero right after it's set to zero? What happens inside the event handler, happens "later", so checking stage after the event handler still gives you ... wait for it .... zero ?

Categories : Javascript

Solved: AS3 Getting to Control Stage
I have solved it. I didn't control the main stage what I did was, I reduced the main stage layer in the lobby layer when I load the left and right arrow I attach an event listener for a custom event. In the arrows movie I have written a function to dispatch the event here are the lines of code I used in the "main" stage of the movie you want to control: //ball loader prep and load var ballLoader:Loader = new Loader(); var ballRequest:URLRequest = new URLRequest("lobbyBalls.swf"); ballLoader.load(ballRequest); ballLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, ballsLoaded); function ballsLoaded(event:Event):void{ trace("ball Loader complete"); ballLoader.x = 50; ballLoader.y = 200; stage.addChild(ballLoader); ballLoader.content.addEventListener("Previous

Categories : Actionscript

Remove all Instance on stage as3
You're adding the new objects you create to the array, and then using that to remove them. But you're forgetting to either create a new list or remove the objects from the old list. So, when time comes to loop over the list you're trying to remove objects that have already been removed. You can fix this in several ways, one is to remove objects from the stage AND array in your loop: function remove(me:MouseEvent):void { while(fCombo.length) { removeChild(fCombo.pop()); } positionY = 80; positionX = 0; }

Categories : Actionscript

stage orientation in flash
Did you tried to use: Starling.handleLostContext = true to handle lost Context? This option should be enabled before you launch your Starling instance and it is the easiest way to automatically handle lost context.

Categories : Android

JavaFx 2.x : Stage within a TabPane
Here I put an example of windows from jfxtras inside of Tabs, I just modify the example. 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.scene.control.Label; import javafx.scene.control.Tab; import javafx.scene.control.TabPane; import javafx.stage.Stage; import jfxtras.labs.scene.control.window.CloseIcon; import jfxtras.labs.scene.control.window.MinimizeIcon; import jfxtras.labs.scene.control.window.Window; public class WindowInTab extends Application { private static int counter = 1; private void init(Stage primaryStage) { TabPane tabPane = new TabPane(); Tab tab = generateTab("Windows..."); Tab anotherTab

Categories : Java

Stage not drawing it's Actors
I suppose the last parameter should be some height (instead of getWidth()). batch.draw(region, getX(), getY(), 150, 720, 0, 0, region.getWidth(), getWidth());

Categories : Java

Show a subclass on the stage
In player class, call init function in the player constructor. and I think you should call this line when player add to stage,not in the init function stage.addEventListener(MouseEvent.MOUSE_DOWN, onClick); Try this private function init():void { //your code this.addEventListener(Event.ADDED_TO_STAGE, onAddToStage); } private function onAddToStage(e:Event):void { stage.addEventListener(MouseEvent.MOUSE_DOWN, onClick); }

Categories : Actionscript

Remove sprite from stage in as3
Your code isn't written well and needs rewriting to ensure reuse or scalability of your project, but here's a quick way out. make a holder Sprite, something like var messageHolder:Sprite = new Sprite(); addChild(messageHolder); add all the messages to that holder in any fashion you like. When you need to erase the contents of that holder, call following method: function clearHolderContents(holder:DisplayObjectContainer):void { if (holder.numChildren < 1) return; // no need to continue this method if the target is empty for (var i:int = holder.numChildren - 1; i >= 0; i--) removeChild(holder.getChildAt(i)); } This method can clear contents of any DisplayObjectContainer => use it for your messageHolder: clearHolderContents(messageHolder); Hope that helps!

Categories : Actionscript

Loading an Image with AIR and Displaying It On Stage
One option is to use Loader.loadBytes(). If you're using Flex, you could also use an Image with source set to the File.

Categories : Actionscript

The second User Input stage is not showing up
Your if-statement(s) is never true. answer is a String variable, while counter1 is an int. if (answer.equals(counter1)) { ... From the docs: public boolean equals(Object anObject) Compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object.

Categories : Java

Setting std::shared_ptr source at a later stage
Irrelevant of shared_ptr and other stuff, all your code boils down to: int a = 0; int b = a; a = 42; // why b isn't == to 42? Think about it for a second... I'm afraid that's as much an answer as I can provide. Don't hesitate to ask for clarification, I'll gladly answer, but before you do please think about it again.

Categories : C++

How to tell what stage a CSS3 animation is at using jQuery?
I don't think there are notification events for the middle stages of a single animation. As a workaround, you could chain two separate animations (start the second animation when the first one ends using JS) and use the event at the end of the first one to know when the middle of the whole sequence was reached. Here's an article on a work-around: CSS Animation Keyframe Events (Javascript solution)

Categories : Jquery

Primary stage changes scene size
My test program looks like this: @Override public void start(final Stage stage) throws Exception { StackPane root = FXMLLoader.load(getClass().getResource("stage.fxml")); final Scene scene = new Scene(root); scene.widthProperty().addListener(new ChangeListener<Number>() { @Override public void changed(ObservableValue<? extends Number> observableValue, Number number, Number number2) { System.out.println("width: "+number+" -> "+number2); } }); boolean resizable = true; stage.setResizable(resizable); stage.setTitle("Stage Resizable "+ resizable); stage.setScene(scene); stage.centerOnScreen(); stage.show(); } When the Stage#reziable flag is set to false, for example, setWidth is called twice. With your exa

Categories : Java

Set application name on stage files on capistrano
There is nothing functionally wrong with your code. As Lavixu mentioned, as long as you specify the stage name when deploying (i.e. cap beta deploy:setup, cap beta deploy) then the application variable will be recognised.

Categories : Ruby

In App Purchase - Help on Last stage - downloading content
Here is some sample code from one of my apps which will hopefully help you. Essentially what you have to do is determine the index of the product that was purchased and then provide content based on that. If you only have one in-app purchase then you can simply provide the content after the purchase notification. - (void)productPurchased:(NSNotification *)notification { [self makeSuccessAlert]; NSString * productIdentifier = notification.object; [_products enumerateObjectsUsingBlock:^(SKProduct * product, NSUInteger idx, BOOL *stop) { if ([product.productIdentifier isEqualToString:productIdentifier]) { if (idx == 0) { coins = [NSNumber numberWithInteger:[coins integerValue] + 5000]; NSLog(@"coins %d", [coins integerValue]); [totalCoins

Categories : IOS

Stage is hidden when dialog is shown
You need to set the proper relationships between primaryStage and dialog stage. Here's a hint to get you going: ... dialog.initOwner(primaryStage); dialog.initModality(Modality.APPLICATION_MODAL); dialog.showAndWait(); You can find more information in Oracle's JavaFX 2 JavaDocs. More example code (edit) I'm using setOnHiding(..) instead of setOnCloseRequest(..): stage.setOnHiding(new AskUserIfHeReallyWantsToQuitWindowHandler(stage)); I extracted your code into a seperate event handler class and fixed the issues I mentioned (sorry, I am little short on time right now): public class AskUserIfHeReallyWantsToQuitWindowHandler implements EventHandler<WindowEvent> { private final Stage primaryStage; public AskUserIfHeReallyWantsToQuitWindowHandler(final Stage primaryStage

Categories : Java

Web.ReadyState does not reach 'complete' stage
Ive replaced the existing problematic code with the following (found on http://thebotnet.com/programming/50229-c-make-the-webbrowser-wait): while (web.IsBusy) System.Windows.Forms.Application.DoEvents(); for (int i = 0; i < 500; i++) if (web.ReadyState != System.Windows.Forms.WebBrowserReadyState.Complete) { System.Windows.Forms.Application.DoEvents(); System.Threading.Thread.Sleep(10); } else break; System.Windows.Forms.Application.DoEvents(); I've tested it a few times and all pages seem to be scraped fine. I'll continue testing it just in case, but if you have any information on issues it could cause please let me know, as I may not find them myself.

Categories : C#

Adding file to git's stage does nothing and cannot be committed
Typically when git gets into a confused state, removing and re-adding the file to the cash will fix it. git rm --cached foo It seems the most common way that a file arrives in the confused state, is when performing a mv from the command line. I've found that using git mv instead of mv helps prevent running into this issue. http://linux.die.net/man/1/git-mv Lastly, If you are going to delete a file from a git repository, use git rm instead of just rm Why use 'git rm' to remove a file instead of 'rm'? https://www.kernel.org/pub/software/scm/git/docs/git-rm.html`

Categories : GIT

What make scaled stage cost so much?
It has to render a lot more if you scale up the window? Rendering graphics is probably the most processor intensive thing that Flash does, so increasing the amount of content it needs to draw onto the screen is going to hurt performance.

Categories : Performance

Dragging an undecorated Stage in JavaFX
Strategy You already have a reference to the stage in your start method. What you need is to be able to pass the stage to your controller, so that the controller can make the stage draggable by a given node. The "Passing Parameters Directly From the Caller to the Controller" method may be used to pass a stage reference to your controller: Passing Parameters JavaFX FXML. Use the makeDraggable method from this sample code to allow the stage to be dragged by a given node. Sample Implementation Some psuedo-code for the Application start method follows: stage.initStyle(StageStyle.UNDECORATED); stage.initStyle(StageStyle.TRANSPARENT); FXMLLoader loader = new FXMLLoader( getClass().getResource( "fxml_tableview.fxml" ) ); stage.setScene( new Scene( (Parent) loader.load()

Categories : Java

KineticJS - Scaling stage to viewport
On a separate problem I was trying to help solve, the user him/herself (user848039) figured out a solution that dealt with mouse position and KineticJS scaling. This was the question: kineticjs stage.getAbsoluteMousePosition()?. Credits go to him, but here was his formula that I modified to meet a more common KineticJS setup: var mousePos = stage.getMousePosition(); mousePos.x = mousePos.x/stage.getScale().x-stage.getAbsolutePosition().x/stage.getScale().x+stage.getOffset().x; mousePos.y = mousePos.y/stage.getScale().y-stage.getAbsolutePosition().y/stage.getScale().y+stage.getOffset().y; Perhaps jsFiddle isn't the best example for this, since you want the stage to be innerWidth and innerHeight. Those measurements seem to play a bit weird in the jsFiddle frame, but if you look at the

Categories : Javascript

Load stage with all elements in kineticjs
1) What is going on with your JSON file? the base64 string has blown up into a million lines... For starters, KineticJS.Layer cannot have a layer as a child. References: https://github.com/ericdrowell/KineticJS/wiki/Change-Log#455-july-28-2013 new add() validation. An error is thrown if invalid children are added to a parent, for example, when adding a layer to another layer. https://github.com/ericdrowell/KineticJS/wiki KineticJS event not fired for child of a grouped layer Inside your JSON file, you have tons of layers layered within each other, this is definitely going to cause a problem. Actually it looks like you have a layer for EACH group that you have! This is completely wrong KineticJS structure. You should do some research on how and when to use layers and groups, her

Categories : Javascript

ActionScript 3, handling MOUSE_UP outside stage
To track object being dragged this works good for me: ball.addEventListener(MouseEvent.MOUSE_DOWN, onBallMouseDown) var _stage:Stage; private function onBallMouseDown(e:MouseEvent):void { _stage = stage; stage.addEventListener(MouseEvent.MOUSE_UP, onStageMouseUp) stage.addEventListener(MouseEvent.MOUSE_MOVE, onStageMouseMove) ball.startDrag(); } private function onStageMouseMove(e:MouseEvent):void { // track ball coordinates } private function onStageMouseUp(e:MouseEvent):void { ball.stopDrag(); _stage.removeEventListener(MouseEvent.MOUSE_UP, onStageMouseUp) _stage.removeEventListener(MouseEvent.MOUSE_MOVE, onStageMouseMove) }

Categories : Actionscript

AS3: Determining whether or not stage.focus is on any textfield
You can use the is operator. private function keyboardEventHandler( e:KeyboardEvent ):void { if ( e.target is TextField || e.currentTarget is TextField ) { return; } // run the original handler } Via the LiveDocs: Evaluates whether an object is compatible with a specific data type, class, or interface. Use the is operator instead of the instanceof operator for type comparisons. You can also use the is operator to check whether an object implements an interface. So it allows you to check if an object is of a certain data type/class, in this case a TextField.

Categories : Actionscript

Is there a way to hide a stage after a speficied time?
A solution with a Timeline: final Stage stage = new Stage(); stage.setScene(new Scene(new Label("Hello"))); stage.show(); Timeline timeline = new Timeline(); timeline.getKeyFrames().add(new KeyFrame(Duration.seconds(10), new EventHandler<ActionEvent>() { @Override public void handle(ActionEvent event) { stage.hide(); } })); timeline.play();

Categories : Java

Referencing an array on stage from another movieclip
"this" refers to the MovieClip your code is within. If you want to access the parent MovieClip (in this case the root or stage) you can either use parent.hotSpots or stage.hotSpots. However, this requires the MovieClip to be added to the stage (and thereby the display list), otherwise both parent and stage will be null. If you want to wait for a MovieClip to be on stage before executing code where you refer to the stage variable you can use the event Event.ADDED_TO_STAGE

Categories : Arrays

How to create a stage fill with tabs?
Don't put the tab pane into a grid. You can put it directly into the scene like: Scene Scene = new Scene(tabPane, 800, 600, Color.WHITESMOKE); And now you have all the tab pane adjusted to the size of the scene. Hope it helps!

Categories : Java

Git adding "unchanged" files to the stage
It seems like the assume-unchanged-bit is set for that file. With that bit set, git will not look for changes of that file anymore. Unset it by typing: git update-index --no-assume-unchanged <file> After that, git status as well as git add should detect the changed file.

Categories : GIT

draw all shapes in a stage KineticJS
If you want to draw multiple lines in a for loop you need to use an array like this: var line = []; var line_count = 5; for (var i=0; i<line_count; i++) { line[i] = new Kinetic.Line({ points : line_points, stroke : 'black', strokeWidth : 5, lineCap : 'round' }); layer.add(line[i]); } layer.draw(); //We only need to draw the layer once, so put it outside the for-loop *After all the lines have been added to the layer, you can draw the entire layer once and they will all be drawn onto the layer together. JSFIDDLE

Categories : HTML

Play Stage command in windows
I don't know OpenShift's deployment cycle, however, you can use a play dist command to prepare standalone version of application like the stage command, but it will generate a zip file, instead writing the code into target directory.

Categories : Windows

Inserting minigames in a bigger flash stage?
Inserting an external SWF: import flash.display.Loader; import flash.net.URLRequest; import flash.events.Event; import flash.events.ProgressEvent; function startLoad() { var loader:Loader = new Loader(); var URLreq:URLRequest = new URLRequest("directory\minigame1.swf"); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler); loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler); loader.load(URLreq); } function onCompleteHandler(event:Event) { movieclip.addChild(event.currentTarget.content); movieclip.x = (stage.stageWidth - movieclip.width) / 2; movieclip.y = (stage.stageHeight - movieclip.height) / 2; } function onProgressHandler(event:ProgressEvent) { var percent:Number = event.bytesLoaded / ev

Categories : Actionscript

stage.toDataURL in KineticJS doesn't work
You shouldn't add the layer to the stage every time an image is added. What you should do is: layer.add(new_image); layer.draw(); //draws the new image added to the layer Also, your toDataURL method looks correct, in fact it looks exactly like this tutorial if you haven't checked it out yet.

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.