ActionScript 2.0 :: Create A Sort Of 'flex' Effect For A Box
Oct 17, 2003
I need to create a sort of 'flex' effect for a box, with a circle at each end. If on one side of the movie clip I want the end to go upwards or downwards towards the mouse. Sort of like rubber, and I need it to be anchored at the center, sort of like a piece of rubber that is held at the center.
When I get a collection back from the service tier, I create an ArrayCollection and apply a sort. When I add an item to the collection later on, the sort is still in place? It seems to be the case. I thought I was only sorting it once, not applying a sort that will stick??Here is the method for adding an item:
private function onAddNewClick():void { var fileTemplate:FileTemplateDetailDTO = new FileTemplateDetailDTO();
I need to create a sort of 'flex' effect for a box, with a circle at each end. If on one side of the movie clip I want the end to go upwards or downwards towards the mouse. Sort of like rubber, and I need it to be anchored at the center, sort of like a piece of rubber that is held at the center.
I'm trying to create a sort of search relevancy within flash and actionscript 3. The goal is to have a person's search return results that match the most user input search terms. For example, if a person searches for "apple pie", I don't want pictures of just apples, and just pies to show up first. I have, what I believe is a good system so far. I basically go through each item in an XMLList (consider it to be all the items that will be searched), and see how many of the terms return true. I add this number to a variable I called "relevance", and then push it to an array.
So now I have my XMLList and matching relevancy array. My big question: Is there a way to sort my relevancy array numerically, and have the XMLList(or a temporary copy of it) sort to match the relevancy array? In other words, when my relevance array sorts itself, I want the xml list to copy the resorting.
I'm trying to create a multidimensional array that will act as a sort of Archive.
I have 3 different values that are assigned to a single-dimensional array. This array, called currentarray, is very dynamic and changes often. But now I want to create a whole new array while saving the information from the first array, and then I want to be able to switch in between both arrays, loading them up, changing them, saving the information into the Archive array.
So basically, the Archive array must eventually look something like this:
Since I want to shorten the code as much as possible, I made it so that Item3 in the archivearray is the position of that group of items. In English, that means that the Archive array would be like this:
ok so im trying to create a sort of SMOOTH transition between swfs.
the problem im having is, targeting a specific label when i need it.
what i mean is, i can target it fine by tpecasting my external as a MC, but...it doesnt give me the desired effect.
for example, i want it so that when a button is pressed, go and play the "outro" frame inside the external swf, at the end of that same external swf, theres an " end" label, when that label is reached. something happens etc.
my problem is that when i hit the button, at the time of that event firing, the "end" is null or rather undefined because it hasnt reached there yet and i get an error or if i do a if/else statement, then i get the else part firing off since again, "end" isnt reached yet when the button is pressed.
i dont know how to make it fire when the "end" label is reached.
i tried while loops but...no good lol. thing froze flash for a bit until it did fire, by then it was a mess lol.
heres my code:
Code: stop(); var loader:Loader = new Loader(); var urlReq:URLRequest = new URLRequest("indexCoontentLoad.swf");
[Code].....
ive added a " here i get lost" comment to indicate the part im lost in/cant figure out how to write.
overall, what i hope to achieve is that when the "end" label is reached, something happens. else, just keep playing until it is reached.
I need help with page "Thumbs" (as first frame), page "List" (as second frame) and Image gallery (as third and base). So, every frame have one own XML file...When you choose some thumb or list line, you must came to this image in the gallery. Easy, sure.. but i don't know what Function exactly i need to use.It's one flash move, hence it doesn't work with getURL or loadMovie...Some exemple with 3 separate pages here: yuri.fr
I wanna create some sort of actionscripted typewriter which loads its content from an external file, but i can't seem to get the code to work properly!
This is what i got till now:
2 layers: - one with a textfield called 'textbox' - one with the actions
A textfile which contains: waarde=Wannaloadtextfromanexternaltextfile!
4 frames, in the first frame i load the textfile this way:
The problem is that when i assign the value of "text" in the first frame this way : <-- text = "Wannaloadtextfromanexternaltextfile!"; --> (witout the comment tags ofcourse) the typewriter works fine but when i load the var from the textfile nothing happens, the trace works fine and displays the contents of the var but the typewriter displays nothing.
the weird this is that when i add this after all the code in frame 1 it works fine: text = "azerty"; But when i add this it doesn't: text = "a";
So when i overwrite the var with the azerty value suddenly it contains the correct value in the next frame, when i assign only one character to it the script doesn't work anymore.
I want to create a sort of slide show with several SWFs and 1 html page. The SWF itself has FORWARD and BACK buttons (its a long story, but I can't just have FORWARD and BACK coded in the html), and upon hitting them, i would like the SWF to call another SWF to replace itself. (again another long story, but each SWF has a low size maximum, which is why I just cant make the entire thing one large SWF).
Annnnd, to make it all smooth and easy, I would like the forward and back buttons to be coded not with the specific SWF that they are calling, but rather with a function which will determine which SWF is currently displayed and then call the appropriate next or previous SWF from an array or list....
Normally, I'd just like to sort the array alphabetically using the name field, which is easy enough using the following code. However, I'd like to create a radio button called 'loadedRadioButton' and when it's click on, I'd like to sort the array on the loaded value first(any items with loaded=true should be at the top, sorted alphabetically), then afterwards, any other items with loaded=false, sorted alphabetically should follow afterwards, how can I do it?
Here is a website that needs a sort function to sort the video by Last name. [URL] I would like to have a link that popped up videos sorted by last name. Please take a look at the following site for an example. [URL] When you click on seconds in the menu below, it opens a pop-up window that sort the videos in a certain way. If you are willing to,I will give you the source file of what it currently has on [URL]
I have a pendulum that swings infinitely. I'd like to set the maximum angle to a random amount to give it a sort of "blown by a random wind" effect. I'm not great at code, so I can't figure out how to randomize "maxAngle" without making the animation jerky. Does anyone have any ideas on how to do this? Here is my code and FLA...
Now, to sort them, I obviously don't want to do something like this:
if( a == 'columnSelector' && b == 'headerImageLink' ) return -1; else if( a == 'columnSelector' && b == 'title' ) return -1; else if( a == 'columnSelector' && b == 'mainText' ) return -1;
So that brings up an interesting thing. I know you can optimize the above some using something like this:
if( a == 'columnSelector' || a == 'bodyImage' ) return -1;
This would get the last two, but lately I have just wanted community input on issues I have had in the past. So the question is, what is the best way to write a custom sort, using a relatively random order (not alphabetical, etc)?
It's a bit of decoration to go behind a logo. When the dMove var is commented out I get the appropriate line of squares fading in and out at random spots along the x = 78 axis, but when introduced nothing appears at all...
After applying a numeric sort to my dataprovider(Array Collection), I can not reorder the items via a tilelist. Do I need to remove the sort from the arrayCollection. If so, is it just a case of setting collection.sort = null ?
var sortField:SortField=new SortField(); sortField.name="order"; sortField.numeric=true; var sort:Sort=new Sort(); sort.fields=[sortField];
Im loading tabs for an accordion control at runtime. The number of tabs is determined by the role of the user. Each tab comes from a module so the load time is variable. As a result the list order changes every time the app is run.Is there a practical way to sort the tabs as each new tab is loaded?
I'm making an application where I display an AdvanvedDataGrid with one column with dates(in format DD/MM/YYYY) and another with datetimes (in format HH:MM). I'd like to sort dates according with the datetimes as well(just clicking in the header of the column), there is an examplen of the expected behaviour:
I am sorting xmllist profilexml. In the list dates and months are sorted using SortField. It is sorting up to September month. After that Oct, Nov, and Dec are coming and displaying on the top in the datagrid.
finalList = new XMLListCollection(profileXml); var sortL:Sort = new Sort(); sortL.fields = [new SortField("startDate", true)];
[Code]....
<startDate>2/15/2011</startDate> as per my understanding it is sorting until 0-9 numeric fields only. Is there anything I need to add in this code for numeric sorting?
I want to sort Arraycollection in fieldName as ascending...heres my code and i wan to know whether its rite.
public static function arrayCollectionSort(ar:ArrayCollection, fieldName:String, isNumeric:Boolean):void {var dataSortField:SortField = new SortField();
next to the header of an advancedDataGrid you see a number. This number stays grey no matter what i do. I Already searched 1 hour to find the solution.
I#m looking for a solution to sort all grouped colums in advancedDatagrid. It should be the same behavior like clicking in a columns head. i'm not looking for a solution to sort the fields IN a the grouping. There is working solution named compareFunction. But I'm not able to sort the two rows in my picture by column "Einnahmen". Sorry for the german word.
I have an AdvancedDataGrid with a HierarchicalCollectionView as its dataProvider. When I view the grid with the dataset I'm working with, and click the header of the column I wish to sort on, everything works perfectly. It sorts it hierarchically exactly how I would expect it to.What I want to do now is have the grid already be sorted when it is shown to the user. Is there a way to do this programatically? I can't for the life of me figure out how to do this, and clearly it's possible since the AdvancedDataGrid has this built in.[code]This appears to do something as far as sorting goes, but it doesn't sort it in the same way as clicking the column header. "startDate" is a property of an object in theDataSource by the way.