ActionScript 2.0 :: Controlling Mc.'s Position On Screen?
Jan 19, 2004
I have a mc w/ an invisible button attached to my main stage called mc.return.Attached to the mc.return is the following script:
[AS]on (release) {
mc.blkqueen._x = 275.3;
mc.blkqueen._y = 461;
}[/AS]
The mc.blkqueen has startDrag and stopDrag actions attached to it (which works fine). It has also been instanciated as mc.blkqueen.Seems logical to me that pressing mc.return should place mc.blkqueen at 275x461 - but nothing happens when I test it.
View 1 Replies
Similar Posts:
Jan 19, 2004
I have a mc w/ an invisible button attached to my main stage called mc.return. Attached to the mc.return is the following script:
[AS]on (release) {
mc.blkqueen._x = 275.3;
mc.blkqueen._y = 461;
}[/AS]
The mc.blkqueen has startDrag and stopDrag actions attached to it (which works fine). It has also been instanciated as mc.blkqueen.
Seems logical to me that pressing mc.return should place mc.blkqueen at 275x461 - but nothing happens when I test it.
View 1 Replies
Dec 4, 2002
I have several buttons, that link to several scenes, containing swf files. Using the loadmovie command I can get these swf's playing on-screen. That's good.
-How can I control where they appear on my document (I'd guess these require some x or y values, but not sure how this is done) as they all appear in the top left-hand corner.
- When I mouse over another button (link to scene/swf) how can I remove the previous swf from the page, then load the new swf -as they all appear in the same spot/all over each other? Is this an unload movie command?
I was hoping to counter this problem by using different scenes (no luck there) and all I really need to do is remove the previously loaded swf, when the new one is loaded.
View 6 Replies
Apr 13, 2010
I have a 1200 px wide scrolling menu movie clip which is placed on a stage that is 650 px wide (mc menu is approx 2X wider than the movie). It is aligned left to the stage and whenever a user moves the cursor over it - it scrolls itself around _x axis (inverted x axis). Here is the code that works:
ActionScript Code:
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
//take mouse position and invert it
[Code].....
But sometimes during aggressive mouse movement over the menu mc, the mouse position variable goes beyond it's limits (I don't know why, latency error?) by 20-30 px. This makes the menu go way beyond its limits/bounding box and almost completely exits the screen.
I've tried adding mc that registers the movie area, limiting _x axis in the IF statement, but whatever script I make it either: glitches, doesn't move or just goes all over the place.
How can I make the menu mc move only in specified movie area?
View 0 Replies
Feb 10, 2010
how to controll the timeline via moving the moiuse in x (left to right ).basicly i wsant to shocase a sculpture of mine in a seemingly quicktime vr fasion. so i will take lots of images of the sculpture in difrent agles to get the 360 degreemovie. then import intoflash timeline. Then somehow i need a script to control the scrub the timeline images (to create the quicktime vr look )
View 17 Replies
Jul 15, 2009
I am trying to figure out how to control 3 movieClips on the screen via XML. I can successfully control one, but I want to control all 3 if the XML has the values.
Here is my code:
var ducks:Array;
var myLoader:URLLoader;
var i:uint;
var xPos:int;
var yPos:int;
var myXML:XML;
[Code] .....
I think I would need to create some sort of list for each specific node (arrayPos, xPos, yPos, isvis) and then run a for loop so that each movieClips values get assigned properly. I have uploaded the .fla and XML for anyone who wishes to view it.
View 1 Replies
Nov 26, 2009
is there a way in as3 to mute a video inside a movie clip if the mouse x position equals less than, say 200px?
View 1 Replies
May 22, 2007
I have started a project for a t-shirt store with a similar featurescan any one tell me how he is controlling the designs and text rotation and scaling inside the target area
View 2 Replies
May 20, 2002
I have a scrolling text field, data on a text file (externalVariables.txt) and buttons. Data loads upon pressing the buttons using the following method: on the main timeline:
loadVariables ("externalVariables.txt", "_root");
on each button:
on (release) {
[code]......
View 1 Replies
Jul 6, 2011
I am populating a textfield with text from XML files. I am wondering what the best way is to handle positioning the TF based on the number of lines of text. So if there is only one line, the textfield's 'y' position might be 100, but if there are 2 lines I want it to move to say 80.
View 1 Replies
Jul 8, 2009
im currently developing a website and would like to learn how to make this Effect Here
View 1 Replies
Jan 4, 2008
I would like to find out if a swf can know where it is positioned within an html page or on a user's screen.I would like to know this as I am creating some banners that use local connection to communicate but the swfs may appear in different locations on the web page so I need to know where they are in relation to each other.
View 2 Replies
Jun 23, 2009
I have implemented a pan and zoom function on my code.Whern I zoom in all components look perfectly rescaled, all shapes and lines.
However my text becomes pixelated and isn't redrawn. Is there a method to make it appear smooth and readable even when I zoom in or move the screen around from its original position?
View 1 Replies
Oct 9, 2009
I am editing an XML gallery and I have some questions..I wonder how I can position my images in the center of the screen. The images are all the same size (800x600) and I need them to display in the center of the screen.I played around with the code and I found out that when I change the Width and Height, the images starts to move (finally)... But it's very hard to find the correct position, so how can I just get it to the horizontal en vertical center of the screen/file?
Here's what the code looks like:
Code:
<gallery dir="Photos/">
<img id='0' align="center" file="foodcongres2009_1.jpg" width='1024' height='768'>
Test foto nummer 1
</img>
[code].....
And next... I have just two arrows (left, right), but when I click on the left one (previous), it goes to the next image instead of the previous one.. How about that?
View 8 Replies
Apr 21, 2009
I have a large movieclip that contains all the elements of my game - the level backgrounds, the player character, the non-player characters etc. The stage is only a quarter of its width and when the player character moves off the edge of the stage the whole game movieclip moves a quarter width to the left or right, depending on which side the player character has left the stage from.
Each of the quarters of this large game movieclip are considered levels of the game (so there are four levels, obviously) and what I want to know is how do i get an object that exists in one level to appear in exactly the same position on screen in the next level, when the player moves to that level?
View 4 Replies
Feb 13, 2010
I would like to know if there is any way that when mouse leaves screen, the mouse coord from the Main Movie Clip (mouseX and mouseY) keeps updating! Is there any way to get the mouse pos relative to the screen pos?For example when mouse leaves screen and goes 30 pixels up, its position would be (X,-30)
View 1 Replies
Jun 26, 2010
basically i would like to screen capture a part for the stage. but i got no idea how to do it as i am very new to flash programming.i am using the PNGencoder to do the process, but i cant actually screen capture the position i want. this is tje sniplet of the code for the process. It is taken from a tutorial with some changes, but it is still lacking of the position of the stage i want to screen capture.
private function export():void
{
var bmd:BitmapData = new BitmapData(216.2, 468.29);
[code]....
the code are working properly for now except it captures the point from 0 x axis and 0 y axis. I need it to be like 150 on x axis and 150 on y axis.
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
_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
Sep 10, 2009
I'm adding captioning/subtitles to my video (FLVPlaybackCaptioning) using dfxp.xml files. Everything works great when the video plays at it's initial resolution (640 x 360). The positioning of the captions is perfect. But I've included a Full Screen button and when the video goes full screen, the captions appear but their position is off. They are higher on the screen and they actually move upward 1 or 2 lines after they initially appear. I cannot seem to control this and am not sure why it only happens in full screen mode. In the component inspector I have set autoLayout to true and to false and it does not effect the captions one way or another. I cannot seem to find any support for this.
View 3 Replies
Oct 22, 2009
if i wanna set the postion of a button to the position of a character on screen and when the character moves so deos the buttons what would be the best way to do that?
View 3 Replies
Jan 19, 2012
I make advance data grid to view tabulate data. Each row has icon. When user click that icon show extra data for the that row. I want show popup in my page center. I used PopUpManager.centerPopUp(panel); to do it. This is my code sample.
[Code]....
Now pop up show in center of hole page but not screen. When data grid have more data popup window is hide. I want show it center of screen. How can i do it. Can i set popup position manually?
View 2 Replies
Apr 13, 2011
I have attached screen shots that shows the flash objecting moving. I am not hosting the website yet so I have created an archive so you can view it here: [URL] Although if you do not have time to download and view my website, I will provide my website's HTML on my second post: how to keep my flash object in the same place. (regardless of screen resolutions)
View 2 Replies
Sep 24, 2010
I need to be able to position the controls at the very bottom of the screen and have the controls stretch from left to right - anyone know the code to acheive this?
View 9 Replies
Mar 20, 2009
I have my flash site working ok, but want the pop up browsers that are sized to pop up in the centre of the screen, instead of the bottom! Anyone know how to fix this? I'm using the following code on buttons:
on (release) {
getURL("javascript:CultWear=window.open('http://www.stevedawson.org.uk/cultweargallery.html','CulWea','width=1133,height= 425,left=425,top=1133,screenX=1133,screenY=425');C ultWear.focus();void(0);");
}
and this is the site so far.... [URL]
View 6 Replies
Nov 3, 2005
i need to combine these two scripte (first one creates array to play movie clips in a order fro left to right of the screen depending on position ) each script works corectly if used on there own. but i want to combine them
var videos:Array = new Array("mc1", "mc2", "mc3", "mc4");
var busy:Boolean = false;
for(var i = 0; i<videos.length; i++)[code]....
View 1 Replies
Nov 19, 2009
I 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.
View 6 Replies
Jun 30, 2009
I am using a ScrollPane in my application(viz., instance name is: myScrollPane). When I view the contents of the ScrollPane, it shows them perfectly. My issue is: When I try to view data present inside the ScrollPane, if I move the Vertical-ScrollBar of the ScrollPane to middle(or somewhere from top to down) and then click on Submit button(viz., instance name is: submit_btn), then its Vertical ScrollPosition must be reset from middle(or any position where we leave it before) to top(or initial position). Hence, I need to move the Vertical ScrollPosition of ScrollPane to top (or) initial position. Everytime, I need to refresh the VerticalScrollBar Position when I click on the submit button. How to do it?
View 1 Replies
Aug 29, 2009
how to make an actionscript to move punto_mc from current position to random position after release, and then from this new position to mevo to another randon position after release?
View 2 Replies
Feb 3, 2012
I have simple image gallery, where images are placed one next to another and the mask is revealing only one of them. Now I want to tween position of the images, but when I do that the mask is "traveling" alongside with the images..
View 4 Replies
Nov 12, 2007
So I'm trying my hands on some full browser flash and after reading a couple of tuts I wrote this
Code:
#include "mc_tween2.as"
Stage.scaleMode = "noScale";
stageListener = new Object();[code]...
The trace's are because it didn't work like I thought it would.Etc the middle movieclip didn't center itself but rather positioned itself seemingly how it pleased so I traced its x position and the var stageXcenter position and like suspected it shows different values.
View 2 Replies