I hope the following is pretty self explanatory. There is a ball movie clip "mc1" on stage. The addEventHandler simply starts a tween and the ball rolls from left to right until it's off the stage. I'm simply trying to make the clip stop when it reaches a certain x value on stage. I'm trying to teach myself simple techniques for the if statement and loops.
making an object move from one side to another by using actionscript. so now i was wondering how to make the box get back into the same place as it started when it reaches a certain point.
instead of moving to 'distance' and staying there, the MC moves back and forth once it reaches it's destination. this is because even when _x = distance, the first if statement (_x<distance) keeps executing. At first I thought this didn't make any sense, and there has to be a reasonable explanation. I've managed to isolate and even solve the problem, but the mystery remains:
I have a project (see attached) where I need to have the folders seem like they are floating in space, and I need the best way to make it so when you click on a back folder, it slides off the screen and come back in front of all the folders.
I have a Flash object that I need to embed in a page, and I've got it in a wrapper div that is styled to the exact width of the object: 323px. The problem I have is that when I zoom the whole page in the browser (for example, by using ctrl+mouse wheel, or ctrl++ or ctrl+-, the wrapper div zooms, while the flash object does not. Is there a way that I can specify a width in physical screen pixels, so when I zoom in or out, the wrapper div stays the size of the Flash object?
I want to make a box come from off screen then bounce back and forth and then come settled down in the middle of the screen. It can be random bouning intervels or a set amount.
Some images I load dynamically are too big so I would like to scale them to fit the stage.
[Code]...
this returns 0. Why does it return 0 when the image loaded is obviously much larger then 0 pixels. How do I change the width and height of imgCont to a specified dimension.
I'm just trying to make a simple function that will return all the data from my SQLITE database as an array. But it looks like when my function is returning the array, the SQL statement is actually still executing... so it's empty... Does anyone have a suggestion? Or am I just going about this whole thing wrong.I know I could just have the event listener functions outside this function, and they could then set the data. But i'm trying to make a AS3 Class that holds all my SQL functions, and It would be nice to have everything for this particular function just in one function, so it can return an array to me.
public function getFavsGamesArray():Array { getFavsArraySql.addEventListener(SQLEvent.RESULT, res);
I just want a function to return true, but after a LoadVars.onLoad.event. Am I right in assuuming that the return in the onLoad = function below relates ONLY to that function? What I want is for the sendLockCheck()to return true depending on the if statement within the onLoad.
function sendLockCheck() { var lockCheckResult_lv:LoadVars = new LoadVars(); var lockCheckSend_lv:LoadVars = new LoadVars();[code].....
I was wondering if you could help me. I was trying to make a 'make-your-own-face-game', and succeeded, except one thing. When you click on a button to see the options for hair, the four buttons come from off the stage to on the stage by changing their x and y attributes. But then when they click the button to see the options for hair a second time, i want them to return off of the stage, and am getting problems. No syntax or as3 problems, but they wont go back.
how can i drag parts of a pazzle and drop them in the rihgt position? if the posision is wrong i want (the piece) to return back to its start posission.
I have a timeline that has some label frames at the very end of the timeline. During the timeline a user will hit a button on a frame and will jump to one of the label frames. On the label frame is another button that when clicked - returns the user to the previous frame. How do I make the movie return to frame 1 - without a button - but before it reaches the label frames? In other words, by simply reaching a certain frame in the movie, I want the timeline to go back to frame 1.
Basically, I have a flash app with various frames, each frame contains a "help" button, which when clicked takes the user to one seperate frame with various informative instructions on it. The help button is like a universal tool incase the users need help.
Now, no matter what frame the user is on, if they click the help button, sure enough, it takes them to the "help" frame. The big problem I have, is that I cannot fathom a way to make the users RETURN to the exact frame they came from.
For instance, the user is viewing a frame in the app called "Question 2", they get stuck, they click on the "help" button, it takes them to the "help" page. After veiwing the instructions, they need to return to the question 2 frame, possibly by clicking a "back" button of some description. Likewise if they were on a frame called "Question 3" - they need to return to this frame if they click the help button.
In a nutshell, I need to create a button that takes the user back to the previous frame from the "help" frame, like a dynamic link back or something.
im using cairnform framework as3 and i have a single swf file, and i m searching a while for back button to go back a previous screen with all data's which r there previously.
I have a swf file that loads into my main movie, and within that swf there is a masked image that i would like to scale using zoom in and out buttons and also by using a slider bar.However i cant find any tutorials that will allow me to combine the two.I have used the following code for the buttons. Which seems to work ok but i would like it to be a little smoother. (using speed or some sort of easing??)
I have a movie clip called column1_mc. when I click a button I need to move the movie clip in incremental moves consisting of 30 pixels.
column1_mc._y = 30;
Does not work because that is giving a _y coordinate.For example.I need to make the movie clip jump to _y 300 but make 10x30 pixel incremental jumps. Moving 10 times 30 pixel jumps.
If this is possible to detect if a user's display resolution is less than 1024 x 768 as a flash projector file is launched - then depending on the result I want to select one of the following commands to ensure that no cropping occurs of my final file: fscommand("allowscale", "false"); fscommand("allowscale", "true");
This is an if stament on a frame on the root. I want to loop Carrera(a lenghthy movieclip) from frame 2 back to frame 1. (For testing purposes) This is the code:
I've created next/back buttons to navigate to various frame labels on the timeline. There is a "main menu" frame that contains menu buttons to take the user to other frame labels on the timeline. However this "main menu" frame has an FLV playing and needs to be "stopped" when navigating to another frame label. I have the code for this.
What I am inquiring about is this:Do I need to create an "if statement" in the next/back button code telling Flash that if the user clicks on the next/back button while on the "main menu" frame, to stop the FLV also?
I have an animated storybook that reader moves through each page (scene) with forwardBtn and backBtn. Each scene (in it''s own keyframe) I have placed a voiceover on the time line. When I view movie the forward btn plays scenes and sound correctly. The prolblem is with the back btn, When bacBtn in pressed the previous scene plays but the sound from the other sceane keeps going.actions from back btn below
on (keyPress "<Up>") { // Locate the screen that is the target of the behavior var screen = null;
It makes mcGrass1 disappear, but not the event listener. When I touch the area where it was, it still goes to the screen "math". [URL] That is the location of my .fla