ActionScript 3.0 :: Take A String And Break It Into Two Parts?
Sep 15, 2010
I'm trying to take a string and break it into two parts. It's a url to a video on a RTMP server.So I've got to take this:
[URL] person17/1031617_person_generic_700kbps (note the removal of the ".flv" which is necessary as well).Right now I'm doing this, which seems overly complicated:
Code:
videoURL="rtmpe://emediadev.mysite.com/ffw/person17/1031617_person_generic_700kbps.flv";
videoURL=videoURL.substr(0,videoURL.length-4); //remove ".flv"
var urlArray:Array=videoURL.split("/");
[code]....
View 1 Replies
Similar Posts:
Jul 12, 2011
I have a string that contains a full name input, and I would like to spilt them into 2 parts and save them inside an array, first name and last name. How do I do it with string.split? My current code is myNameArray = str_adminInput.split(" "); This code only works if the names are : Jack Lee, June Poh. This code does not work if the names are: Lee Tok Kong, Tan Beng Seng.
View 7 Replies
Dec 28, 2008
I have copied some code from a tutorial only I seem to be getting problems with strings whenever I use newlines. Even putting:[code]Does this mean that in CS4 that newlines in strings are not allowed? I've also tried concatenating the string lines together using += but that didn't work and was tedious. Also, adding to the end or start of lines doesn't seem to work.
View 7 Replies
Mar 5, 2009
I currently use some code to break down a multidimensional array into a simple string like this:
Code:
var mapStr:String;
for ( var i:int=0; i < outArr.length; i++ ) {
for ( var j:int=0; j < outArr[i].length; j++ ) {
[Code]....
I want to be able to reconstruct the array from the string output from that.
View 1 Replies
Nov 29, 2009
I am trying to implement simple chat application using flex. In it all my chat messages are stored as array collection items, where each item is a string (correspondent to one chat message). I am using datagrid to display all messages. One message goes to one cell of datagrid. Here how it looks: [URL] I want to add a feature for the tool to handle big lines of text. Is there a way to implement line break in case it's very long.
View 2 Replies
May 25, 2009
I am currently designing a website and creating a simple mp3 player with an on / off function but doesn't appear to be working. I am getting this error: 1095: Syntax error: A string literal must be terminated before the line break.1083: Syntax error: end of program is unexpected.1084: Syntax error: expecting rightparen before end of program.1084: Syntax error: expecting rightparen before end of program.1084: Syntax error: expecting rightparen before end of program.1084: Syntax error: expecting rightparen before end of program.
I have uploaded a zip file containing the images and FLA file. I'm wondering if someone wouldn't mind taking a look for me and telling me how to fix this problem: [URL]
View 4 Replies
Aug 31, 2010
my friend make me doing a map (in ActionScript). After the click on the some place in the map starts the redirect, e.g.
Code:
on (release) {
getURL("http://www.yahoo.com/"_blank);
}
I'm not a flash developer, but I would be to want add the every part of the map a identificator, e.g. id="part1"
PS: I have now the map, where every part have some ID. After the click on that ID I call jQuery event 'click' -- and this I need also in the new flash map.. Is it?
View 1 Replies
Aug 5, 2010
Is it possible to make something like the "Bone tool" does in older Flash CS3?I mean make all limbs for a character and connect them together in the joints, so if I drag the hand, the rest of the arm follows in a natural way. So I can easly make motion tween animations.
View 3 Replies
May 5, 2011
I have a project where I need to have a video clip play as soon as the SWF starts, and once it's done, the video stops at the end and a prompt to continue appears to transition into another video.I just need to figure out how to handle the video parts of this project, and I need to do this without showing any playback controls on the screan.
View 1 Replies
Feb 6, 2009
I have created a flash file and the company I have created it for now wants the fla.so they can make changes to certain parts of the action script. There are some elements that I want to protect as it took me months to develop. Can anybody give me a solution of how I can send them the FLA but at the same time protect the most important parts of my code? I was thinking that I could maybe create an external .as file for the bits of code that they want to change and like my fla to those parts.
View 3 Replies
Oct 23, 2009
Well, I've been using flash a while, but I just ran into a newbie problem.. I must have hit some sort of hotkey, but I can't figure out how to undo it or anything in the preferences. Anyways, I'm running Flash CS4 and normally when you draw a shape and select that shape it selects the fill and it looks like little dots all over the shape when its selected. Now when I click on a shape it has a border around it and I can't just select a piece of the shape. Also, what's bothering me is that when you draw two shapes on top of each other, Flash used to merge those shapes automatically, but now they are staying separate unless I manually Union them. It still says they're drawing objects, its not converting them to symbols or anything, but they are kind of acting like symbols in the way I can interact with them. How can I turn this setting off?
View 2 Replies
Jan 13, 2010
I saw a website where a video was breaking up in 2 parts.Is there an easy way to do that
View 7 Replies
Nov 26, 2009
I have a TextField object and i want to apply the bevelFilter object with some settings to a part of the textfield and with other settings to the other part of the textfield, like the textField.setTextFormat() does it.
View 1 Replies
Aug 24, 2010
How do I make an animation play and pause when I click. Meaning.. I want it to play part the first 10 frames when I click, and then stop. Then when I click again it will play from frame 11 to 20, then I click again it plays 21 to 30.
View 3 Replies
Jan 11, 2011
usually it can be solved with the "wmode transparent" param, but in firefox i have a strange problem. when i overlay a flash element with a part of a div the div renders strange (like stairs at the border of the flash element)
[URL]
the grey area (and a small transparent area above) is the flash element. the outline is the div with a border.
the error occurs only on FF (i have 3.6) chrome/safari works fine...
CODE:
its an swfobject implementation. the overlaying div/ul is positioned after the
flash-wrapper.
<div id="flash-wrapper">
<object width="740" height="500" type="application/x-shockwave-flash"
[Code].....
View 1 Replies
May 27, 2011
I'm thinking about distributing bytes of a SWF into multiple files, how can i put a set of bytes in different parts into one byte array?
[Code]...
Also would reading partial bytes into a byte array work?
View 1 Replies
Sep 30, 2009
I have an XML document with different companies and links to different text sources such as "about" etc for each firm.
Now in my company presentation class I want to send an ID reference so if a user clicks on Microsoft the links point to Microsofts information etc. Im loading all other information through another XML and everything works fine, its just the links I cant seem to figure out.
This is my XML
ActionScript Code:
<?xml version="1.0" encoding="utf-8" ?>
<data>
<company id="1">
[Code]......
View 1 Replies
Oct 8, 2010
I'm trying to split an image (in a MC on the stage) into a variable number of parts.
It's not working properly, and I'm pretty sure it's because I'm re-using the bitmapdata and bitmap I create before the loop...
The MC I'm splitting is called 'back'.
ActionScript Code:
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.geom.Rectangle;
[Code]....
View 2 Replies
Feb 23, 2011
I have a bunch of movieclips called firstNameBtn_mc, lastNameBtn_mc and many others. I also have a bunch of movieclips whose names start with the same but instead of "Btn" they have "Arrow", like firstNameArrow_mc, lastNameArrow_mc etc.
What I want is when I click on firstNameBtn_mc it does somthing to firstNameArrow_mc, but there are so many buttons I would like to do it in the following way.
1. get the movie clip's name...something with e.currentTarget.name for example
2. remove the Btn_mc part
3. add the Arrow_mc part
4. do something to the movieclip of that name
View 5 Replies
Mar 23, 2011
I was wondering if its possible to split MovieClip in x parts, and each one of them to be scalable, which means Bitmap is not the answer...?Possible? Impossible?
View 1 Replies
Jun 11, 2011
I'm new to Flash and AS and everything and I've been trying for 2 days now without success.What I'm trying to do is this. The small squares should fade in/spawn in the blue rectangle and fade away/disappear when they hit the red edges.URL...The animation was made on timeline, not using any AS3. The 2 main problems I have is to get the random number to be from negative 1 to 1 and for the squares to move straight and notgenerate a new direction on every frame. I'm not going to show any code cause it's just edited from tutorials and I don't understand half of it and looks terrible.
View 2 Replies
Oct 12, 2011
I have this XML object, and I need to display parts of it so that the user can copy and paste from it. However, whenever I try to, say, display the category section by doing myXML.category, it puts the namespace information in the attributes of the first <category> tag when it displays the xml. Is there a way to get rid of this?
View 5 Replies
Sep 7, 2007
I don't even know what to ask for, but here is my problem: I want to draw a line as part of a graph.Then I want to draw a hollow circle over the line, but I want to cut out the center of the circle, so it shows the layer under the line.At the moment, drawing an outline of a circle the line still shows.I draw the line:
Then I draw the circle:
-----O------
But when I do this in flash I still see the line, the circle is not hollow: How do I 'cut' the middle of the circle out? Instead of beginFill, I want to do beginErase
View 3 Replies
Oct 26, 2007
i am loading in and xml file based on the structure below...
[Code]...
So what i am trying to do is to Splice the array into 2 parts, all the question ID's that are A and all that are B for for example are placed into 2 new array's like so:
[Code]...
but i am having problems with the code below trying to splice them and seperate them,
[Code]...
View 4 Replies
Apr 9, 2008
i created a flash menu that calls its items from an xml document. the menu items are images that scroll within the menu movie clip depending on mouse position. my problem is that, when clicked, each of these menu items needs to call a pretty complex function.
so this seems like a really basic question, but, is there a tag or something i can use in the xml file to like, name each of the items so that i can write functions with them individually with my actionscript in flash?
View 1 Replies
Mar 20, 2009
I'm in need, again, of some assistance. I'm making a game with 2 pictures. and the concept is built on that you erase part of the top-bitmap to see the bitmap under.How can I accomplish this?I tried to wrap my head around the bitmaps and the draw and the FillRect but can't get it to work completely.Basically I want 2 bitmaps, and a cursor which erases parts of the top one to show the one underneath.
View 5 Replies
May 18, 2010
Is there an easy way to prevent particular elements in a percentage-scaled SWF from scaling? I want to make a liquid Flash interface in which only the content scales with the browser window, and the navigation elements remain a constant size.
View 4 Replies
Apr 27, 2009
I'm using Flash CS3 and ActionScript 2, and I'm wondering if there's a way of scripting certain parts of a movie to play in reverse when a button is pressed, I need it start reversing at the most recent, previous, frame and stop reversing 30 frames later.
View 3 Replies
Oct 11, 2009
So I've got this function to make a sprite walk:
[Code]....
But what do I have to do to get the function to adress various versions, such as
chibi.bluejeans1.rtleg._y = 4 + walk; chibi.bluejeans1.ltleg._y = 5 - walk;
so that I can address each type for walking accordingly, through something like
wlk(tunicpants1);
wlk(bluejeans1);
wlk(tuxedopants1);
[Code]....
View 1 Replies
Nov 13, 2009
I found an old post from January that suggested saving the original image as an SWF via Illustrator. I tried it, but my clip is still registering clicks in transparent areas.
Here's a link. [URL]
All I'm trying to do is allow the drawing to be dragged around the screen, but I don't want it to be clickable in the transparent areas where the green background shows through.
how to eliminate the pale cast that the transparent areas are making? The background to the drawing shows totally transparent in Photoshop, but the boundaries of the movie are visible because the supposedly transparent areas of the movie are slightly masking the background.
View 7 Replies