ActionScript 2.0 :: Assign The Possition Of The Mouse At The Start Of The Level?
Jan 12, 2006
i need to assign the possition of the mouse at the start of the level:
Code:
_root._xmouse = 424
_root._ymouse = 296.1
this doesn't work, but i have no idea how i suppose to do it anotherway
View 4 Replies
Similar Posts:
Mar 31, 2009
I have a gallery which is created from the following scipt:
this.createEmptyMovieClip("images",100);
this.attachMovie("mask","mask",101);
etc....,
with the gallery still present i want a movie clip to appear ON TOP of this.
How is this done? i understand i need to set the z level but cannot find a simple explanation of how to do it. I do not want the image to be transparent (i've found lots of explanation on how to do this!)
View 1 Replies
Aug 16, 2004
is there a way to add some code in the first frame of the main movie's timeline that sets certain MC's that i specify into level 1000?
i'm going to be using swap depths for a project but i need certain clips to always remain on top no matter what. the swap depth of the other movies will constantly be raising them by 2 levels, so i figure i'll put the ones i need on top on level 1000 as the others should never reach that high.
i was thinking i'd have to either add an array with the MC's i need moved to level 1000, or make them _global. and set a property to that somehow.
View 3 Replies
May 2, 2011
i just cant make this function work. Using addChild player mc is added to stage, inside it theres a mc named ballCnt. I need to make that position global, but it keeps giving local coordinates. Heres the code line (the last one i tryed):
var point:Point = localToGlobal(new Point(player.ballCnt.x, player.ballCnt.y));
trace(point);
View 1 Replies
Nov 8, 2009
I have a game with multiple levels, which is working as I want it to. I would like to add just one extra bit of functionality. As each level starts, I would like a movieclip to play and then disappear after a second or so. The movieclip will just say "level 1", "level 2" etc, without any interaction. Ideally it will appear as the level loads, and then fade out to disappear.
View 2 Replies
Jan 24, 2011
I want to find only the first level of children. Right now I'm using e.target.name but this is also catching those targets children. How would I prevent this?
View 2 Replies
Sep 14, 2009
I have a web site with an intro movie playing in the page's header.
The SWF playing the FLV with sound is in a division that is placed at a lower Z level. On top of the SWF, at a higher Z level, is a png image of my header containing an oval transparent window. This image acts as a skin sitting on top of my movie. The movie and sound play inside the oval window fine. I have other reasons for this approach as opposed to integrating the whole header image into the SWF.
The issue is I have no mouse control over the SWF because it is at a lower Z level. The mouse events are blocked by the transparent image window that sits on top.
I want to add a sound volume control to my movie. The control can sit either inside the oval area, or outside somewhere else on the page.
I would prefer to control the volume using another SWF that sits at the normal Z level where the mouse can work. Can one SWF control another?
Other alternatives might be to use Javascript, or even HTML image tags to control my SWF.
View 2 Replies
Feb 19, 2010
I have a zooming map .swf file loading in behind a navigation button interface .swf. The map.swf turns your mouse to a hand cursor so you can pan when you zoom in on it.Eveb though the map file is behind my nav file,when I roll over my nav file, the mouse is still turning to a hand cursor. Is there any way around this? The only time it turns to an actually pointer is when it rolls over the actual buttons on the nav file, so the mouse flickers back and forth between the hand and the pointer.How can I get the lower .swf to not effect the .swf on top?
View 8 Replies
Jan 20, 2011
I have a vertical thumbnail menu on the side of my site. When I move the mouse up or down it will scroll accordingly...however it's anywhere I move the mouse up or down on the page. What series of code is neccessary to assign this scrolling mouse event ONLY over the menu area?
View 7 Replies
May 30, 2007
i've got a MC named 'enterBtn', i want the volume of 'crowd.wav' to increase when the mouse moves towards 'enterBtn' and decrease when moving away. i don't know if this helps, but the co-ordinates of enterBtn are x =530, y = 344.
[Code]...
View 2 Replies
Aug 20, 2010
i have an ad that when the page loads, it can have 15secs of animation and then stop. the animation can only be started again if the user rolls over the ad but has to stop and go back to the end of the animation if they rolls off the ad.
i know the basics of Flash and the part that's giving me the trouble is the roll off the ad.
View 3 Replies
Aug 30, 2010
I added a flv to my flash via: "File">"Import">"Import Video">"Load external video with playback component"Then it loads my flv and puts it on the first frame. How can I make it so that when I mouse over it it plays and when my mouse off it stops?
View 2 Replies
Jun 17, 2009
I also want the masking to start when mouse rolls over.the file id made out of 2 frames and has an external file named test.jpg...frame 1:
Stage.scaleMode = "noScale";_root.createEmptyMovieClip("foo",1);_root.foo.createEmptyMovieClip("img",2);_root.foo.onEnterFrame = function(){ if(this._width > 100 && this.img.getBytesLoaded() >=
[code].....
View 2 Replies
Aug 13, 2009
I am looking for real simple scripting - I have a 15-25 frame flash tweened animation and all I would like to do is run thru the animation once then on mouse click go to frame one and start again. And of course I am under a time crunch and completely fogged with actionscript 3.0. I did some basic projects back in the director days and thought I could just pick up where I left off. If I remember right it was simple scripting like
gotoFrame
and
pause
etc...
View 3 Replies
Aug 30, 2010
I've got CS4 for Mac.I added a flv to my flash via: "File">"Import">"Import Video">"Load external video with playback component"Then it loads my flv and puts it on the first frame. How can I make it so that when I mouse over it it plays and when my mouse off it stops?
View 10 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
May 1, 2010
I am trying to get an interval to start if the mouse is idle after a few minuets. The objective is once a user begins to use the flash program and stops the program will jump back to the main scene after a few moments of the mouse being idle. The interval also needs to stop and reset if the user begins moving the mouse again. This is my code thus far.
var duration:Number = 300000;
var myInter:Number = setInterval(backtomain, duration);
function backtomain():void {
gotoAndPlay(1, "Scene 10");
clearInterval(myInter);
}
I am also up for learning the Timer Class if that is my only option.
View 5 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
Mar 25, 2004
how do I make it to where the flash wont start until someone moves their mouse over it
View 4 Replies
Mar 25, 2004
how do I make it to where the flash wont start until someone moves their mouse over it
View 4 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
Jan 4, 2010
I have created an animation by making a series of frames. So now I have a FLA file with the frames in.So far, so good.I can export this as a movie and create a SWF file.I can use this SWF file in a HTML document and get it to display in the browser.This is where I hit a brick wall. I have done a lot of searches but I am getting something wrong. I need to adjust this FLA/SWF so that in the HTML file, when the SWF is first loaded it does not play. If the mouse moves over the object it starts/continues playing. If the mouse moves away it stops playing.
View 12 Replies
Aug 23, 2011
i know this is a problem allread often talked about, but i cant solve it.i want to start and stop a sound with a mouseclick event.the problem seems to be that the click event is never triggered. can anyone see why?
[Code]...
View 3 Replies
Jul 30, 2004
I'm attempting to create a movie clip animation that plays a loop when you mouseover and when you mouse out off of the movie clip i want the loop to stop at that current frame and stay there until the next mouse over event which would then start playing the movieclip at "last" frame prior to the mouseout.
View 1 Replies
Apr 22, 2011
im trying to create a level select screen so the buttons unlock as you complete a level, so far i have this on each button:
on(release){
if(this.number <= currentItem){
gotoAndPlay(3);
}
}
[Code]...
View 0 Replies
Aug 26, 2010
I have two layers in my FLA both with empty movie clips as follows:In mc_Empty1, I attach a faded background movieclip as I wait for mc_Empty2 to load a SWF. Once the SWF is loaded into mc_Empty2, I want to remove the faded background movieclip from mc_Empty1. When I load the SWF from the main timeline, the onLoad() function works and removes the faded background from mc_Empty1. However, when I load the SWF from mc_target, the SWF loads, but the onLoad() function does not. Here's my AS2 code:
//Loading SWF from main timeline
mc_Empty1.attachMovie("mcFadedBg", "mc_FadedBg", 1);
mc_Empty2.loadMovie("My.swf");mc_Empty2.onLoad = function():Void{ trace("loaded"); //This works removeMovieClip(mc_Empty1.mc_FadedBg); //This works}
[code]....
I know I'm targeting properly because the SWF loads as it should, but the onLoad() function does not.
View 3 Replies
Oct 2, 2010
This is making me a little kooky today. I thought I could defined a library path in PREFERENCES > ACTIONSCRIPT > ACTIONSCRIPT 3.0 SETTINGS then that library would be available to all AS3 FLA files, but that doesn't seem to work for me. If I use the PUBLISH SETTINGS and define the library path everything is fine.
Is there something that I could have done to disable the application level class path functionality? I guess I'm trying avoid having to set the library path for every new FLA I'm making.
View 1 Replies
Aug 27, 2009
I am experiencing no scrolling below a certain scroll velocity on both mouse and trackpad on my Macbook in Safari 4.I have the mouse wheel events working on my mac through the javascript bridge from http:[url]..... I also have normalized the delta in my actionscript to be -2 if below 0, and +2 if above 0. Testing the delta on the javascript side, the mouse wheel at the slowest I can scroll it reads well above or below 0, and the trackpad reads around .025 to -.025... so I'm wondering why is it that Safari doesn't see this until higher speeds?Scrolling works, I just have to give the wheel some speed before it kicks in. It works perfectly in Firefox.
View 0 Replies
Nov 29, 2011
My animation contains a button which 'hovers' or 'lightly floats' on the stage. The object and motion tween creating the 'hover' is in a movieclip which I then applied to a button symbol. When I test my swf and scroll over the button, the motion tween within the button skips back to the beginning. Is there a way to get a smoother transition?
PS. I put the button into a movieclip with the a motion tween and it doesn't seem to work properly.
View 3 Replies
Dec 26, 2011
I'm doing a bigger aplication in flash (as2).Image, there is a main "home" flash with several menu buttons.Clicking these buttons, I load external swf into an empty container in this "home" flash.[code]clicking buttons in this second level, will load external movies into an empty container in this SECOND LEVEL swf.This works fine, but now, coming to the THIRD LEVEL (don't think there will be more in the future) problems come up, some scripts won't work.Now (I'm a as2-beginner) I think, loading external swf ALLWAYS into containers in the first "Home" flash should solve the problem.But I don't know, how to load an swf from the third level into a container in the first "home" level.In the "home" level, I have a "close" button, that will unload the container content.I need to go to a certain scene "content_2" in the home swf, too.
View 7 Replies