ActionScript 3.0 :: Mc Position Inside A Scaled MovieClip?

Jan 24, 2010

I have a mc on stage. I want to add a new mc inside it and position it at the bottom of the mc.

The code works fine when the container mc is 100% scaled, but when I scale it, the mc inside positions wrongly.

Heres my code:

PHP Code:

// Lage scroller:var o0LbScroll:Object = getChildByName("o0LbScroll");o0LbScroll.oppKnapp = new scrollKnapp;o0LbScroll.nedKnapp = new

[Code].....

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Get Global Position Of Movieclip Inside A Movieclip?

Feb 10, 2010

I have a movie clip called "myMC". I set its x value as such:

[AS]
var myMC:MovieClip = new MovieClip();
addChild(myMC);
myMC.x = 100;

[Code]....

I know I could proboly acheive this with a math equation but is there a function that can get the exact global position of "myShape"? So that I can position another movieclip or sprite around that movieclip?

View 3 Replies

ActionScript 2.0 :: Past A Certain Point It Is Scaled Down In Size And It Locks In To A Specified X And Y Position?

Sep 16, 2009

I have a MC that can be dragged. when it goes past a certain point it is scaled down in size and it locks in to a specified x and y position. The problem is this is causing the onPress function and onRelease function to not work properly. once the mc goes in i cant get it out. this is on the first frame of the timeline

Code:
flatline.onPress = function() {
if (_currentframe == 1) {

[code]....

View 3 Replies

ActionScript 2.0 :: Position A Movieclip With Coordinates Inside A Xml File?

Feb 6, 2012

what i need is to position a Movieclip with coordinates inside a xml file.

View 1 Replies

ActionScript 1/2 :: Mouse Position Inside A Movieclip Area?

May 20, 2009

how can i test the position of the mouse inside the area of a specific movieclip WITHOUT using rollover and rollout events?
 
the movieclip is the irregular shape (star)
 
i need to do some action according to the position of mouse (inside/outside of the movieclip area) but i can not use rollover event because i have a button placed over the movieclip.

View 1 Replies

ActionScript 3.0 :: HitTest For Mouse Position Over A Bitmap Inside A MovieClip?

Dec 1, 2009

This seems like it should be simple, but... I've been trying to figure out how to do the following, and I can't seem to make it work. It all works except for the hit test part. I have a working drag and drop application. I need something different to happen when the user drops an object while the mouse x,y is, or is not over a certain (very irregularly shaped) bitmap inside a movieClip. how to do this? I have found some complicated ways to hit test between 2 bitmaps, but not 1 bitmap and mouse x,y.

View 3 Replies

Flex :: Smooth Mousover Images Inside Scaled App?

Apr 28, 2010

I have a flex app I am scaling using systemManager.stage.scaleMode=StageScaleMode.NO_BORDER; for the most part it works well except for my bitmap data (mostly png's from the designers).

I can set the mx:image tags to smoothBitmapContent=true and that works great for everything except my mouseover objects. When I do a mouseover, the source is being changed from one embedded image to another embedded image. I have tried several (many) online "smoothimage" classes, and tried to write my own, I have tried to reset smoothBitmapContent every chance I get but still no dice. It seems to mee that because I am scaling at the app level, that the flopped out bitmap is not getting smoothed when it renders.

View 1 Replies

ActionScript 3.0 :: Moving Playhead Inside MovieClip Based On Mouse Position

Dec 16, 2009

I am having difficulty with getting the playhead to move inside a movieclip based on the horizontal or vertical position of the mouse on the screen. I can get the horizontal motion to move the playhead, but I can't get the vertical movement to do the same. I have attached the document class .as file for it.

View 2 Replies

ActionScript 2.0 :: Using Shared Cookie To Save Frame Position Inside Movieclip?

Feb 16, 2010

i have a pie chart with clickable sectors. when you click a sector it jumps to the next frame on a movieclip and changes colour. I want to use Local Shared Object to save the frame position so when i come back to the swf later on the sectors of the pie chart are saved.

View 16 Replies

Professional :: Visibility, Order And Position Of Dynamic Textfields Inside Movieclip?

Dec 16, 2010

this concerns flash cs5 and the timeline.Everybody knows the effect you get when you use appendText() to add text to a multiline dynamic textfield, right ? Well, I have a movieClip as a container, and I would like dynamic textfields to populate this movieclip in the same manner as textStrings would populate the dynamic Textfield. 
 
How would this work?I have buttons that trigger addChild() function so as to populate the movieclip with textfields, but how do I make sure that the textfields make up an arbitrary list as a menu user chooses which buttons to click?
Let's say this is the visible text when the swf runs.(I cut away some of the code to make this more to the point):
 
var buttonTrace:TextField=new TextField;
addChild(TextClip.buttonTrace); buttonTrace.x=0;
buttonTrace.y=0;
buttonTrace.text="Breadcrumbs";
 
Now for each time I click a button in the menu I've made, a new textfield appears with the name of the button. This is how I want it. BUT......... How do I control the display properties and positioning of dynamic textfields within a movieclip ? How do I control persistent visibility, and how do I make these textfields appear one after the other in the order they were clicked.

View 7 Replies

Actionscript 3 :: Change Element Position Inside MovieClip In Event.RESIZE?

Oct 21, 2011

I have some little listener.

stage.addEventListener(Event.RESIZE,rozmiar1);
function rozmiar1(e:Event):void
{
ofertaBTN.oCenter.width=(14.59*stage.stageWidth)/100;
ofertaBTN.oRight.x = ofertaBTN.x+ofertaBTN.oLeft.width +ofertaBTN.Ocenter.width;
}

But only ofertaBTN.oCenter.width is changing. oRight is not responding and I get error #1010.

View 1 Replies

ActionScript 2.0 :: Centering Nested Scaled Movieclip?

Apr 17, 2009

i have a movieclip(content_mc) that contains 4 movieclips(img1, img2, img3, img4) of different widths within it. The content_mc has been scaled to the browser using _xscale and _yscale. so if i want to center img1 on the screen the math WITHOUT content_mc being scaled would look like this

Code:
Stage.width/2-(content_mc._width - content_mc.img4._width - content_mc.img3._width - content_mc.img2._width - content_mc.img1._width/2)

but being the fact that it's scaled...it returns the original _width values of the nested movieclips. How do i get the values of the new, scaled widths?

View 2 Replies

AS3 :: Flash - Get Exact Size Of Movieclip If Stage Scaled?

Jun 9, 2011

How do I get an exact width and height of a MovieClip if it was scaled on stage resize?

for example if I have:

stage.scaleMode=StageScaleMode.EXACT_FIT;
stage.addEventListener(MouseEvent.MOUSE_DOWN, checkSize);
function checkSize(e:MouseEvent):void{
trace(mc.width);
}

It will always output the same width and height no matter how big or small the stage is. Is there anyway to get exact current size?

View 2 Replies

ActionScript 3.0 :: BitmapData Mapping To Scaled Movieclip Then GetPixel?

Aug 18, 2009

I'm building an application where the user can upload a photo of their head, scale it and position it, and then pick a colour from the photo.The photo gets put into a movieclip called 'head'I'm stuck at the colour picker part and I just can't seem to work out the whole bitmapData thing. Here's my colour picker code -

ActionScript Code:
private function beginColourPick():void
{
_bmd = new BitmapData(head.width, head.height);

[code]...

This code kind of works, but not correctly.

Problem #1: The colour picker only works in the bottom right quarter of the image because I moved the head mc so the registration point is bang in the middle. So the problem here is that I can't figure out how to move the bitmapData in line with the head mc.

Problem #2: If the user scales the head mc (even a tiny bit) the colour picker stops working altogether. Now I'm thinking I've got to use a transform matrix - but I read up on it and haven't got anywhere.

View 7 Replies

ActionScript 3.0 :: Get Exact Size Of Movieclip If Stage Scaled?

Jun 9, 2011

How do I get an exact width and height of a MovieClip if it was scaled on stage resize?for example if I have:

ActionScript Code:
stage.scaleMode=StageScaleMode.EXACT_FIT;
stage.addEventListener(MouseEvent.MOUSE_DOWN, checkSize);

[code]........

View 3 Replies

ActionScript 2.0 :: Moving MovieClip In Relation To Border Of Scaled Object

Oct 20, 2009

I have a frame_mc that get scaled 400 % onPress with a fusekit tween. Now I'll like to anchor a title_mc to the the top edge of the frame_mc without scaling it. How to do that? onEnterframe in the onPress function?

View 0 Replies

ActionScript 3.0 :: Flash Button Inside MovieClip Inside MovieClip Doesn't Dispatch Event

Jan 25, 2012

I have a Button that is inside MovieClip1 which is inside MovieClip2; yet when i click the Button it doesn't dispatch Event.

View 5 Replies

ActionScript 3.0 :: Fluid Layout Stop Changing Resize Position When Movieclip Is At Certain Position?

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

ActionScript 3.0 :: Movieclip To Move To The Position Of Each Of Buttons From Any Position?

May 13, 2010

I'm hoping someone can solve this headache. Basically, I want a movieclip to move to the position of each of my buttons from any position along my x axis. Therefore, the movieclip needs to 'flip' to face the way it is traveling.At the moment I have the movieclip moving to the mouse x axis when I ROLLOVER the button and stop following the mouse when I ROLLOUT but the code won't flip the movieclip so I must have something wrong...

btn.addEventListener(MouseEvent.ROLL_OVER,followCa t);
btn.addEventListener(MouseEvent.ROLL_OUT,stopCat);
btn02.addEventListener(MouseEvent.ROLL_OVER,follow Cat);
btn02.addEventListener(MouseEvent.ROLL_OUT,stopCat );

[code]....

View 0 Replies

ActionScript 3.0 :: Setting A Position Of Movieclip Called Red X And Y Position?

Jul 3, 2009

setting a position of movieclip called red x and y position within a movieclip called background

Code:
background.redsquare.x = 300;
background.redsquare.y = 300;

comes up with TypeError: Error #1010: A term is undefined and has no properties.

setting a position of movieclip called red x and y position withen a movieclip called background

Code:
redsquare.x = 300;
redsquare.y = 300;

This works fine but how can that be when surely you must access the red withen the background rather then just accessing red?

View 3 Replies

ActionScript 3.0 :: Set That Movieclip X And Position According To Stage Position

Nov 3, 2009

lets say i have a sprite on the stage and one movieclip inside it. now i want to tween or just set that movieclip x and/or y position according to stage position. so for example i want to set mc.y = - 100; (by which i mean -100 to stage, not sprite which mc is in.)

View 2 Replies

IDE :: Way To Get 'MovieClip' To Move From Position A In Keyframe 1 To Position B

Feb 3, 2010

What i'd like to do is have a menu/site map that adjusts when you click on a certain icon. For example, I have a AS3.0 flash file with, say, 5 keyframes with 5 buttons that are in different positions on each key frame. The buttons are set to gotoAndPlay the various keyframes. I can set up a tween that links frame 1 to 2, 2 to 3 etc. but what I would like is a tween from, say, 1 to 3, then 3 to 5, then 5 to 1 - basically in a random order rather than sequentially through the key frames. I could set each of these tweens up individually but the site is for a portfolio that I would like to keep adding to and to do this individually would mean an ever increasing amount of tweens.Basically, is there a way to get a 'MovieClip' to move from Position A in keyframe 1 to Position B in another keyframe without a set of tween frames? I'm sure this is simpler than I am making it sound but I don't seem to be able to work it out.

View 1 Replies

ActionScript 2.0 :: "if The Movieclip Is At Position 3 Stay There - Otherwise JumpTo Position 2"?

Jun 27, 2006

using the following jumpTo script as a guide how do I write an if statement for a function that will basically ask "if the movieclip is at position 3 stay there, otherwise jumpTo position 2"?

Code:
var bg1x = new Array(0, -1280, -1014, 0);
function jumpTobg1X(number) {
gradientNav_mc.newX = bg1x[number];
}

I have tried a bunch of if/else statements but I can't get it working. I can't figure out how to write it properly. I tried something like this:

[Code]...

View 2 Replies

Actionscript 3 :: Move Movieclip Position Opposite Of Mouse Coords On Other Movieclip

Jan 26, 2011

Okay I have a script in which I have added an image to the stage. It is absolute centered. I then have another with is on top but much bigger. I would like the big image to move opposite of my mouse position on the smaller image. ie: cursor is on bottom left corner the bottom left corner of the larger image is in the same spot. And the same thing for any other area.

I have tried many different ways but to no avail. I have done research but no one has been able to give me a solid answer. Anyone know of a way to accomplish this. Keep in mind this it needs to work regardless of the image size.

View 1 Replies

ActionScript 2.0 :: Know Position Of A Word Inside A Phrase?

Aug 20, 2010

I need to know the exact position of some words that are inside a phrase.

Basically I have a string and I'm getting parts of it with substr,but i need to know the especific position (x,y) of that little part that i got.

View 0 Replies

ActionScript 3.0 :: Position A Loader Image Inside A Sprite?

Sep 18, 2009

In AS3 / CS4 I'm trying to programmatically create a bunch of rectangular objects, let's call them 'cards', that will contain an image and a colored background and eventually some other elements like text.  I want to create alot of these cards and move them around inside of a larger panel (also a Sprite) of sorts.  I can successfully create colored rectangles in my cards and place the cards where I want in the panel, but whenever I try to add an image to a card, I can't seem to position the image inside the card's coordinate space, it ends up being placed inside the larger panel's coordinate space instead, even though I'm adding the image/loader as a child of the card.  I thought maybe it had something to do with having to wait until the image loading was complete, so I added the listener as a test but that didn't work.  Here's the code:

[Code]...

View 1 Replies

ActionScript 1/2 :: X, Y Position Of A Character Inside A Dynamic Textbox?

Feb 17, 2011

I'm working on an AS2 chat and I'd like to be able to place an emoticon at a specific location within a textbox. Is there a way of calculating a specific character's x & y position? I've even tried using textWidth and textHeight to calculate a specific location within the textbox, but the coordinates never really match. Keep in mind I have a multiline, wordwrap textbox with dynamic text in it. I've tried using monospace fonts and true type fonts, embedded and not, but the result is always very approximate, if not completely off.

View 6 Replies

Actionscript 3 :: Modify Position Of Children Inside Loop?

Mar 3, 2010

I'm trying to make a dynamic image gallery from and xml. From my tutorials, right now i've got it so it will constantly add the next thumbnail below the other, which is fine, but I'm trying to figure out how to make it that once it reaches a certain y coordinate, it will move the x coordinate over and stack them again. So that rather one long list of thumbs, it will be a side by side stack. For some reason, I can't get it in my head how something like this would work. My goal is to have a side by side stack that I will end up putting in a movie clip that will be masked to show only 2 stacks at a time. Then when clicking a button will slide it over. I was planning to use the "movieclip.length" to calculate how far over to move it, but i haven't gotten that far yet. This is what I got:

[Code]....

View 1 Replies

ActionScript 2.0 :: Stage Position While Inside A Movie Clip?

Jul 3, 2009

Is there a way to position something INSIDE of a movie clip, based on X and Y values of the root stage?

Basically the X and Y of the container movie clip is at Stage.width/2; but I want one specific movie clip inside to stay permanently at 200X and 200Y on the MAIN STAGE. I can't actually move it to the root timeline though because it is using actionscript inside of the container.

View 1 Replies

ActionScript 3.0 :: Get The Position Of The Last Element In A TextField With HTML Text Inside?

Jul 3, 2009

I need to get the position (x,y) of the last char in a textField with html text inside. I try with numlines and getLineMetrics, but that only work for non-html text. If I have a text like

Code:
<p>text one</p><p>This is the other text</p><br><br>

I need to have the position on the stage of the last "t".

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved