ActionScript 2.0 :: Distance Between De Items (main And Sub)?

Jan 27, 2009

I made some modifications on the XML-Driven Drop-Down Menu tutorial file (Senocular's tutorial) to have all the stuff horizontal (main menu centered and sub aligned to the stage's left - using only 2 levels). Other modification was to set the textfield (and background) width based on the textfield length.

Everything was going fine till I see that the distance between de itens (main and sub) still based on the original width of the background that it is inside each item. Not even to adjust the size (of the background) to one pixel (and this expanded in accordance with the width of the text) solve the problem.

View 1 Replies


Similar Posts:


IDE :: Automatically Set Distance Of Multiple Items?

Feb 16, 2009

I lose a lot of time setting it manually. Is it possible to do it automatically ?

View 3 Replies

ActionScript 2.0 :: Distance From Center - Output Distance Only In Positive Numbers

Jun 17, 2005

I am working on the project where everything is based on the distance from the center of the stage. First I made this fla where flash outputs the x and y distance from the center. First problem is that I want to output distance only in positive numbers.

View 1 Replies

ActionScript 3.0 :: Making Distance Between All Mcs At Equal Distance From Each Other On Mouseover

Oct 16, 2010

I am posting my code that attaches the movieclips on stage

[Code]...

i was hoping that when the newMc expands, all other mc would keep the same distance between each other as at initialisation. I not able to figure how to do it. maybe even an earlier post or llink where similar query was explained.

View 1 Replies

ActionScript 3.0 :: Get The Distance Between 2 3D Objects By Using Distance Method

Apr 28, 2011

In AS3 I am trying to get the distance between 2 3D objects by using distance method.
  
if(Vector3D.distance(model.position,model2.position) < 100)
{
// do something

[Code]....
 
>>You can use it directly as a method of the Vector3D class to get the Euclidean distance between two three-dimensional points.
 
Which point does this method pick? Is it the closest point to the other object ?
 
I am just thinking of how much time this would take in testing objects with large poly count.

View 1 Replies

Flex :: Access Items Selected In A Component From The Main App?

Sep 11, 2010

How can I Access Items Selected in a Component from the Main App I've got a component that has a listControl and a couple of RadioButtonGroups. I need to access the selected items in the main application. What's the best/simplest way to create and access the array of selected items. So, the user clicks the button to confirm the selections and then I need to access those selections in the main app. Is there a way I can use a public var to build the array? Another idea?

<mx:Tile direction="horizontal">
<mx:Box>
<mx:Label text="Year" fontWeight="bold"/>
<mx:List id="myYear" >

[code]....

View 2 Replies

Flex :: Access Items Selected In A Component From The Main App

Sep 6, 2009

How can I Access Items Selected in a Component from the Main App

I've got a component that has a listControl and a couple of RadioButtonGroups. I need to access the selected items in the main application. What's the best/simplest way to create and access the array of selected items. So, the user clicks the button to confirm the selections and then I need to access those selections in the main app. Is there a way I can use a public var to build the array? Another idea?

<mx:Tile direction="horizontal">
<mx:Box>
<mx:Label text="Year" fontWeight="bold"/>

[Code]....

View 2 Replies

ActionScript 3.0 :: Accessing Stage Items While Main Class Inheritance?

May 5, 2011

I've made it this way1. I made clip and it's main class (eg. timeline.as) - at this point it works2. I put code from main class to another class (eg. timeline_template.as) and in main class (timeline.as) I inherit it by :public dynamic class timeline extends timeline_template {3. I added stage items declarations in timeline_template.as because without that any code couldn't reach target an I got 1120: Access of undefined property xxx after these steps whole clip works but items on stage ( buttons, etc. ) are not affected by code. That's logical because code references to properties declared in timeline_template but not in timeline.fla. But how to get around that - I need several usage of timeline_template and I would like to avoid code redundancy

View 3 Replies

ActionScript 3.0 :: Avatar/character Creator - Items Appear Over Other Items When The Corresponding Button Is Pressed?

Feb 9, 2010

I have a project underway where I am making an interactive game. It is a personal character creator game and I need Actionscript 3 help with this.Something similar here:http:[url]....
I have tried already with toggling visibility and 'gotoAndStop()' to make items appear over other items when the corresponding button is pressed, for example, when the user tries out different pants/shirts on their character.

View 1 Replies

Actionscript 3 :: Selecting Flex Chart Items And Displaying Sum Of Items Selected

Aug 26, 2009

I would like to use the selectionMode=multiple described in the Flex docs, but with a few modifications:

1) I would like the box that the user drags over the graph to remain there until the user drags a new one.

2) In the top right corner of the box I want to display the sum of the items selected by that box.

View 1 Replies

Flex :: Make List Items As Tool Tips For Combo Box Items?

Dec 1, 2009

How to make list items as tool tips for combo box items?

View 2 Replies

Flex :: Force The List To Load All The Items, Not Only The Visible Items?

Aug 15, 2010

I'm creating a facebook application in flex. I'm actually working on the friends component that shows your friends who are using the application. now, each friend has a profile image.

I created the component using a s:List element.

In the Skin Class of the element i configured the requestedColumnCount to 3, which means it shows 3 friends. i added buttons to scroll left and right in the list.

Whenever I scroll to see a different friend, for a half of a second i see no image because the List component is loading the image in order to view it.

is there a way to make the list preload all the elements so i won't have this kind of problem ?

View 1 Replies

Actionscript 3.0 :: Remove The Items In The Combobox Later (without Removing Items In The Dataprovider)?

Feb 6, 2009

im having some dificulties in the combobox of Flex 3, after defining the dataProvider and filling the combobox, how can i remove the items in the combobox later (without removing items in the dataprovider)? if i set the provider to "" or null, the items in the combobox are still there

View 1 Replies

ActionScript 3.0 :: Collection Event Event.items.length Does Not Match # Of Items

Feb 10, 2009

how to get my CollectionEvent to work, and I seem to be able to see the problem, but I am not sure how to get it to work properly.

In my actionscript, it seems to only tell that event.items.length is 1, while I am calling my array collection from the HTTPService, and I have tested the length of my Array Collection, which seems to be accurate. What I tried to do is to use that number in the CollectionEvent function, but that does not work at all.

Attach Code

private function onChange(event:CollectionEvent):void{
for (var i:int=0; i< event.items.length; i++) {
Alert.show(event.items.length.toString()); //This always gives me 1 when I have 12 items

[Code].....

View 0 Replies

ActionScript 3.0 :: Distance To A Line?

Jun 19, 2011

Can't figure out this. I have 3 points A(305,108),B(311,119) and C(348,172), to find out the distance from B to AC, i use a method found here [URL]..
 
I then got the distance equals to 131. When I draw AC and B, it appears B is almost on the line (distance <= 1). Am i doing wrong? what does 131 mean?

View 1 Replies

Actionscript 3 :: Distance Between Two Points

Apr 19, 2011

Is there any difference between: distance = point1.subtract(point2).length; and distance = Point.distance(point1, point2);

View 3 Replies

ActionScript 3.0 :: Dynamic Distance Between 2 MCs?

Apr 6, 2011

I cannot arrive at dynamically showing the text in the dynamic text field when I move one any one of the MC on stage.

View 6 Replies

ActionScript 2.0 :: Move A MC A Specified Distance?

Nov 22, 2011

I am working on a project where I have 5 equal sized panels inside of a MC that I am using the following code on the loading of MC:

onClipEvent (load) {
targetx = 650.0;
delay = 8;
}

[Code]...

What I would like to do is ALSO move the panels with left and right arrows that act independently of navigation buttons. So that if you were on panel 2 you could advance to panel 3 or back to 1. Can I assign AS to the arrows to move the MC a specified distance left or right?

View 2 Replies

ActionScript 2.0 :: Distance Of A Circle?

May 20, 2008

I'm building a touchscreen project that consists of flash and max/msp using Olaf Matthes flashserver as bi-directional control.

how I create a function in flash that will provide me with the distance of a concentric circle, so that as it grows I can use trace() to give me a constant stream of it's x & y coordinates?

I've also implemented a collision detection between two or more circles for the purpose of an overlap function. Trouble being that it's not quite working properly. I want the overlap function for the purpose of morphing sounds between the intersecting parts of the circles.

Here's the code I'm using:

[Code]....

View 2 Replies

IDE :: Dynamic 3D Distance Calculation?

Jan 14, 2009

Is there a way to calculate the distance between the origin of a movieClip at, say, (x:500, y:0, z:0) and one at, (x:500, y:0, z:50)?? And lets say the vanishing point is (0,0) and the perspective angle is 50.

I know that the eq for finding the distance between two points in 3D space is:
d = ((x1-x2)^2 +(y1-y2)^2+(z1-z2)^2)^(1/2)

the problem is I dont know x2 (the x value of MC2 (the one set at z = 50)).

[URL]

View 2 Replies

ActionScript 3.0 :: Getting The Distance Between Two Movieclips' X Value?

Aug 8, 2010

At first it seemed simple to find out the distance between two movieclips' x values, I could have just done:

Code:
mc1.x - mc2.x

However, What I'm trying to achieve is a movieclip of a person climbing an un-even surfaced wall, and to do this I first want to make sure the x value of the person is always equal to the edge of the wall.

How would I calculate the exact position of wall's edge where the person is touching it? I've attached an image to show what I mean.

View 3 Replies

ActionScript 3.0 :: Percent Based On Distance?

Aug 7, 2010

I have a vertical list of movieclips added to the stage all spaced out evenly from top to bottom based of the last movieclips position. I also have defined a center Y point which I would like to find out the percentage of each clip away from that center point. The reason for this number is to scale everything from the center point which is scale 1 then they next item from the center would scale to a percentage from the center point. each clips scaling percentage would be based off of how far they are from the center point in each direction. Keeping in mind the center point is always scale to 1. I also want to make sure my scale never goes below 0.3 so the range has to be between 0.3 and 1 my centerY is also not half the height of the content but a number I decide. AS it the content might be 1000 in height but the center point could be set to 300.

[Code]...

View 6 Replies

Tweening Over Distance Not To Specific Point

Oct 27, 2009

I've scanned through the forums, but can't seem to find an answer to my question. I'm trying to move (tween) a movie clip 800 pixels along the x axis (horizontally) when a every time button is clicked. I don't want to move the movie clip to the 800 "x" pixel mark. Yet, I can't seem to move the clip an additional 800 pixels whenever the button is pressed again - it keeps starting from the original spot. I am new to ActionScript...

My code is below:
btnBottom1.addEventListener
(MouseEvent.MOUSE_DOWN, playHandler);
function playHandler(evt:MouseEvent):void {
import fl.transitions.Tween
import fl.transitions.easing.*;
var twTeen:Tween = new Tween(mcbottomFlap1, 'x', Elastic.easeOut, mcbottomFlap1.x, +800, 3, true);
}

View 3 Replies

ActionScript 3.0 :: Get 45 Degree Distance Between Two Objects

Oct 28, 2009

I'm trying to get the distance between two objects. Problem is that both objects are -45º rotated but one of them moves up and down with stage resize. So the distance gets a random degree. I've attached an image so that it could be simpler to understand my problem.

View 3 Replies

ActionScript 3.0 :: Calculating The Distance Between Two Images?

Dec 9, 2011

I'm trying to calculate the distance between two images (A and F - there are other images between A and F) but I can't seem to figure out how to do it the right way. The image A.x is "(stage/2) - (A.width/2)" and image F.x is "E.x - imgSpace" which is a negative value (all the images x is of negative value to image A.x). In my oppinion the calculation is F.x - A.x and although it might be right I still ned the value to be non-negative.

View 3 Replies

ActionScript 3.0 :: Set Children Equal Distance Apart?

Dec 28, 2011

I am trying to do something like this[code]...

Then how do I make it so all the children added are equal distance apart? I know I can set the X coordinates for each one,but I want it so that the objects can be added in any sequence and then be set to equal distance apart.

View 3 Replies

Flex :: Distance Between Mouse And Component?

Mar 28, 2011

Not sure this exist, but worth asking you all: is there a built in method to compute the distance between the current mouse position and a given component? If not, is there a simple way to build a function like this that works for components with generic shapes?

View 2 Replies

Flash :: Calculating Distance Just From Speed?

Jun 17, 2011

I'm creating a drag based control in Flex / Flash, similar to a film strip, where an individual can swipe horizontally to scroll through the items. To make the control feel a bit more natural I've added some inertia to slow the scrolling once a swipe has taken place. When first loaded up there will be five items in view with 'x' numbers of items to scroll through with the 3rd item centred and selected.

My problem though is that I want, when animating, a swipe gesture to determine whether an item will end up the middle (3rd position) and adjust its movement calculation accordingly so it docks with the 3rd / centre position. Imagine you perform a long swipe, it flys pasts 'x' amount of items, but as it slows to a stop it elegantly stops with an item centred / in the 3rd position. To do this I believe I need to determine the distance to travel just from the speed value (as time is irrelevent to the user experience, i.e. a longer / stronger swipe would justify a longer animation skimming through the items).

At the moment I'm invoking the animation routine (with inertia) in the ENTER_FRAME event when the user generates a MOUSE_UP event. When they do this, I obtain the speed of drag (by monitoring this beforehand) and then decrement this speed value on each call of the ENTER_FRAME event until it reaches an appropriate value to stop the animation.

Unfortunately all the speed calculations I've seen deal with Speed and Time to determine distance, I just need Speed. Admittedly, my knowledge isn't strong in this area so I might be missing the obvious.

View 2 Replies

Flash :: AS3: Find Distance Of Rotation

Sep 20, 2011

I am rotating an object with TweenLite, however instead of a set duration I want the duration to be based upon the distance of rotation where 180 degrees = 3 seconds 90 = 1.5 and so on. Here is my attempt to find the distance of rotation:

var time:Number = Math.abs(Math.atan2(Math.sin(angle-wheelObj.rotation),Math.cos(angle-wheelObj.rotation));
TweenLite.to(wheelObj, time, {shortRotation:{rotation:angle}, ease:Expo.easeOut, onComplete:rotateWheel, onCompleteParams:[target]});
TweenLite.to(carObj, time, {shortRotation:{rotation:angle}, ease:Expo.easeOut});

This just isn't working, time is sometimes huge when the rotation is small and sometimes tiny when it is big, so does anyone know a better way to do this?

View 3 Replies

ActionScript 3.0 :: Maintain Distance Between Two Objects?

Jun 18, 2009

i am trying to develop a simple car game, and to do that i have to maintain the distance between the two wheels. for the collision detection i have used coreyoneil class, which i think is excellent. i cant get the distances to go smoothly. and basically i am finding it hard to get the physics to work.

p.s. i tried to upload the files here and got an error each time, anyone know why that is?

View 0 Replies







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