ActionScript 3.0 :: Library For Advanced String Manipulation?
May 29, 2009
I really like the string.Format() method and the StringBuilder class in C# quite a bit.
I sucks AS3 isn't as robust (yet, hopefully) with regard to string manipulation.[code]...
So, are there any open source libraries for AS3 that include this kind of functionality (and more, hopefully)?
Currently, in order to have the same result in AS3 would take a lot more code.
I hate relying on C# and other languages to do more formatting and such than they really should when generating XML files and stuff like that.
View 5 Replies
Similar Posts:
Jun 6, 2006
I know how to manipulate hex colours by splitting the num bers up and perfoming calcutaions on them using bit-operators. Thats fine... but i now need to manipulate colour not using the normal RGB. I need to be able to add two colours together like paint. E.g. red and blue equals purple, yellow and blue equals green. Has anyon e had any experience with this and even more importantly can it be done? (i assume it can... nothings impossible)
View 14 Replies
Aug 22, 2006
I'm using a function to call multiple button actions, so I don't have to rewrite code for each button... here's the script:
[Code]...
This is all part of a clip which loads pictures externally... each of the buttons (which are mc's) are named btn0, btn1, etc.
View 14 Replies
Jul 20, 2009
I'm not familiar with XML text handling yet, but have to create one quiz quickly.I've decided to put feedback into different variables. e.g. fb1_1 for right anwer of question 1, fb1_2 for wrong answer of question 1.I thought to change a string to variable and put the text into a dynamic text "fb" would be something like this:[code]Also is it possible to put all text in one text field and extract a different line of text and put it to a dynamic text field? I tried to put the text into a variable, but it only shows level (level0) and instance name not the text itself. Anyway to get this way to work?
View 0 Replies
Jul 28, 2011
I have some binary data and I can't store it in a string, as such I'm using a ByteArray. The problem is that I need some functionality that comes with strings, to be specific I need the charAt, substr, indexOf and substring methods.
View 1 Replies
Oct 16, 2003
I have a button within a movie clip that passes an identifier to a function like so:
on (release)
{
_root.getname(this);
}
The function recieves "this" as "_level0.mc_main_menu.game0".I want to treat the returned value as a string & get the value "game0" from it.How do I do this?Am I right in saying that "this" is an object, and I need to convert it to a string first?
p.s - in case your interested - the value "game0" matches an xml node & the function plays a movie clip which is populated by the node attributes.
View 2 Replies
Nov 25, 2011
I want to create a custom component library. the components are customize-able during creation time. means like Accordion or TabNavigator, when we drag and drop the Accordion in flash builder it
<mx:Accordion x="38" y="167" width="200" height="200">
<s:NavigatorContent width="100%" height="100%" label="Accordion Pane 1">
</s:NavigatorContent>
[code]....
View 2 Replies
Aug 4, 2011
I am designing a web application in Flex 4 and currently facing an issue rendering advanced HTML tags and entities in Flex 4. All I want to do is basically render an HTML text coming to me something like the one given below:-
[Code]....
View 3 Replies
Apr 1, 2009
I am trying to load a movieclip from the library onto my stage. But the name of the movieclip is read in from a user-entered text field. Typically, to load a movieclip from the library named, Bee, I would do the following:
var mc:MovieClip = new Bee; // this works.
But the name of my symbol is in a TextField. The following do not work:
// Attempt #1:
var mc:MovieClip = new userfield_txt.text; // No Good
// Attempt #2:
var str:String = userfield_txt.text;
[code]....
I realize the new operator requires a Class data-type, so how do I get the value stored in a String or TextField into a Class type?
View 2 Replies
Aug 25, 2010
I am trying to write some actionscript 3 code to play short sounds from the library, using a dynamically created string to load it. In AS2, I could do something like this:
mySound = new Sound();
mySound.attachSound("any concatenated string" + foo);
In AS3 however, the identifier is a class whose name, it seems, must be already known. Is there a simple way to 'attach' a sound using the identifier as a string in actionscript 3?
View 2 Replies
Jan 18, 2011
I have some movieClips in my libaray called p1, p2 etc with export settings of the same name.I have the names stored in an array.I cant work out how to do this dynamically:
ActionScript Code:
private var myImages:Array = [p1, p2, p3, p4, p5];
private function changeImage(newImg:Number):void {
[code].....
View 7 Replies
Feb 22, 2009
I want to load one out of 18 different instances from my library (exported as mc1-mc18). In AS2 this was simple! I fetched the variable (whC) that contained the name of the movieclip to be loaded and just put it into attachMovie
AS2:
Code:
_loc.attachMovie(whC,"clip"+k,this.getNextHighestDepth());
In AS3 do I have to use this long if/else statement to make it work the same?
Code:
public function fetchTile(whC:String):MovieClip {
if (whC=="mc1") {
fetched= new mc1();
[Code].....
View 2 Replies
Mar 3, 2010
how do I load library objects by string list using Flash and AS3? I need to understand string lists, arrays, and sprites better.
WHAT I WANT TO DO Load enemies to stage using a string list "Orange ball, red ball, green ball etc"
EXPLANATION The tutorials I've been given are too basic, or they are incomplete examples that don't explain the classes being used.
Trace statements are not showing me how I'm accessing the name or class of an object.
[Code]...
View 1 Replies
May 28, 2011
How can I convert a string to a class without getDefinitionByName because that class is not linked to a library item and getDefinitionByName only works with classes that are linked to library or allready initialized! Is there a way? Or I have to initialize every class I want to use?!
View 2 Replies
Aug 22, 2011
Throughout different times in my app I have to load, and then later on delete, a series of movieclips from the library.They all have the prefix "mc_".[code]
View 2 Replies
Nov 15, 2009
i have a bitmap in the library with export name Dots
1. how do i take this and pass it to the class which expects a Bitmap as a parameter? if i load it externally i could say:
[Code]...
View 5 Replies
Oct 3, 2006
Using AS2 or 3, is there a way to create my own file format? I would like to create a game.And when users play the game, they can create a GAME-SAVE-FILE.So, let's say that player 1 is playing... He get's to level 22 and has to sign off.He clicks save my GAME-SAVE-FILE to my computer.He names the file MyGame and saves it to his desktop.So now on his desktop he has MyGame.gsf. Next time he visits, he can click on UpLoad My Saved Game.He selects his previously saved MyGame.gsf And bammo... all the information was stored in his file and now he can play on.
I need to know how I would put together the format for my own file-type / extension.I need to know how I would access, write, and edit my own file-type / extension.Since Flash can do this type of File Manipulation with PNG's and JPG's.So surely it can be done with any desired custom format.
View 2 Replies
Mar 11, 2010
I have a request to create a "flash-like" app that is connected to a MS Access Database (DB). The customer has built up a product configurator in Access and wants to know if I can do anything with it. Is this what Flex is good for? I still really do not understand what Flex is all about.
Anyway, I thought of exporting the DB out to an XML file and importing that to a flash app and then using the data there. The problem with that is that I would have to recreate all of the logic (e.g. if you choose "model A" you can only choose "colors 1, 2, or 3") that manipulates the elements in the DB and also the client would not be able to easily manipulate/edit/update the DB without having to export it to XML, etc...What would be a smart way for me to access/manipulate a MS Access Database through a flash front end?
View 1 Replies
Dec 7, 2011
Using javascript or flash, is it possible to log into websites and than pull content from that page?
I am trying to make a phone app that displays content from a site that requires log in.
View 2 Replies
Jan 17, 2010
I am curious if anyone knows how to code a button so that when you click it an object resizes, but shows the animation of it resizing. For example I know that
ActionScript Code:
btn1.addEventListener(MouseEvent.onRelease, resize);
function resize(): void {
[code]......
View 4 Replies
Jul 20, 2006
I want to search and replace specific text in a HTML file (about 10k - so quite a lot of text). I was thinking of trying to get Flash to do this for me. I wasn't sure how good Actionscripts text manipulation was! The only reason why I was think of doing this in Flash was because I don't know VB. I would otherwise do it in Perl if Actionscript is no good.
View 1 Replies
Oct 14, 2009
I'm currently trying to create an advent calendar I would like the flash movie to somehow recognise the date on the users computer and then gotoAndStop at that particular Frame Label (eg. If it's the 20th December then it jumps to Frame Label 20 in the main timeline.
View 4 Replies
Apr 24, 2012
I have a project which is about creating interactive videos for users..The main idea is that user will open the app and a predefined video will show-up.Video will show couple of billboards, signs etc. while moving through a highway.. Like from a perspective of a driver..I need to insert users photos to these billboards and some text to signs..
The problem is, these objects which I'll be filling are changing their shapes constantly because of the car movement. I can get all the x,y coordinates and timings of the video from my partners. But I don't know how to use them in this situation.I think about continious tweens with these x,y values but I'm not sure..
View 5 Replies
Jan 30, 2010
I have a MovieClip in the library exported for actionscript. How do i convert or attachMovie it to a BitmapData class so that i can manipulate its pixel data? I will need that so that i can distort the MovieClip.
View 3 Replies
Sep 4, 2010
I'm creating a Flex application that enables users to communicate in a kind of video chat room. I only allow to live streams at any given moment. I'm using FMS to record the videos in FLVs. What I need to do is post process those videos and create a single video with all that happened in the video room. That means that I need to combine 2 videos, reduce the size of one of them so it appears over the other one. In other words one video will use the whole space an the other will appear at the upper left corner (over the other video,).
I need a server side solution for this. I created another post here and someone suggest a screen capture solution. That would work perfectly, but since this appliction will be used for several people and any time, I want the process to be automaticaly not manual. So, I'm thinking I can do it with FFMPEG, but I need a way to identify in which order I need to compose the videos. Something like adding a time stamp to each FLV in FMS (when they are recorded). How can I add custom metadata to the FLV?
View 1 Replies
Feb 6, 2011
I've been messing around a bit with some low-level bitmap manipulation and having been creating some various color matrices to apply to bitmap data to add "filters" (for lack of a better term).I have seen a number of tutorials online in C# and AS3 about applying various color matrices to bitmaps, but was curious if anyone simply had a collection of these color matrices that map to specific filter styles (black and white, sepia, etc.).
View 1 Replies
Jul 26, 2011
I need to do file manipulation such as create,write and delete in flex4 webapplication.
View 0 Replies
Aug 24, 2004
i have a problem manipulating multiple sound objects in MX. i have a main background loop object and a button rollover object (which plays on specific buttons). i then have a volume slider which will set the volume of only the main bg loop object. but when i tested it, it seems that the volume of the button rollover object is also the same with the main bg loop object's volume. meaning, if my main bg loop's volume is down to 50, the button rollover sound volume is also 50.
here're my codes:
//code on 1st frame
mainLoop = new Sound();
mainLoop.attachSound("mainLoop");
mainLoop.start();
mainLoop.onSoundComplete = function(){
mainLoop.start();
}
hoverSound = new Sound();
hoverSound.attachSound("hoverSound");
//code on slider MC
onClipEvent(enterFrame){
if(drag){
_root.mainLoop.setVolume(this._x); //this._x is between 0-100
}
}
//code on sample button
on(rollOver){
hoverSound.start();
}
thanks!
View 3 Replies
Sep 3, 2004
I have a site where as you click links, you move forwards through a city. I want to fade sound files in and out, overlapping, depending on where you are in the city.As yet, I can't have two sounds playing at once.I have found a site with the effect I want, it's atI have two sound loops at the moment, one of cicadas, one of a city at night, both saved as separate .swf files, which I have loaded onto the main timeline on layers 14 and 15.
The code for the two loops is:cicadas.swf, FRAME 1
var volPercent = 20;
cicadas = new Sound(cicadas);
cicadas.setVolume(volPercent*2);
[code]......
View 4 Replies
Aug 24, 2004
i have a problem manipulating multiple sound objects in MX. i have a main background loop object and a button rollover object (which plays on specific buttons). i then have a volume slider which will set the volume of only the main bg loop object. but when i tested it, it seems that the volume of the button rollover object is also the same with the main bg loop object's volume. meaning, if my main bg loop's volume is down to 50, the button rollover sound volume is also 50.
here're my codes:
//code on 1st frame
mainLoop = new Sound();
mainLoop.attachSound("mainLoop");
[code]...
View 3 Replies