ActionScript 3.0 :: Go Back To Start Position?
Jan 30, 2012
I have a grid of letters. I want to create the else aspect, where if you don't drop the letter on any square, it'll return to its original position. Issue is I don't declare it's original position, i simply use placement on stage.
View 1 Replies
Similar Posts:
May 24, 2010
How do you make a loop go back and start at 0 again?
var mySWF:Array;
var currentSWF:Number = 0;
var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.load("myXML.xml");
[Code] .....
View 1 Replies
Dec 2, 2009
I have an instance of the flvPlayBack component on my stage called myVideo a list of links down the lhs is used to pop in the required video.If a user gets say 1/3 of the way into a video and the presses a different link for a different video then: the new video pops up but the seek bar is still some way into the new video there is a pause of around 1 sec the seek bar goes back to the start.I want to speed up the return of the seek bar to the start of the new video.
Here's some code:
Code:
function clickHandler(event:MouseEvent):void {
this.myVideo.alpha=1;
if (linkType !="http"){
[code]....
This might be wrong but do I need to somehow remove the reference to the "old" video before I set the source to the new one?If that's junk - and it probably is ...How can I speed the return of the seek bar to the start of the new video?
View 2 Replies
Sep 28, 2008
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.
View 1 Replies
Jun 14, 2009
iam using FLVPlay back control in my project, i need to mute it while running first time automatically. it may thr script or any other option? i got struct up. mute buttton has to be ther, but initially it has to be muter, and video has to play.
View 1 Replies
Jan 21, 2010
I have used the flash accessibility tab to add index numbers to 19 elements on my page.However, once I reach tab number 19 I cant get it to loop back to tab index number 1.
View 4 Replies
Oct 5, 2005
I am making a website and am having a very hard time with the actionscripting and external loading involved. I have managed to auto load the background externally but the problem is that once the bgload movie(which is loading externally in main.swf) is loaded, it goes back to start. make the "bgload" movie stop right there after its played once....
View 10 Replies
Oct 13, 2010
I am putting together a small slideshow of pictures and it's only about 350 frames. I haven't worked with Flash since version 4.0, so I'm still trying to figure out Adobe's setup. 4.0's setup was so easy when it came to replaying a video once it hit the last keyframe, but I'm so lost in this ActionScript stuff.
How do I get the video to loop back and start playing again automatically?
View 1 Replies
Nov 24, 2009
I have a toggle to mute and unmute sound in this movie. If sound is on and refresh with SharedObject sound plays again. Also I can toggle between the sound before refresh. The issue: when selecting mute then refresh, the movie plays back muted but the ability to un-mute is no longer available (at least not before another refresh).
Problem: toggle to mute then refresh of browser. Mute is fine but no ability to toggle back to sound.
Code:
var my_snd_obj:Sound = new Sound();
my_snd_obj.start(0,1);
my_snd_obj.attachSound("my_audio");
[Code]....
View 1 Replies
May 18, 2005
I've used kirupa's 'Photo Gallery Using XML and Flash' tutorial & modified to make my gallery, you can view it here: ZedMedia.org by clicking on the photos section in the main page. what i want to do is, instead of reaching the end of all my photos and it stopping, i want it to go back to the beginning image & start all over again. i want the opposite to appen at the start. when the previous_btn is pressed i want it to go to the end of the gallery.
View 3 Replies
Feb 22, 2008
- how can I start the player from the position "pause" (so without playing a song when I open the flash) (and so with the button in position "play")
- I would like to add the button "previous track".. what code I need to create into the "mp3player.as"? (I think the button is the same of next but with "negative image" and with different names..)
- for a button like "stop" what I have to do? (a button with a simple action like: stop(); or stopAllSounds(); ?) (I've tried but without success...)
View 3 Replies
May 26, 2004
I'm trying to make a movie clip play when the mouse is in a certain position on the screen without using invisible buttons, coding this myself so far I've got
[Code]...
View 3 Replies
Jan 26, 2006
I want to make a movie clip move left continuously and smoothly on rollover then on rollout i want it to be able to move it back to its original position with an ease. The problem is getting it to remember the position it finished in on rollover. How can i do it with actionscript?
I want to do it all with actionscript because I did it with frame labels and tweens first of all but its not smooth enough, it jumps in certain points because it cant remember how far left it moved on the rollover.
View 4 Replies
Oct 28, 2003
I am trying to get this an object to go from position A to B and back, in infinity!!I only get the object to go from A to be B and then it stops. The code is in the MovieClip actions.
Here is the code..
onClipEvent (enterFrame) {
this.onEnterFrame=goRight;
goRight=function(){
if (this._y<250) this._y+=1;
else this.goLeft;
} goLeft=function() {
if (this._y>50) this._y-=1;
else this.goRight;
}}
View 2 Replies
Nov 30, 2010
I'm using the indexOf method to search for a substring in a String variable in Actionscript 3. The indexOf method allows you to specify a second, optional parameter - the starting position for the search. However, I'm not sure whether the position returned by indexOf is relative to the very beginning of the string, or to this optional parameter.
View 1 Replies
Feb 9, 2012
I want to drag a line from the mouse down anywhere on the screen but my problem is I can only do it from a set position eg.120,120.
Everything else is fine.
Here's my code:
var line:Sprite;
line = new Sprite();
addChild(line);
[Code]....
View 4 Replies
May 8, 2009
I'm trying to make a movieclip rotate around it's center (this is no problem since the center will never change). The problem that I am having is when I press the movieclip, in let's say the bottomright corner, and move the mouse the movieclip flips to a certain angle depending on my mouseposition. After the weird flip it works fine but it's the initial mouse click that makes the movieclip flip to an angle.I've tried playing around with different values to substract or add the starting angle but eveytime the result is not what i am looking for.Current code:
Code: Select all
package
{
[code].....
View 8 Replies
Sep 12, 2007
I have this script, that zooms and fades the movieclip but I also need to shift the position slightly from the start state to the end state. For example var startX = 60 var endX = 70 so when the zoom start it starts at x = 60 and slowly moves as it zooms out to x = 70.
View 1 Replies
May 26, 2004
I'm trying to make a movie clip play when the mouse is in a certain position on the screen without using invisible buttons, coding this myself so far I've got
_root.top = 319
_root.bottom = 445
yval = _root._ymouse;
if (_root._ymouse > _root.top) {
_root.flowers.play();
} else {
_root.flowers.stop();
}
Doesn't seem to work right.
View 3 Replies
Feb 21, 2010
I'm rewinding an FLVPlayer w/AS, but the little triangle on the seekbar doesn't move back to the start. The code I'm using is: videoComponent.stop(); videoComponent.seek(0); videoComponent.playheadTime = 0;
View 1 Replies
Jul 29, 2010
I have a canvas with its verticalScrollPolicy = "auto" and whenever I reload data into the canvas I want to set the position of the scroll bar back to the top of the page.
View 1 Replies
Mar 10, 2010
Do you know how to rewind a tween. but I dont want it to just snap back to the beiginning. I want it to yoyo back to the beingining without actually yoyoing many times. you know what I mean?this is the code I have which make the beginning motion I want:
public function imageSelectR(e:MouseEvent):void {
myTween = new Tween(imageLoaderHost, "z", Regular.easeInOut, 0, -100, 1, true);
myTween.addEventListener(TweenEvent.MOTION_FINISH, imageSelectL);
[code]...
View 2 Replies
Dec 7, 2010
im working on an image gallery, its the one from kirupa (photogallery) the nextImage() function stops working when it has reached the last picture, but once it has reached the last picture and the user clicks 'next' i want it to start at the beginning again.
must be something like if (p == (total)) { p = 0;
Here is the current code.
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
[Code]....
View 3 Replies
Apr 30, 2003
I'm playing around with mac os x-like dock in flash, but I've got a problem with it. I found this at flashkit.com, see it here. For your convenience i'll post the entire code below (it's quite long though).
Now what i want it to do: if the mouse is not 'on' the menu, i want the buttons to ease back to their original position instead of just spawning there. How can i do this via AS ? The _xscale and _yscale values should also ease back to original state.
Actions applied on the first (and only) frame:
[AS]startDrag ("_root.drag", true);
stop ();[/AS]
Actions applied on the control movieclip:
[AS]onClipEvent (load) {
function checkOffset (coffset) {
if (coffset<-175) {
[code]....
View 2 Replies
Jan 24, 2010
My code in theory works find but for some reason things aren't doing what they're supposed to. Basically I have all my draggable puzzle pieces as movieclips; they start at specific x's and y's on the axis. You drag them to the corresponding hitbox movieclip and it pops into the other specific x and y spot on the axis (otherwise they go back to the first xy spot).
The problem is sometimes the pieces drag and drop fine, but other times when you click the mouse down, they drag, but when you let go, they don't drop! Randomly! They just follow the cursor around, til you click a few times, and then randomly it will drop and not move (when it's supposed to go back to the original xy position).
[Code]...
View 1 Replies
Mar 8, 2004
i need to find a way to pause and start again from that same position the 'infinite menu' found here on kirupa URL...A friend of mine attempted to help me, and gave me some code to fiddle with. I did fiddle with it, but problem was, the code was for Flash MX 2004. So it didnt work on my MX. Here is the existing code i have, but doesn't function (i.e. works fine when control>Test Movie, but doesnt work when actual .swf from folder is opened)[code]
View 10 Replies
Jan 31, 2003
Im a 100% beginner in actionscript so heres my question, as dumb as it may sound.
I want a shape to travel from px 0 on the x-axis to px 740.
The startposition on the y-axis needs to be random, and between 140 and 180.
I have tried the following code:
startY = Math.round(Math.random()*(180-140)+140);
startX = 0;
targetX = 740;
[Code]....
View 1 Replies
Mar 3, 2008
I have one movie clip that when clicked on moves to the left of the screen, after it gets there I want another and exteral swf to load. But I dont know how to get the external clip to load after the movie clip gets to the left side of the screen....Here is what I got so far..
square_mc.onRelease = function()
{ square_mc._x = 30;
square_mc._y = 180;
[code]....
when square_mc get to the Y position of 180, run the external clip.
View 5 Replies
Feb 2, 2009
I made two movie clips that follows the mouse but I want to put constraints on them, they should follow the mouse until the mouse reaches a certain distance and then the movie clip should pop back to its original x and y position.
Code:
private function init():void
{
addChild(backgrnd);
[code]....
View 1 Replies
Dec 11, 2010
I have a movie clip for each piece of clothing that will be used to attach on the dog. These movie clips click and drag to add clothes onto a target and it automatically resets back to its original position each time you grab a different selection of clothing. All of my objects go the original position except for one. The "julyDress" movie clip automatically pops up to the top of the page and does not reset to the original position.
Below is my code:
stop();
var startJulyXPos:Number = JulyDress.x;
var startJulyYPos:Number = JulyDress.y;
[Code]......
View 1 Replies