Flash :: Changing The Position Of AIR-window?
Feb 20, 2010I created a simple transparent app for Adobe AIR in Flash. It has not chrome, so now I need to make it draggable. How could this be done?
View 1 RepliesI created a simple transparent app for Adobe AIR in Flash. It has not chrome, so now I need to make it draggable. How could this be done?
View 1 RepliesI added a Menu_mc on my stage. Initially, this should be at the center of the stage and when I click on it, it will tween on the upper left corner of the browser. However, when I resize the browser, the Menu_mc goes back to the center of the screen.
I have tried separating a different actionscript file where it is specifically for initialization of the object and another one for resizing. And then when I call it on my main AS file it goes like this:
Code:
// Add the symbols to stage
var Menu_mc = new Menu_MC();
addChild(Menu_mc);
[code]...
But it seems futile.
I've run into a new problem, this time with positioning. I've narrowed down the line that's causing it--"block.y = block.y + block.height;" in SetOfBlocks.shiftDown. When I take it out, no problem. But with it in, instead of just dropping each block down by a block height, the affected blocks sometimes move up, and also often move about randomly within the X axis--although their new positions always keep them lined up with the 'grid', which is to say, within multiples of the block height and widths.
[Code]...
A simple question, "How can position my flash in the middle of the window browser."Now do I need to add an action sctipt to the site or it's something to do with publish sitting?
View 1 RepliesIm new to flash and doing my best to teach myself.Im using CS3.I've already been working on this project for a while, and I don't know why this is all of the sudden happening.I have a text graphic that I want to create a motion tween with.I created a new layer for it, and drug it to the stage.If I tested the movie at that point, it looked fine and didn't move. If I tried to move the original keyframe, or added a motion tween, it would look fine when I played it on the stage, but when I go to "test movie", its either not on the screen at all, or its in a totally different position.
View 1 RepliesI got an mc (named "img") on the stage. In order to zoom it, I'm using the following code:
Code:
myZoom = function (myDepth){
if (myDepth == "deep") {
myDepth = 4;
} else if (myDepth == "medium") {
myDepth = 8;
[Code] .....
Problem is, when I release on the mc it changes its original position to X=0,0 Y=0,0 as you can see here. Obviously, I want it to keep its starting position on the stage and zooming in and out from there.
There is an fscommand function to turn the flash movie into full screen. But is there a way to control where exactly the flash window opens on the desktop (and whether it is maximized - note. NOT full screened).
My client is complaining that whenever he opens the flash movie (exe) it is shifted to the right such that the X window close button is not visible. Obviously he can just drag the window to the left, but you know, you gotta always make your client happy. Is this possible without using an external application like zinc?
Is there a way to change the window title caption of a flash exe file, from "Macromedia Flash Player 8" to something else?
View 4 RepliesI'm creating sort of a game in Flash, which requires invisible hotspots changing their position in time, relative to the stage. The question is: can I simply keyframe the hotspot position and have it work, or is there something that I should consider?
View 5 RepliesHow about make the Flash Player remember window position after exit? So that it opens in our preferred position everytime?
View 1 RepliesI am making a dragable map and there are few thing on top of the map(UI). When the map is double clicked it enables drag. But it's changing the index position, basically, it going over the UI. what's the easiest way to control the index position of the map? The click and drag event is controlled in mapZoom class.
this.addEventListener(MouseEvent.MOUSE_DOWN, enableDrag);
public function enableDrag(e:MouseEvent):void
{
this.startDrag();
}
I know I can horizontally flip an image using ActionScript Code: image.scaleX *= 1;
However, this seems to move the left border of the image past its x coordinate.
I would like to make sure that the image stays within the same borders as before and that (x,y) is still the top left corner. Short of wrapping it in another image, is there a way to do that?
i added a vcam in my game but it messes up the x and y position of my moveclips, when i pressed space to shoot fireball, the fireball's position keep changing. Everything is working right before adding the vcam. Does anyone have a solution to this or why does vcam cause this to happen?
View 2 Replieshow do u make a currently playing song (s1) move to a new spot in the song? s1.position=wure; were wure is the position in milliseconds i want it to be does not seem to work .
s1.stop;
s1.play(wure,0);
does not seem to work either
I want to write a function which removes elements from an array of integers starting from the lowest values without changing the positions of the elements. Programming language is ActionScript3.
[Code]...
I know Array.NUMERIC and Array.DESCENDING would change the position of the elements, but I can't seem to figure out the logic on how to keep their positions.
Is it possible to change the mouse-pointer position in fullscreen. I want my mousepointer never hits the left or right side screen walls.. in case it does so, it resets itself in between somewhere.
A fake mouse pointer using a movieclip, won't solve this problem, because after-all i have to save the mouse pointer from hitting screen-walls.
Well the animation works okay despite the convoluted timeline. You can select any transfer case mode by moving the slider switch. To shift into neutral from any gear, you press the neutral (N) button. To exit neutral, you press the neutral button again. If you shift into N from either 4WD Auto or 4WD Low, the slider switch jumps to 2WD even though there should be no movement and the animation goes where it is supposed to. It's been a long time since I've been able to work in Flash and it's so close to complete that this is driving me nuts.
View 0 RepliesThis is a 2 part question really:
1) I'm trying to change the position of two different MovieClips instances to the same .x position. It works individually, but as soon as I put this code in, it says that it cannot assign it to a non reference value:
ActionScript Code:
coinArray[1].x && coinShadowArray[1].x = -591.5
2) I have a whole load of variables which are all going to different .x positions at the same event trigger - something similar to this, but there's around 30 of them:
ActionScript Code:
object[1].x = -560
object[2].x = 764.45
object[3].x = 700.45
object[4].x = 740.45
I know this can't be to hard too achieve, but my actionscript skills aren't quite up to it yet.
- I have 5 frames within a MC.
- In this MC there is text saying "center", "left", "right", "up", "down" on each frame.
- All I want to be able to do is make the MC change to frame 3 "right" when my mouse moves to the right of the MC.
I know the script below is wrong, but would it go something like, this. Would I have to use angle and math or is there a simpler way to achieve this?
onClipEvent (mouseMove)
get x position
get y position[code]......
I have a button symbol on my stage that I want to change size depending on where the mouse is on stage. ie: the y position of the mouse will make the x and y scale change (the symbol should get smaller as the mouse moves up the page and larger as it moves down - as if it is getting closer or further away).
View 1 RepliesI've loaded a clip in my main swf and I want to flip it by using scaleX*=-1the problem is that in my clip, the animation is at the center of the stage so when I load it and flip it using scaleX instead of staying at the same place it flips by using the top left corner of the clip as a pivot instead of the center of the animation itselfI could either solve this problem by placing the center of my animation on the point (0,0) in the clip or flip then rearrange the clip's x position inside my main swf...but is there a more effective method?
View 3 RepliesI know this can't be to hard too achieve, but my actionscript skills aren't quite up to it yet.
- I have 5 frames within a MC.
- In this MC there is text saying "center", "left", "right", "up", "down" on each frame.
- All I want to be able to do is make the MC change to frame 3 "right" when my mouse moves to the right of the MC.
onClipEvent (mouseMove)
get x position
get y position
if statement x= > -180 and y=> 0 (something like that)
_root.myMovieClip.gotoAndStop(3)
I'd like to open a window in my AIR/Flex application on a second monitor if it's available. Don't know how to go about it. Tried this:mySecondWindow.x = Capabilities.screenResolutionX;
But this only gets the size of the first monitor and if I try to assign a greater value, it switches to default 100px offset. Is there a proper approach to this? My native screen is maximized in "preinitialize" and then I open the second window on "applicationComplete".
How do you set the position of an AS3 AIR Project window programmatically?It is simple to do with application descriptor, but I cannot get it to work through code.All research has lead me to stage.nativeWindow.x = 200; but this does not do anything for me.
The following has no effect:
public function Main():void
{
[code].....
In Flash CS5 (Mac OS). Window menu... right at the bottom it lists the windows you've got open with a number in front ie:
1 project.fla
2 class.as
3 interface.as
Now... if I click (with the mouse) to focus (activate) the window menu and press a number key corresponding to a window in the list, Flash kindly takes me to that window. Q: What is the 100% keyboard shortcut way to do this? I've had a go at wading in and just pressing keys... as my last-but-one strategy for finding this out. My last strategy being "ask".
is it possible to keep putting onEnter actionscript for changing the size of the movie window, on one frame right after another? so the window size is changing constantly? and also, what would the as be for changing the size/dimension of the window that the flash is playing in?i know, it "fscommand {" but im not sure what goes inside the command.and then i would use setInterval { to start a timer before the next js command would be used to change the size again.
View 1 RepliesI am trying to change the position of a movie clip which is acting as a menu and loading other swfs onto the stage. The problem is, is that the movie clip is also animated and when an swf is loaded the movie clip appears underneath the loaded swf. What method I should use to change the hierarchy of this movieclip.
View 2 RepliesI load an SWF using a simple loader but it changes the main applications x/y position and size.Which loader do I use to load an swf that will maintain the position size of my app?
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, function handleInit(event:Event):void{
var UIDesigner:UIComponent = new UIComponent();
[code]......
I'm writing a game with Flash CS5/AS 3.0 that tries to simulate depth of field by drawing all the relevant Movie Clips based on their Y position in ascending order, i.e. things lower on the stage overlap things higher on the stage. A MovieClip with a Y position of 10 would therefore need to have a lower index compared to a MovieClip with a Y position of 20, so the second one gets drawn on top of the first.
I wrote a quick and dirty function just to test this. During the trace, I've noticed that the truck's index hits 0 when I go near the top of the stage, but if I go too far up it will completely disappear from the stage. Trace then starts generating this error:
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/getChildIndex()
at EICT::Game/ReorganizeDisplayIndexes()
[Code].....
I'd like to make sort of gallery with previous/next buttons. And on each image you'd have circles/link over important parts of the image.So each image wold have these circles on different locations. Question: how can I make that dynamically? And that it's not to complicated for the editor of the site? One way would be to write in XML x and y positions.
View 0 Replies