ActionScript 2.0 :: Arrange The Spots In A Pattern Resembling The Seeds On A Sunflower?
Feb 12, 2004
I thought this bit of code was pretty interesting - it is used to set up my "light organ" movie (see my previous post) to arrange the spots in a pattern resembling the seeds on a sunflower.
It's one of the few times where I've actually needed to use PI, E, and Phi (the golden ratio) in the same algorithm. So many magic numbers, so little time.
i'm trying to search a string for a particular pattern, and replace it with elements from within the pattern... for example..here's the given string...if you want to learn how to use regexp, {url===http://somesite.com, text===click here}.
the pattern... {url===http://somesite.com, text===replacement text}
and the intended result... if you want to learn how to use regexp, click here.
of course, i'll extract the url and do something else with it... i'm just wondering what the regexp is for that pattern, and how i can extract things from the results returned.
how one would go about adding hot spots (hyper links) in video - as it is playing; be able to click on certain items and be taken to that landing page etc...
is there a way to view all of the hit spots with in the project at the same time? I have multiple hit spots attached to various buttons and it would be ideal to view them all at the same time to ensure I am not overlapping.
Im trying to make a furniture dragging utility on these floor plans and i'm kind of stuck. I will have more than one piece of furniture (if u look in the library there is more) that i want to drag instances of from spots on the right onto the floor plan. the problem i'm having is that my dragging functions arent working/duplicating the clips properly. after the clips has been dragged on to the floor plan (duplicated and dragged there), it needs to still be draggable so if they decide to move it they can drag the duplicated instance anywhere they want it. the right side is like a "key" lets say, of available furniture and by clicking and dragging one out it puts it on the floor plan but the default instance still stays on the right.
i will also be adding a rotate function later for the dragged out furniture, i can figure stuff out later where is houdl be putting the rotation code.
Im trying to make a furniture dragging utility on these floor plans and i'm kind of stuck. I will have more than one piece of furniture (if u look in the library there is more) that i want to drag instances of from spots on the right onto the floor plan. the problem i'm having is that my dragging functions arent working/duplicating the clips properly. after the clips has been dragged on to the floor plan (duplicated and dragged there), it needs to still be draggable so if they decide to move it they can drag the duplicated instance anywhere they want it. the right side is like a "key" lets say, of available furniture and by clicking and dragging one out it puts it on the floor plan but the default instance still stays on the right.
I have a map that I want to make in Flash with mouseover effect. Example map is here [URL] What I need?
1) When mouse is over the location pin it must show infobox. Yes similar what Google Places does. but with mouse over effect, not on Click. I was using Adobe Flash 5.0's default code snippets and got stuck after this code bolow... I'm new to Flash, sorry but learn very fast/
I am trying to add a single MovieClip in two different spots on my stage. I've added the first by using addChild but I have no idea about how I would also add the second. Basically, it's a button that the user interacts with using a keypress, but in two different spots.
for(var i in _root.ferry.perimeter) { var point = new Object(); point.x = _root.ferry.perimeter[i]._x;
[code]....
the problem is that the hit becomes true when the object isn't hitting anything for instance if the object was moving across the screen the hit randomly becomes true.I have another hitest in the same project which works fine.
I've done the fading grid tutorial at: [URL], but I was wondering if someone knew how to make the grid fade in diagonally from the left or right top corners (or bottom corners too) like this site [URL]. I also have another question with the fading grid, does anyone know how to make the grid fade in from random spots on the movie clip instead of the left to right, up to down, etc. way?? I'd really like to see that effect happen, if possible.
i was jus doin that fading grid tutorial for fun and i was wondering what i would have to change to have the grip fade in, in random spots. like instead of having it fade in like left to right or up and down. but to have it fade in through random spots.
First of all , how can i change that "stub1.swf" to change its value like stub1.swf, stub2.swf stub3.swf etc. Also, it doesnt seem to create multiple movieclips; it only makes the one.
I need a small help on Flex Line Chart. I am using FlashBuilder 4 and doing a simple application in flex. I am displaying a graph with 10 random values and based on the values i am trying to change the itemrenderer values like CandlestickItemRenderer and BoxItemRenderer. Now my requirement was, if the values are > 10 i want to show my chart with CandlestickItemRenderer else i want to show the remaining spots as BoxItemRenderer. I am failing to do this. Either i am getting all the shapes as BoxItemRenderer or CandlestickItemRenderer. i am sending the code as a text file along with this.
I would like to know if flash can allow the user to arrange elements (in a published swf) on the stage and "lock" their positions so that if the swf is reopened or reset, it will retain the new arrangement. How would you describe this feature?
I am using IFrame and adding it dynamically, and it hides a new Alert.show and a previously made TitleWindow.How do I arrange it to go back or to make that Alert or window on top of all ?
Does anyone know how I'd go about moving MCs (that are dynamically added to the stage via code) through the Z axis?
I am using a fair few visual layers and some MCs when moved around are behind others. I wanted to re-arrange the layer priorities of them, if that makes sense?
I want to arrange objects in an arc by specifying start angle and end angle. I came across following code to arrange objects in a circle, but was unable to modify it to meet my requirement due limited knowledge of math
I want do use actionscript to arrange a movie. I have three "windows". It looks kainda lika the windows in windows. I want it to be so that when you klick on a window it comes to to. SO that the other windows is underneath.
I use addChild method to add a mc. But once I did it, I found it is the top of other items on the stage. What can I do to arrange the movieclip to the bottom.
And also if some of the movieclip I import by script and some are imported by dragging from library, how can I define which is in a upper position?
function loadBody():void { if (body=="1") { this.addChild(_mc1); _mc1.x=200;
I'm trying to arrange symbols on the stage but there's just one symbold that will not arrange to go backward. I've tried remaking the symbol with a new picture and a different instance and it still hasn't worked.
I notice in flash the Modify > Arrange option seems to be buggy and work only sometimes. I have a few shapes on the same layer and wanted to arrange them on top of each other in different order and it doesn't work... The shapes were created with shape tool and pen too as drawing objects.
I would have to go the extreme, either I would have recreate the shape to be recognized by the program or cut and paste into a new layer and transfer back down to the single layered that was needed. illustrator has the exact same option with no problems.
I have a problem with arranging some thumbs in column when I resize the stage. The problem is that it is arranging the last square in line half outside the stage and you can see only a half.
I have this site i am puting together and it uses php and mysql to create all of my project buttons. i am able to list all of them but i need help with the duplicatemovieclip where after every 6th button the next ones appear 147 more pixels to the right. i got it to work by using simple "if" statements but i would like it to be able to do it by itself.when i add more elements more columns get added too.here is my script that i use:
Code:
projects = new LoadVars(); projects.onLoad = function() { num = projects.numRows;[code].....
2) Also trying to add text on specific thumbnails once it's clicked.Finally, I am trying to incorporate a fade in and out transitionSorry about all the question, it's just that I only recently started to work with AS, with all the cool stuff going on in flash, I gotta get more familiar with itere is the code
totalImages = 11;//used in for loop picsLoader = new MovieClipLoader(); _root.createEmptyMovieClip("loader_mc",0);
I am looking for a script which would it make possible to arrange different movieclips on/arround a vector object. let me explain a bit better what i mean:imagine you have 6 different illustration of flowers, all seperate movieclips.then i have an object like for example the siluette of a man in vector format. now i would like to load like 4000 copies of the flower-movieclips on top of the siluette with a little bit of random so the flowers form in a way the siluette.
Im creating a menu of 10 items and I want to arrange their x and y positions without writing too many lines of code... so this is what i got so far.
Code: //these are my menu items that are reference by their ids menuItems = new Array(menu1, menu2, menu3, menu4, menu5, menu6, menu7, menu8, menu9, menu10); //this is the function that position the menu items the first time the app launches private function arrange():void
[code]....
so what i want to do now is lets say i select menu item 2... if that's the case, i want to move the other items down x amount of pixels by its y position...and keep menu item 1 in its default place... i hope this makes sense... is there a short way to do this to avoid repetitive coding?
I have 10 jpg which same size and the name is liked a1, a2, a3...a10. Can I import them to flash and arrange them to same position on the stage and the animation is like: frame1:a1.jpg frame2:a2.jpg ...frame10:a10.jpg What ways is quickest to achieve it?