ActionScript 3.0 :: Background Images Move Offscreen When Focus Is Off The Movie
Feb 11, 2009
I have background elements that slide left and right on the stage depending on where the mouse is on stage. If I take focus off the browser, like if I decide to check my email or open another tab in Firefox, when returning to my flash movie, all the elements have moved off the stage, and when focus is put on the stage, will slide back to the correct position.
I'm using an event listener on the stage to detect mouse movement...
the conent will not be able to be seen unless the user hits the arrow keys on there key board. So i need to make a group of objects i can make into a movie clip and than inside that movie clip make an animation that plays the squirrel running. i will pause here to ask two things i dont know how to do i want the squirrel to have an animation when standing still where it flicks its tail (like a real squirrel would). and also how would i flip the squirrel so when the left key is pressed it points left and when the right arrow is pressed it faces left? and my main question when it reaches the edge of the stage the extended background that runs off stage moves over to reavel more content. as well as not have the squirrel run off stage? in short i am using the squirrel to view the full pages content.
how to load different background images into the flash movie, so that they appear randomly (each time a different image, not in the same order). I would think to put the imgs into external swf and then load them into my main swf, but how do I get the random effect?
I am trying to create a slider that will move a series of images in a movie clip based on the location of the slider. The problem I have is that when you click and drag the scroller it will move the images once but after that the images will not move. I am guessing that the problem is with my code. I want to move the _x of the images movie clip based on the _x of the slider. Here is the code I am using which is placed in frame one of the "timelineSlider" MC:
[Code]...
If it will help I can send the the original .FLA file by email as it is too large (225kb) to post on the forum.
I created a custom component that is a s:SkinnableContainer. I want the background and other items to fade out when this component is visible. Something similar to what happens when calling Alert.show(..) so the Alert box is in focus and everything else is faded out.
I initialized the variables, the TABBING thing doesn�t work and when I select something from the combo box, seams that the focus doesnt move to the next are even if I click on it, I need to click 2 times on the next text area to move the focus.HERE is the code that i am using...
var a_1 =""; //text areas inputvar a_2 =""; //text areas inputvar a_4 =""; //text areas inputvar a_6 =""; //text areas input var cb_slang:Object = new Object(); //combo boxm_s_lang.addEventListener("change", cb_slang);cb_slang.change = function(){ m_g_slang = m_s_lang.value;}var cb_stype:Object = new Object(); //combo boxm_s_type.addEventListener("change", cb_stype);cb_stype.change = function(){ m_g_stype = m_s_type.value;}
I'm creating something like a randomly generated maze in flash. For this, I fill the game space with blocks, and then have an algorithm that deletes certain connecting blocks to form a path.When I generate the blocks, flash has no problem with putting them in offscreen points like (-1000, -1000), but then when I try to delete them afterwards to form a path, stage.getObjectsUnderPoint() returns nothing for these points.How do I get objects under a point if they are not on the screen?
I'm building a fullscreen flash website. I have objects moving from offscreen to the center of the stage and from the center to offscreen. I use a simple onResize listener to keep everything centered when the user resizes the stage. I'm using the MC Tween engine for all my tweens and they are all coded relative to the size of the stage.
[Code]...
Everything works great EXCEPT if the user resizes the stage while a tween is in motion. How do I update the tweens end value to the appropriate location?
I would like to have my background image change images every so often. I would like to use only AS3 for this. Could someone point me in the right direction. I am new to the language as well as flash.
How does flash player handle objects when they are no longer on the visible stage? Is the graphical data still in memory? Does hittestobject/point consider them? Are enterframe and interval events still running?
In AS2 I would hold metaobjects (minimal x,y,width,height data) that would delete/create movieclips as the screen scrolled. Is this still a correct approach in AS3? If not, is there anything I can do to offstage display objects that improves efficiency, assuming around 400 are created initially?
i've got some code where a sprite follows the mouse around the screen. Now I want to also move the background so that it gives the impression of moving around a space. At the moment, the background moves ok but it stops when the mouse gets to the edge of the stage. Does anyone know how I can make the background continues moving once the mouse is at an edge to give the impression that the user is moving through space?
Code: var ball:Ball = new Ball(); addChildAt(ball, 1); ball.x = stage.stageWidth/2;
ive made an xml slideshow on my application however when i try and move to another screen the slideshow keeps going in the background this is the webite of the tutorial i used:
How is an effect like this created? The effect is after you click "enter site", you see the background moves a bit when the viewer moves the mouse.[URL]
I am trying to make a spaceship game and in order to make it look like my spaceship is moving I need to make my circles in the background move forever. I tried using the Continuous Movement tutorail but it makes my circles get bigger when I move my mouse and when I move my mouse all the way to the right it gets faster and left gets slower does anyone know how to change the actionscript for the circle movie clip to make it not do those things?
does anyone know how to 'focus' on a flash movie? for example, my flash webpage has a button that when clicked opens a flash movie. i want the main site to darken and the flash movie to be in front in focus.url...
when i have this line active(the red one) it gives me automatic focus, so no clicking to be able to detect key input so i got that going for me which is nice BUT when i have it active(not commented out) i get this big yellow line which goes away when i click it(seeBelow)
I have a very simple player which connects to a shoutcast stream. All it has is a play/stop button, and a volume control, which control a mp3 Playback Component.However, everytime I click anything within the flash movie, a little focus border appears around my flash movie. You know how when you press tab on the keyboard to switch between different elements in a program, such as different buttons, and that little dotted border appears on the button you are on? Well, that happens to me, and I am not sure why or how to get rid of it.
i have 2 movieclips: i want to move both of them but the second movie clip will only move if the first clip reach his final destination how do i do that?
Then I test my movie from inside flash 9 (ctrl+enter) the MC I just edited keeps in focus: When I test a game and press UP DOWN etc. The MC inside my fla is moving too, while the compiled swf is playing!
For a project I am working on, I need the focus to be on a test field when the site loads. I can get the focus to be on the text field in the swf file, but how do I set focus to the swf file in the first place in the browser.
I've created several buttons and each contains a movie clip. I then placed each button on the main scene. Everything works well except the movie restarts every time the button over event is fired. I added a mouse over listener to each button so I can reposition the button. However, the movie restarts even if I don't reposition the button. (i.e. Button 1 is active and the mouse leaves the player and returns to Button 1.) How do I keep the movie that is embedded in the button from restarting?
I have two flash movies, on different tabs of a user's browser.They use LocalConnection to talk to each other, but the one on the tab which isn't active doesn't do anything until you switch back to that tab, can you change this? Maybe in the embed tag?
My problem is, I have setuped a simple iPhone app in Flash.I compile it, but some of elements are missing.Like i have *.png images for title and background, and problem is background is not appearing.Layers are set correctly, in editor they are positioned right.
Me and My friend building part of a site in AS2 which needs to preload images while the user is on the site. For example: Illustration section has 10 images A user clicks on the link for this section the images will begin to preload without the user knowing. They will be able to click on a link for an image and it will either display if fully loaded, or continue to load as a priority over the other images that are loading until it is ready to be displayed.
How would i go about loading a set of images in the background? Just so that they are ready to go and I don't have to load them per image. I want to load the whole set for each section of a site.
I have loaded 11 pictures through an array and a loop and then tweenlite'd them so them come on the screen from the right and move across 'til the middle picture is in the middle of the screen.Now, I am trying to figure out how to make it so I can move them to the right or left by a press of a button, (bntLeft and btnRight).Three pictures show on the screen at one time. So if btnRight is clicked then the 3 pictures which are off the screen to the right would come on and center in the screen. And if btnRight was clicked again then the pictures would move to the left and the last picture would come on.I don't know if that is going to make sense to anyone but me so I have created a picture to show what I mean.I also attached a snippet of the code I am using in case you need to see it. (I can post it if you want) Attachments:what i am trying to do.jpg
I have a simple single main timeline for the website with 6 navigation buttons. Each button sending the playhead to a label keyframe (the site has 6 'pages'). I converted 6 photos to movie clips and added one to each of the 6 labels as a full page background. To each movieclip photo, I have added a fade in blur using one of the FLASHeff effects so when a nav button is clicked, the background fades/blurs in, I have given each background 20 frames to allow the blur to fully complete.
Now all that works as expected... but now the fun begins... what I would like to do is that when a navigation button is clicked, whichever of the 6 backgrounds is currently showing will fade/blur out first before the new background photo fades in. I could do this with 36 (the total combination of transitions with 6 photos and 6 buttons). A bit of an ugly solution!
My question is: Is there a more elegant and dare I say, sexy actionscript 3 way to do all this and hopfully still be able to use flasheff for the blur effect?
I had better get up to speed using actionscript 3 to save myself further forum embarrassment.