Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Find Closest Direction


I want to rotate my baseCannon towards the closest direction possible:

I use this code:


ActionScript Code:
var v:Point = new Point(gamelevel.mouseX - bases[i].x,gamelevel.mouseY - bases[i].y)

                   
                   
                   
                   
                   
                    bases[i].baseCannons[j].newDirection = Math.atan2(v.y,v.x) * 180/Math.PI
                   
                    //find the shortest way and then increase the angle to slowly turn towards that direction
                bases[i].baseCannons[j].deltaAngle = bases[i].baseCannons[j].newDirection-bases[i].baseCannons[j].rotation;
                trace(bases[i].baseCannons[j].newDirection)
               
                if (Math.abs(bases[i].baseCannons[j].deltaAngle)>Math.PI) {
                   
                    bases[i].baseCannons[j].rotation -= (2*Math.PI-bases[i].baseCannons[j].deltaAngle)*0.1
                   
                   
                } else {
                    bases[i].baseCannons[j].rotation += bases[i].baseCannons[j].deltaAngle*0.1
                   

                       
                   
                }

However I get the problem that when newDirection changes from 179 to
-179 my Cannon turns all the way round, but I want it just to turn minimal.

Any suggestions?
Thanks




ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 12-13-2008, 09:25 PM


View Complete Forum Thread with Replies

Sponsored Links:

How To Find The Closest Value In An Array
All I'm trying to do is find a value in an array that's closest to the value of my variable...

So if the value of myVar = 50;
..and the array holds the values 25, 100, 150, etc.

I want to write a function that will be able to find the array element that's closest to myVar, which would be the first element in the array (myArray[0]), since 25 would be the closest value to 50.

If anyone out there has any ideas, I'd really appreciate it...

View Replies !    View Related
[F8] Find Closest Multiple Based On Value.?
Any formulas for like.. finding a multiple of say 13 based on a given value?

Like..

if your value is 28... It will go to 26 because 13x2 = 26..
if your value is 36... It will go to 39 because 13x3 = 39..


Any ideas?

View Replies !    View Related
Closest To MouseDown
i have 10 movie clips on the stage on mouseDown how do i find the name and position of the closest movie clip to the point of mousedown?

thanks

View Replies !    View Related
Round Up Closest 10
Alright, my maths suck.. perhaps as much as my actionscripting. Here's what I need hehe.

Let's say I have a number 93, I want the 3.

If the number is 47, I want the 7.

If the number is 64, I want the 4.

The simplest formula is to use the value, e.g. 64, round it up to 70. Use the 70 to subtract the 64. And have 10 subtract the result value, thus getting 4.

Anyway, I only have the problem of rounding the number up to the nearest multiple of 10 in actionscript. How would I go about doing that?

Any alternative methods to get the result I want would be appreciated too but it would be nice to know how I would be able to round a number up to the nearest multiple of 10, using actionscript. Math.Ceil would bring it up to the nearest integer. I'm guessing it has something to do with that.

Thanks in advance.

P/s: I would like to avoid splitting the integer into a string and splitting the string into an array of characters and getting the value. It works but I'm mainly curious if rounding it up to the nearest multiple of 10 is possible.

Ooh. Dividing the number by 10 and then Math.ceil the result and the multiply it by 10 should work.

Code:
myResult = (Math.ceil((myOriginalNumber/10)))*10

View Replies !    View Related
Detect The Closest Mc From Another
i need to detect whether from mc1 if mc2 or mc3 is closer when mc2 and mc3 can be in any random place.. any ideas?

View Replies !    View Related
Detect Closest Object
Hey freinds.
im pretty new to actionscript, but with a lot of help i came up with a script to find the closest object to another object, and get its co-ordinates. the purpouse being is to make an AI that makes one 'robot' shoot another closer target. heres the script.


Quote:




onClipEvent (load) {
var closet;
i = 1;
//interval is 1 to begin with.
}
onClipEvent (enterFrame) {
var closet;
while (i<=3) {
//i use 3 'robots' in my test. robot1, robot2, and robot3. this simply checks thru all of them.
tempDistX = Math.pow(this._x-_root["robot"+i]._x, 2);
tempDistY = Math.pow(this._y-_root["robot"+i]._y, 2);
tempDist = Math.pow(tempDistX+tempDistY, 1/2);
//temporarily retrieve distance of closest 'robot'
tempName = "robot"+i;
//and get its name
if (tempDist<closet || closet == undefined || endname == undefined) {
//if the currently being measured robot is closer then the one currently stored, use its co-ordinates and name
closet = tempDist;
endname = tempName;
}
i++;
//find next robot.
}
i = 1;
closestobject = endname;
endname = undefined;
//set 'closestobject' to the final closest robot, and clear the temporaries.
}




however i want to make the code more bulletproof. is there things i should do to it so i can apply it to other objects later eaisily, or is there something really dumb i should have added, like a 'while' function or whatnot?

thanks for the help!

(PS - I will include the file if you wish)

View Replies !    View Related
Detecting Closest Distance
I'm programming a game in Flash MX 2004 Pro. Not like it matters. Anyway, I have a class of objects that fall from the sky and the player has to catch them. I want to know if it is possible to tell at all times which object is closest to the ground, so that I can make it look like the player is "looking" at that object. Ya'mean?

View Replies !    View Related
Finding Closest Target
Hello there, i've got a ball movie clip named ball, and 4 targets in each corner of the screen. What I want to do is dynamically find the closest target and then get the ball to move towards that target. I've come close to getting it working, but for occasionally when I run it, the ball will travel towards a target that is definitely not closest to it. I've got a sneaking suspicion that it has to do with my distance formula, but I figured i'd post here and maybe someone might be able to shine a light on what's wrong or point out an easier/more efficient way of performing this task. Heres my code. The only thing that isn't in the code is my ball movie clip which is just a red circle in the library with the linkage identifier "ball". Everything else is simply code. I know this is quite a bit of code to sift through, but i'd appreciate any help/tips/suggestions. Thanks.









Attach Code

point1={x:20,y:20};
point2={x:530,y:20};
point3={x:20,y:380};
point4={x:530,y:380};

pointA = [point1, point2, point3, point4];
distA = [];
currentTarget={x:pointA[0].x, y:pointA[0].y};

ball = attachMovie("ball", "ball"+_root.getNextHighestDepth(), _root.getNextHighestDepth())
ball._x = Math.random()*450+50;
ball._y = Math.random()*300+50;

findDistance();

_root.onEnterFrame = function() {
move(currentTarget);
}

function move(target)
{
if (target.x < ball._x)
ball._x -= 2;
if (target.x > ball._x)
ball._x += 2;
if (target.y < ball._y)
ball._y -= 2;
if (target.y > ball._y)
ball._y += 2;
}

function findDistance(){
var temp = 1000000;

for(i=0; i<pointA.length; i++)
{
var p1x = ball._x;
var p1y = ball._y;
var p2x = pointA[i].x;
var p2y = pointA[i].y;
var distance = Math.sqrt( Math.abs((p1x-p2x))^2 + Math.abs((p1y-p2y))^2);

distA[i] = distance;
}

for (i = 0; i<distA.length; i++)
{
if(temp>distA[i]){
temp = distA[i]
currentTarget.x = pointA[i].x;
currentTarget.y = pointA[i].y;
}
}
}

View Replies !    View Related
Finding The Closest Ship
im having a small problem in my as for an enemy that shoots at the closest player...here is the problem area.

ActionScript Code:
d1d = (ad1x/ad1x)+(ad1y/ad1y);
  d2d = (ad2x/ad2x)+(ad2y/ad2y);
 
 
 
// i thought maybe sumtin like that ,
//  ive also tried lots of other ways. But none of them work
 
 
 
  if (current>=ini+time) {
    set("time", time+random(1000)+300);
    ad1x = this._x-_root.jet1._x;
    ad1y = this._y-_root.jet1._y;
    ad2x = this._x-_root.jet2._x;
    ad2y = this._y-_root.jet2._y;
    if (!_parent.players2) {
      //only one player
      check = Math.atan(ad1y/ad1x)*(180/Math.PI);
      gofor = 1;
    } else {
      if (d1d>=d2d) {
        //jet2 is closer
        check = Math.atan(ad2y/ad2x)*(180/Math.PI);
        gofor = 2;
      } else if (d1d<d2d) {
        //jet1 is closer
        gofor = 1;
      }
    }
  }


it seems to be a bit random in where it shoots...but what can i use to find which of the two ships is closer to the enemy....

View Replies !    View Related
Round Up X To The Closest Full Pixel
HOW ??

Math.ceil(???????????

erg

View Replies !    View Related
Distance Between Zip Codes; Finding Closest One
I'm building a Flash app that works with the Yahoo Maps component. I would like to have some functionality where I can enter a Zip Code, and I'd get back a list of addresses/Zip codes from my database starting with the closest one.

Basically, there's a bunch of collection sites around the US, and we have them all in our database. The user would type in their address, and find the sites closest to them.

Does anyone know a webservice or some other method of making that happen?

View Replies !    View Related
Comparing HEX Values For Closest Match
Hello all!

I am looking for a reference to read up on comparing two or more color
values. I have not done a whole lot of work with color math so any
foundation articles would be great.

What I am trying to accomplish, say I have a var "myColor" which represents
the color I would like to find the closest match for, I also have an array
of other colors that are all shades of yellow:

--

var myColor:Number = 0xffcc00
var similarColors:Array = [ 0xfce427, 0xdcb30a, 0xa48611];

--

What would be the best way to loop the array and find the best match to
myColor?

Thanks in Advance!

--
Aaron Buchanan | Flash Developer, Lab-Media | T 909 702 1368

View Replies !    View Related
Image That Follows And Moves Into The Direction To The Direction The Mouse Is Moved.
Hello

I'm having problems trying to figure out how to come up with a solution to this dilemma so any help would be more than greatful!

IN A NUT SHELL

I want to make an image (one that is larger than the actual stage itself) to follow and move into the direction to the direction that the mouse is moved to. So when the mouse is moved 65 degrees, the image should move 65 degrees etc etc.


PLEASE HELP! PRETTY PLEASE!

Thanking you in advance, cheers, lovely thanks!

View Replies !    View Related
How To Detect Direction Of Movieclip And Rotate To Face Direction
Hi!

I have searched this forum, but Im not really sure what to search for, so I havent found anything similar to this. If anyone know, then please post the link to that thread.

I am trying to do some sort of aquarium with random moving amoebas.

But I want the amoebas (movieclips) to detect in what direction (angle) they are moving and rotate so that they "face" the direction they are going in.

I also post the fla file here so anyone can download it to see what I mean.

Thanks in advance

View Replies !    View Related
Detect Direction Of Movieclip And Rotate To Face Direction?
Morning all!

Little thing bugging me here.....

I have a movie clip which moves around the stage randomly, but I want it to face the direction it randomly changes to. Can you help or shed some light for me?

Here is my code:


PHP Code:



onClipEvent (load) {
    width = 600;
    height = 450;
    speed = Math.round(Math.random()*2)+1;
    x = Math.random()*width;
    y = Math.random()*height;
    this._x = x;
    this._y = y;
    x_new = Math.random()*width;
    y_new = Math.random()*height;
}
onClipEvent (enterFrame) {
    if (x_new>this._x) {
        sign_x = 1;
    } else {
        sign_x = -1;
    }
    dx = Math.abs(x_new-this._x);
    if ((dx>speed) || (dx<-speed)) {
        this._x += sign_x*speed;
    } else {
        x_new = Math.random()*width;
    }
    if (y_new>this._y) {
        sign_y = 1;
    } else {
        sign_y = -1;
    }
    dy = Math.abs(y_new-this._y);
    if ((dy>speed) || (dy<-speed)) {
        this._y += sign_y*speed;
    } else {
        y_new = Math.random()*height;
    }
}





I have experimented with:

_rotation = (Math.round(180 / Math.PI * Math.atan2(diffy, diffx)) + 360)
and also this._rotation += 1; but not having much luck. Thanks for looking and helping if you can

View Replies !    View Related
Movie Direction Based On Mouse Direction
I have a MC with two movies init one going left one going right.

I want to have the clip direction change based on the direction the mouse is going.

One:
I need to know how to tell wich direction the mouse in going

Two: I need to know how to switch the clips inthemovie based on the direction.

I'm fairly new the indepth scripting.

Thanks for any help.

Roger

View Replies !    View Related
My 'find' Won't Find Empty Lines And } Now
on 750 buttons I'm trying to go from:
{
Sound01

}

}
}

to:
{Sound01}

by deleting the empty lines and these } using find & replace - and when I hit replace all - it says none found, even though I copy directly from button code...

Is possible this happened by earlier having copied code from AS window - pasting it onto main stage to hold it while busy doing something else - then later double-clicking it and copying it into the find/replace window - which strangely puts little squares in wherever there was a carriage return??? Help please.

View Replies !    View Related
Help Me In The Right Direction Please...
I am making some kind of navigation with 4 buttons:

12
34

Number "1" represents the section "I am in".

When I Clik on number "4", number "1" must be replaced by number "4" and number "4" is replaced by "1"

42
31

Clicking on "2" resultsin:

24
31

Get it?
Now what would be the easiest way to get there, I can't figure it out somehow where to start...
[Edited by FunkyD on 07-21-2001 at 09:48 AM]

View Replies !    View Related
Need A Little Help Or Direction
Im redoing a clan site @ http://www.forcereconclan.com. Redoing the ENTIRE site btw.

I want to do a navgation bar with custom buttons that slide with the direction of your mouse. Horozintal slide not vertical. I would like to put sound on the buttons when you arrow touches them.

Similar to http://www.eastcoastelite.com 's navagation bar.

Anywayz, Does anyone know of a DUMMY PROOF tutorial or script to do this?

I am using Flash MX, and Have photoshop 7.0 and going to incorporate this into my FP2000 new layout.

Thanks in advanced.

Prophecy

View Replies !    View Related
Need Some Help & Direction, PLEASE
I want to use XML in a project I'm doing. Basically I have a series of thre questions that lead to a possible 16 different answers. Basicaly what I'm doing is asking questions that will determine which product is right for a specifuc use, so when the user gets to an answer, I display a product or products that meet the users criteria. The product info will have a link to a Website and some copy about the product as well as a photo and specific features.

My question is once I create my xml doc of all the products and content to go along with each product. how can I call and display the right info in flash? I have never used xml with Flash, but it seems like the right option for what I'm doing. Any thought s or comments would be appreciated.

Thanks much.
Erik

View Replies !    View Related
Direction?
I have built a few Flashbased website.. But all basic menu systems with rollover effects and the like, Simple drop down menus and such. BUT I am now inspired to attempt a more artistic approach. I am curious if anyone would have any advice, or place to go for assistance, in creating a MAZE. somthing that would be navigated with the arrow keys.. to reach different sections. I dont know what This would entail in the least, or where to begin.

Any help would be appreciated. Thankyou all.

MaiMas

View Replies !    View Related
Need Some Direction
Hello,
I was playing with a template that came with Flash Mx 2004, think its called modern photo slideshow. I added a different mp3 to each picture layer. I like it but if I go to the next picture layer, music1.mp3 overlaps music2.mp3. I was wondering what action script I needed to use to tell it to stop playing music1.mp3 if I go to next picture layer. My goal is to make a photo slideshow that each photo slide has a different mp3. Once I get this working maybe add a transparent image to highlight parts of my photo at different times in the song.
Please slap me if I'm going about it wrong. If there is I guide or tutorial or post that covers what I’m doing point me in the right direction thanks Tom

View Replies !    View Related
Right Direction
can sum one throw me into a basic action script tutorial pleas the very basics newbie ones!
thank u
Genie

View Replies !    View Related
Any Direction?
Hello All!
Lets get straight to the point. I am confused!I am fairly new to action scripting, and what I am trying to do is not that difficult.(or should not be that difficult anyway) Here goes.

I built this gallery using a tutorial, put it in dreamweaver to see how it was going to look and it works fine.

http://www.homebeautifuldisplays.com...Home_Final.htm

Then I started building the site in flash. Now when I use a button to open this gallery into an emptyMC it opens but has no working functions.(ie scrolling or opening gallery photos)

http://www.homebeautifuldisplays.com.../flashtest.htm

heres the code:

_button to open gallery_

on (release) {
_root.createEmptyMovieClip("area1", 2);
loadMovie("Gallery2.swf", "area1");
setProperty("area1", _x, -155.1);
setProperty("area1", _y, -168.2);
}


_thumbnails in gallery_

on (release) {
loadMovie ("clip1.swf", "_root.screen");
}

_scrollers_

on (rollOver) {
tellTarget ("left") {
gotoAndPlay (2);
}
}
on (rollOut) {
tellTarget ("left") {
gotoAndStop (1);
}
}

Any and all help is very welcome.

View Replies !    View Related
A Bit Of Direction Goes Along Way
Hello,

I was wondering if anyone could lead me to a script(mx preferrably) that does something similar to this.

http://www.kataeyewear.com/
(goto the "collection" section, where the menu stretches and compresses.)

Any direction would help!

brent

View Replies !    View Related
Need Some Help And Direction
I have created a flash movie and it has a "projects area" which include pictures and text. The client wants to continue to update the area by themselves. He doesn't want to learn flash. So I was thinking of using php is it possible that he can upload and add comments to a form in php communicating to a mysql db. I then need it to be pulled into flash from a mysql database. Is there a tutorial or example of this that I can use. OR do you people have a different way I can do this.

Thanks

View Replies !    View Related
Need Some Direction, Please...
I'm looking to make Scrabble into a flash multiplayer game. Nothing fancy, just keeping score, in-game chat, etc.

I've done the Stiletto tutorial in MX, and am fairly comfortable with it, but I'm afraid most of what I need will be accomplished with Actionscript and advanced Flash.

I have most of my graphics done (the board, the tiles, etc).

My next step is to start creating the actual game.

I need some direction on where to find a good starting point. I've looked, and there is a world of good info available. The problem is there is just TOO much information to sort through. Someone to point me in the right direction would be a life saver. I need resources on how to get started, and hopefully some help on what is the best method to use regarding chat servers, Actionscript examples, etc...

Can somebody point me in the right direction? At this point, I'd take a general direction!

Thanks in advance,
-SZ

View Replies !    View Related
Need Direction
could someone tell me where i can find a tool if it exists that will morph some text into something?

If no tools, is there an easy way to do this?

Thanks

View Replies !    View Related
Set Me In The Right Direction
So I've got this personal portfolio project that I'm really excited about doing, but I'm pretty sure that if it's to be done right, I need help. I've started work on a Flash-animated website, and I have a fair amount of proficiency with the Macromedia suite, but I just don't know how to go about doing what I want to do. I don't know what applications would be the best to work with, or how to keep the final filesize from going plaid. At the moment, I have a static mockup image -- made in Photoshop, as it were -- and quite a few questions. I've attached the image, and if you'd be willing to help me out, the questions can follow.

mockup_03.jpg

As for the design, my vision is to have it almost entirely fluid and animated. Starting with a nearly flat screen, the navigation will 'grow' upwards and open up the folds. Click on a new section, and it will swell as the other sections shift out of center and shrink. If that makes sense, good; if not then I can try to explain it more articulately.

View Replies !    View Related
Gun Direction
My other thread didnt attract you, so maybe this will.i want my tank's machine gun to point where the mouse is. i have this code on first frame of _root timeline, and check out the source to see what i mean. it doesnt work. anyone know how to fix it? thanks.



Code:
mousex = _xmouse;
mousey = _ymouse*-1;
angle = Math.atan(mousey/mousex)/(Math.PI/180);
if (x<0) {
angle += 180;
}
if (x>=0 && y<0) {
angle += 360;
}
_root.tank.mgun._rotation = angle;

View Replies !    View Related
Need Direction...
Hey there,

I was hoping that someone out there could point me in the direction to discovering how to create a pop-down menu that, when the user rolls off the button, will stop where it is and retreat back, instead of jumping to it's full extented self before retreating?

Cheers,

Sven

View Replies !    View Related
Need Direction
Hello,

I am making a game for kids and I am wanting to make a random name generator and was wondering if this is possible with Action script and if so how would I go about doing it I would prefer not to use XML. I am new to AS so i know very little about it any one that can help or give me sujestions it would be apreciated thank you

James

View Replies !    View Related
The Right Direction?
i read a turorial, and i can make an image like this (posted below), my questions is: in the tut it only explained on how to make this "skin", im wondering is it possible to make those buttons to work like a flash player? and have the gray square play the movie? If so can someone guide me in the right direction. thanks in advance.
i know im a noob
BEFORE, NEXT,PLAY, PAUSE, STOP's buttons.
(from the turotial)

View Replies !    View Related
*Need You Direction...
I'm a musician, and I've finally decided to post my music online. I already know that having my own Flash jukebox will the most convenient and clean way to get my music streaming - but there's a few questions I have to clear up first.

- Is there a LIMIT to how much music one flash jukebox or media player can play? I have about 300 songs I'm uploading with the need to add even more, so this question is crucial.

- What types of files are NOT usually compatible with Flash Jukeboxes? I have Mp3s and WAVS only, so hopefully wavs can be added somehow.

- How much harder is it to also set up a flash MEDIA player for videos exclusively - same process or more to understand?

- Last but not least, can you guys point me in the direction of some of the best free players online? If anyone's interested, I might even pay some money to get a custom, so let me know - IN FACT, what am I thinking? I'm at a Flash message board right now - I'd like to do MY WHOLE SITE in Flash, so any takers or advisors, hit me. Thanks a million -

View Replies !    View Related
Need Direction
I want to develop a simple exercise for kids where images (as mc symbols) get dragged and dropped by the user to match up with questions that pertain to the images. For instance, ball_mc would be dragged and dropped next to the question, "Which one is a ball?"; square_mc would be dragged and dropped next to the question, "Which one is a square?", and so forth.

Then, each 'answer' needs to be evaluated as correct or incorrect.

Can anyone help me with the specific methods to accomplish this? (I can figure out the actual scripting—I need help with 'where to start'!)

1. The drag and drop is not a problem. But the final position would have to be exact: I have seen instances where an image seems to snap to a specific location when it comes in close proximity to that location (much like snapping occurs on the stage when developing). How is this accomplished?

2. Can the x and y coordinates be evaluated. How? (Say; "if ball_mc position == x1, y1 then correct == true".)

There are more simple ways to do this, but I am trying for a basic level of interactivity.

Any guidance would be appreciated!

View Replies !    View Related
Need Direction
I posted this earlier in a different forum; did not receive any response, so perhaps I should have posted this here.

"I want to develop a simple exercise for kids where images (as mc symbols) get dragged and dropped by the user to match up with questions that pertain to the images. For instance, ball_mc would be dragged and dropped next to the question, "Which one is a ball?"; square_mc would be dragged and dropped next to the question, "Which one is a square?", and so forth.

Then, each 'answer' needs to be evaluated as correct or incorrect.

Can anyone help me with the specific methods to accomplish this? (I can figure out the actual scripting—I need help with 'where to start'!)

1. The drag and drop is not a problem. But the final position would have to be exact: I have seen instances where an image seems to snap to a specific location when it comes in close proximity to that location (much like snapping occurs on the stage when developing). How is this accomplished?

2. Can the x and y coordinates be evaluated. How? (Say; "if ball_mc position == x1, y1 then correct == true".)

There are more simple ways to do this, but I am trying for a basic level of interactivity.

Any guidance would be appreciated!"

View Replies !    View Related
I Need A Bit Of Direction
What I'm trying to accomplish is- I have a thumbnail gallery loaded via xml- the thumbs are clickable. I need to pass two links instead of one onRelease.. but I'm not sure how to go about this. I need to open a general .swf that will hold images for each project in the thumbnails- then I need that to load a specific xml into that swf- based on which thumb was clicked- as to avoid making 20 swfs... I can figure out how to include a link to both the swf and xml file in the gallery- however, i'm not sure how to set up the second swf- to know which xml file to read from...

if anyone knows of any tutorials or exaples of this sort of thing that would be amazing...

Thanks!

View Replies !    View Related
I Need Some Direction
I love Flash to death. I am no beginner but am nothing to write home to mom about.. I really enjoy Flash but am having a really hard time with Action scripting. I need some direction on where to go to learn it. I need to start from scratch when it comes to this. This is obviously the only way to make amazing things in Flash. I have made movies that will work,but nothing amazing. I would love to know where I could start at. Like step by step instruction on how to use actionscript...Please help!!!!

View Replies !    View Related
Need Direction
hi,

i am a certified flash MX 2004 designer , flash mx 2004 developer and adobe flash cs3 certified. i live in Kansas city, mo and am looking for internship programmes . please someone help. i just finished the last exam this week.

thanks

View Replies !    View Related
The Right Direction
could someone point in the right direction I'm looking for a array_unique class or maybe even a inArray class for AS3

thanks
mm

View Replies !    View Related
Need Direction
I need to create a dynamically driven organizational chart that pulls from a database members depending on company division. I would like the child nods (Gray Circles) (if that is the correct term) to attach to the parent (Red Circle) by lines as seen in the diagram.

Example Chart

I need direction on the following:
Do I need to create many movieClips or can I just use one and pull the information if needed and create the nods on the fly.
The attached nods I would like to have elasticity and physics so the nodes don't touch or if the do they push away from other nodes.

The nodes would also need to change to Parents onClick and create more child nodes depending on available data

Any help would be great,

Shane

View Replies !    View Related
Need Direction
I need to show a list of items (more than one page) from XML. Info will be the description and price. What is the appropriate way to do?
Is it possible that I create a scrollable text box and have two columns inside the text box?
My current version is looping thru the nodes of the XML and for each child I create two movie clip, one for item description and one for price. But then I have to do a lot checking like the number of entries per page, prev and next buttons etc. I am just wondering if there is any easy way to do it. Please advise.

View Replies !    View Related
Can Anyone Put Me In The Right Direction
hi all,

i have a list-component which is automatically filled using php. Everything works like it should. But here's my question: I want a input textfield that can be used to narrow down the items in the list (so when you type "a" in the input field, all items that don't start with "a" should disappear). anyone knows a good way to do this, or any tutorials?

thanks,

Ricardo

View Replies !    View Related
Need Direction
I need to show a list of items (more than one page) from XML. Info will be the description and price. What is the appropriate way to do?
Is it possible that I create a scrollable text box and have two columns inside the text box?
My current version is looping thru the nodes of the XML and for each child I create two movie clip, one for item description and one for price. But then I have to do a lot checking like the number of entries per page, prev and next buttons etc. I am just wondering if there is any easy way to do it. Please advise.

View Replies !    View Related
Help ... I Need A Little Direction
Hi Guys ...

I have been asked to take on a project and I have no idea even where to begin ... I can get around flash and use actionscript and I have my bibles and sitepoint for back up ... but I have no idea on even how to start.

Here is the problem ...

1) The client wants a gameboard that has 40 squares ... with 10 having prizes and the rest being 'sorry'

2) They want the Flash movie to update in everyones (there will be around a hundred people watching) browser automatically ... is this possible?

3) How would I store the information ... I was thinking I could store the square location, prize and visable values in an external text file and pull the information when I need it. Since this is the first time I have used flash to read a file ... do I need dynamic scripting (not actionscript but ASP, PHP, ect)

Thanks for the help in advance guys ...

Mike

View Replies !    View Related
Right Direction HELP
I am sure this question has been posted before or something like it but I have a client that needs to be able to update all his text himself when ever he needs to. I heard you can load text into text boxes. Any help on how to do that the best ways or if someone could point me in the "right direction" I sure would appriciate it....

Respectfully,
Mike Jones

View Replies !    View Related
Need Some Direction W/ XML App
Hello All,

Could you offer me some direction? I am developing a recipe application in Flash MX2004 Professional that will load recipes from many XML files. I have about 100 recipes, 1 recipe per XML file.

I am a newbie to actionscript, and I'm unsure how to load XML files from a select menu.

The tutorials I've been finding online haven't addressed this issue, and instead only load a single XML file. I'm starting to wonder if mine will be more complex with a database end.

Anyhow, any info would be GREATLY appreaciated!
Thanks!
atom_jack

View Replies !    View Related
Please A Lil Direction
Hello all and thanx for allowing me to join the site
I was wondering if anyone could point me in the right direction
I have a flash template that i'm trying to learn how to edit
for the most part i can do as i need with it except linking buttons
first off the .fla shows the buttons to be movie clips ( i assume for linking to internal pages)
but i need to link to external web pages.
also each button has a drop down menu with a few sub catagories (that i cant locate anywhere in the library
I was wondering if anyone could suggest a tutorial specifically addressing these issues? lord knows i would appreciate it thanx in advance for any and all help biggy

View Replies !    View Related
Looking For Direction.
Hey All,

Im fairly new to flash, esp to Actionscript. Im used to coding PHP/MySQL sites but a recent client has required some flash work so here we go.

Id like some general help and pointing in the right direction, not looking for anyone to do it for me sort of thing becuase I would like to learn the methods so i can re-use them on other projects. Any tutorials/sites/books etc etc that you can recommend would be great!

Ok the main issue i want to overcome are:

1. Animation after the preloader - Ok ive just about got the preloader animation sorted but my client would like the page to split at the middle to reveal the website much like http://www.2advanced.com/. Im struggling to think of a name that this effect may be called so any help on this would be great.

2. Site Layout - As I am used to building my sites with html/css/php etc I am strugling to get the concept of building an entire flash based site. As there are many parts such as the menu, header, footer, text areas images etc, do I create all the scenes in one movie/file or do I use different swf files for each bit?

3. Sound - Anyone know of good free sound sites where I can find click sounds etc.

4. SEO - I realise SEO can be difficult with flash, so has ayone here found a good way around it?

5. Im sure there are some more point but I cant think of any at the moment.

Thanks in advance for your replies.

Andy.

View Replies !    View Related
Can Someone Point Me In The Right Direction
Yo people

Does anyone know of any attachMovie tuts lying around?

Cheers
M

View Replies !    View Related
POINT Me In The Right Direction.
I have flash and html in their own table on 1 page. I want to control the html using the flash file. Please help.

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved