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




Stripping Dollars



No...not stripping FOR dollars!

I have a dynamic text box that has a $ and then a number (ex. $1500). I want a variable to have just the number.

If the text box says "$1500" I want the the variable to equal 1500 (not $1500) and the 1500 should be a number not a string.

Any ideas?



FlashKit > Flash Help > Flash MX
Posted on: 01-30-2005, 06:37 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

I Will Pay 100-200 Dollars
:gone:





























Edited: 10/24/2007 at 12:53:26 PM by Timba416

Estudio's Fla Sale For 10$ Dollars.
I have made the estudio.com's fla(total 30 fla)£¬is same as its site.Now I sale it for 10$ dollars.



If you want to own it. please send email to dumbflash@16.com to contact me.



yours

another.


[Edited by jstarkey on 03-12-2002 at 03:18 AM]

Formatting Numbers As Dollars?
Hey,

Is there a simple way to tell flash I want it to show two decimal places to the right of the decimal point? Even with values I've entered in a list box(4.50) flash insists on dropping the zero.

Thanks for any help

Rad

Formatting Numbers As Dollars?
Hey,

Is there a simple way to tell flash I want it to show two decimal places to the right of the decimal point? Even with values I've entered in a list box(4.50) flash insists on dropping the zero.

Thanks for any help

Rad

I'll Pay You $10 Dollars To Fix Two Problems In My Flash Movie
If you are good and you charge $15/hour it should only take you 10-20 minutes to figure this out...
I am obviously not that good because I spent the last 3-5 days o this and can't figure it out.
It's two separate problems. You can read about it here:
http://www.flashkit.com/board/showth...postid=2943202
and here:
http://www.flashkit.com/board/showth...postid=2943199
If you think you are up to the task PM me with your email and I'll email you the FLA movie.
Once it's done I'll PayPal you $10. If you want more let me know BEFORE you accept, I'll consider it.
Money should move a few of you to have pity of me and help me get through with this ;-)

ISO: Flash Deisgner, Paying ~50 Dollars
Need a clan intro / header, msg me on aim: insolence9dotcom.

Be prepared with a portfolio, and be willing to finish it by Dec 6-7th.

Thanks (not sure, exactly, if this is the right place to post it)

Adding Commas To Turn String Into Dollars
Hi all,

I have a dynamic textfield that is bringing in a number from a txt file.

the number is displaying like this:

1853600

I want it to look like this:

$1,853,600

I can have it display as dollars in another field if that's how this gets done.

oh...How would I adjust it to deal with a number in the tens of millions?

Thanks

-Lemorris

Rounding To 2 Decimal Places (dollars And Cents)
I am building a shopping cart http://www.mperrah.com/tulip/archive/index.html
(Click the images to get to the cart.)
I multiply the sales tax and get 3 or more decimals places for the result.
Is there a way to round up to 2 decimals
ie ($123.46)
not ($123.456...)
I can send the .fla file to anyone interested

Software For Stripping Swf?
I recently saw some software on Flashkit
(I think) and it allowed you to take a swf from a site, import it into Flash and have it retain the sound etc. but I don't remember it's name as I didn't need it at the time. Anyone remember what it was called?

Stripping Strings
I have a string like this:

strContent = Pulp Fiction, directed by
Quentin Tarantino

The problem is I'm trying to strip out any spacing that should not be in there without loosing any commas or special characters that might be in there.
It should end up with:

strContent = Pulp Fiction, directed by Quentin Tarantino

String Stripping
morning, guys


is there a simple way to strip a string of a certain character?

like:

ActionScript Code:
strippedString = stringToStrip - (all "." characters)?
i started a for loop using indexOf and lastIndexOf and charAt but it's becoming very confusing

many thanks

Stripping Strings
hi.

i have 10 sentences i am importing into flash from xml. here is a sample:

ActionScript Code:
my frog has four legs!

i parse it and place it in a variable c.

what i really want is the punctuation put into its own array. i strip c like this:

ActionScript Code:
var strings = c.split(" ");

and of course that places every character into the array and the last character is "legs!".

for other purposes i need to split it in every character but how can i now separate the punctuation (in order) so i can recall it later.

thanks. fumeng.

Stripping Strings
hi.

i have 10 sentences i am importing into flash from xml. here is a sample:

ActionScript Code:
my frog has four legs!

i parse it and place it in a variable c.

what i really want is the punctuation put into its own array. i strip c like this:

ActionScript Code:
var strings = c.split(" ");

and of course that places every character into the array and the last character is "legs!".

for other purposes i need to split it in every character but how can i now separate the punctuation (in order) so i can recall it later.

thanks. fumeng.

Stripping Templates
I've got a template that I'm trying to populate with my info. I'm able to work out where the text variables are loading in and have been happily getting on with that - my problem is that I need to find out how the images are coming from. They all work and if I change the source files that's fine too - they work - but I want to find out how. There is no AS file and using the movie explorer doesn't find them either. Please help.

[as2] Stripping Strings
Hello!

How do I remove the first character from a string value and then put a certain strings in the beginning of that new string?

I have an input text field where a user types his/her cellphone number. Number is something like 04012345467. I need to remove that first zero (the first number will always be a zero; as it is in finnish cellphone numbers) and replace it with the land code 358.

Appreciate if anyone could help me with this one.

-sumo-

Stripping Carriage Returns
Hi every one
I have not been able to find any thing about this but I am pretty sure some one has had to of done this. I have a input text field variable which the user can put carriage returns however those returns break the back end of the application so I need to strip them out before the data is passed to the back end I am not sure how to do this so any help would be great

example:

var temp = "today is a
very nice day";

I need it to look like

var temp = "today is a very nice day";

thanx dave

Stripping Numbers From A Variable
Does anyone know how I could strip numbers from a variable? For example:

var[0] = "apple1"
var[1] = "banana13"
var[2] = "apple53"

with hopes of outputting

var[0] = "apple"
var[1] = "banana"
var[2] = "apple"

Any ideas?

[MX] Stripping HTML Code
I'm trying to build myself a little widget with Flash that strips URLs out of HTML code and presents them in a 'forward and backward' navigation list. So far I have had success doing this if I cut out a chunk of the code by hand and load it into a TXT file for a SWF to load, but what I really want is to point the SWF at a live HTML file and get it to import the entire code as a string.

The problem I'm having is that using both loadVariables() (which I am more familiar with) AND loadVars the text being imported has to be formatted as "variable=value+nextVariable=nextValue", and as we all know, HTML code doesn't work like that.

So what I need to know is, is there any way I can import HTML code in it's entirety as a string and be able to manipulate it using Flash?

Stripping Netstream Into Function
hi all - got a question that is making my brain ache now!

i have this script that sets up and connects a stream to play an flv - in the case using xml to define where the flv is...

PHP Code:




private function onInitialize():void
            {
                _connection = new NetConnection();
                _connection.addEventListener(NetStatusEvent.NET_STATUS, onConnectionNetStatus, false, 0, true);
                _connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onConnectionError, false, 0, true);
                _connection.addEventListener(AsyncErrorEvent.ASYNC_ERROR, onConnectionError, false, 0, true);
                _connection.addEventListener(IOErrorEvent.IO_ERROR, onConnectionError, false, 0, true);
                _connection.objectEncoding = ObjectEncoding.DEFAULT;
                _connection.client = {
                    onBWDone: onBWDone
                };
                //_connection.connect("rtmp://yourfmshere/");
                _connection.connect(null);
            }
            

                        private function onConnectionError(...args):void
            {
                trace("Test.onConnectionError()");
            }
            
            private function onConnectionNetStatus(event:NetStatusEvent):void
            {
                
                var debug:Object = event.info;
                var sT:SoundTransform;
                
                trace("**** code **** " + event.info.code);
                switch (event.info.code)
                {
                    case "NetConnection.Connect.Success":
                        _stream = new NetStream(_connection);
                        _stream.client = {
                            onMetaData: onMetaData,
                            onCuePoint: onCuePoint
                        };
                        
                        _video = new Video();
                        
                        
                        _video.attachNetStream(_stream);
                                                
                        _stream.play(videoPath +
             addChild(_video);
            var xscaler:Number = (1 / _video.width) * stage.stageWidth;
            var yscaler:Number = (1 / _video.width) * stage.stageHeight;

            _video.scaleX = xscaler;
            _video.scaleY = yscaler;


                        
                        break;
                    case "NetConnection.Connect.Closed":
                        trace("closed");
                        break;
                    /* Fatal errors */
                    case "NetConnection.Connect.Rejected":
                    case "NetConnection.Connect.Failed":
                        
                        break;
                    default:
                        break;
                }
            }
            
            private function onBWDone(...args):void
            {
                trace("Test.onBWDone()");
            }
            
            private function onMetaData(...args):void
            {
                trace("Test.onMetaData()");
                _metaData = args[0];
            }
            
            private function onCuePoint(...args):void
            {
                trace("Test.onCuePoint()");
            }
            
            private function onUpdateTimer(event:TimerEvent):void
            {
                trace("Test.onUpdateTimer()");
                trace(" "+_stream.bytesLoaded+" of "+_stream.bytesTotal+" bytes loaded.");
                trace(" "+_stream.time+" of "+_metaData.duration+" played.");
                trace(" _stream.bufferLength:"+_stream.bufferLength);
                
                if (_stream.time >= _metaData.duration)
                {
                    _updateTimer.removeEventListener(TimerEvent.TIMER, onUpdateTimer);
                    _updateTimer = null;
                }
            }







it works and works well - no controls but that is okay for now

what I am trying to do but am failing miserably is to strip the code above into this function very long sorry - but essentially it creates the largeimage or flv - and also shows previous and next buttons.


PHP Code:




/**
         * FUNCTION
         * _______________________________________________________________________________________________________________________________________
         *
         * show large image.
         * @param none
         *
         */

        private function showLargeImage():void
        {
            /**
             * fade in controlpanel.
             *
             */
            
            Tweener.addTween(panel, { _autoAlpha:1, time:0.5, delay:1.5 } );
            
            /**
             * get large image instance as bitmap from loader queue.
             *
             */
            
            largeImage = largeImageLoader.getBitmap("largeimage") as Bitmap;
            
            /**
             * calculate image size for scaling images.
             *
             */
            
            var xscaler:Number = (1 / largeImage.width) * stage.stageWidth;
            largeImage.scaleX = xscaler;
            largeImage.scaleY = xscaler;
            
            /**
             * create new zoom container instance.
             *
             */
            
            zoomContainer = new Sprite;
            
            /**
             * hide zoom container on startup.
             *
             */

            Tweener.addTween(zoomContainer, { _autoAlpha:0, time:0 } );
            
            /**
             * create new pan container instance.
             *
             */
            
            panContainer = new Sprite;
            
            /**
             * add zoom container instance to displaylist.
             *
             */
            
            viewport.addChild(zoomContainer);
            
            /**
             * position pan container.
             *
             */

            panContainer.x = zoomContainer.width / 2;
            panContainer.y = zoomContainer.height / 2;
            
            /**
             * position large image.
             *
             */
            
            largeImage.x = largeImage.width / 2  * -1;
            largeImage.y = largeImage.height / 2 * -1;
            
            /**
             * position zoom container centered on stage.
             *
             */

            zoomContainer.x = int((stage.stageWidth - zoomContainer.width) * 0.5);
            zoomContainer.y = int((stage.stageHeight - zoomContainer.height) * 0.5);
            
            /**
             * add pan container to zoom container instance.
             *
             */
            
            zoomContainer.addChild(panContainer);

            /**
             * add large image to pan container instance.
             *
             */
            
            panContainer.addChild(largeImage);
            
            /**
             * create new image info container instance.
             *
             */
            
            imageInfoBoxContainer = new Sprite();
            
            /**
             * hide image info container on startup.
             *
             */
            
            Tweener.addTween(imageInfoBoxContainer, { _autoAlpha:0, time:0 } );
            
            /**
             * position image info container top left on stage.
             *
             */
            
            imageInfoBoxContainer.x = int((stage.stageWidth - 400) * 0.5);
            imageInfoBoxContainer.y = int((stage.stageHeight - 300) * 0.5);
            
            /**
             * add image info container to displaylist.
             *
             */
            
            addChild(imageInfoBoxContainer);
            
            /**
             * create new imageInfoBox instance.
             *
             */
            
            imageInfoBox = new ImageWorld3dItemInfoBox(0x000000, 0.65, 0xFFFFFF, 0xCCCCCC);
            
            /**
             * add info to image info box.
             *
             */
            
            imageInfoBox.addInfo(imageArray[largeImageItem].infotitle, imageArray[largeImageItem].infotext);
            
            /**
             * add image info infobox instance to image info container instance.
             *
             */
            
            imageInfoBoxContainer.addChild(imageInfoBox);
            
            /**
             * add mouse down event to pan container for dragging image.
             *
             */
            
            panContainer.addEventListener(MouseEvent.MOUSE_DOWN, moveLargeImage, false, 0, true);
            
            /**
             * add stage eventlistener on mouse up to stop dragging large image.
             *
             */
            
            stage.addEventListener(MouseEvent.MOUSE_UP, stopDragLargeImage, false, 0, true);
            
            /**
             * add eventlistener to stage for zooming large image.
             *
             */
            
            stage.addEventListener(MouseEvent.MOUSE_WHEEL, zoomLargeImage, false, 0, true);
            
            /**
             * fade in zoom container.
             *
             */
            
            Tweener.addTween(zoomContainer, { _autoAlpha:1, time:1, delay:1 } );

            /**
             * check if auto show description is set to true and display description automatically
             *
             */
            
            if (autoShowImageDescription == 1)
            {
                Tweener.addTween(imageInfoBoxContainer, { _autoAlpha:1, time:1, delay:2.5 } );
                imageDescriptionShowStatus = true;
            }
            
            /**
             * create new thumbnav instance.
             *
             */
            
            nextThumbnailContainer = new Nextthumb();
            
            /**
             * set thumbnav button mode.
             *
             */
            
            nextThumbnailContainer.buttonMode = true;
            
            /**
             * fade in thumbnav with delay.
             *
             */
            
            Tweener.addTween(nextThumbnailContainer, { _autoAlpha: 0, time: 0 } );
            Tweener.addTween(nextThumbnailContainer, { _autoAlpha: 1, time: 0.5, delay:2 } );
            
            /**
             * create new thumbnav image container instance.
             *
             */
            
            nextThumbnailImageContainer = nextThumbnailContainer.getChildByName("nextthumbholder") as Sprite;
            
            /**
             * set next thumbnav item number.
             *
             */
            
            nextThumbnailImageNumber = Number(largeImageItem) + 1;
            
            /**
             * calculate next item proper.
             *
             */
            
            if (nextThumbnailImageNumber == imageAmount)
            {
                nextThumbnailImageNumber = 0;
            }
            
            /**
             * create new thumbnav image instance.
             *
             */
            
            nextThumbnailImage = new Bitmap();
            
            /**
             * get thumbnav image from loader.
             *
             */
            
            nextThumbnailImage = imagesloader.getBitmap("thumbnail" + nextThumbnailImageNumber) as Bitmap
            
            /**
             * set thumbnav image alpha for startupü.
             *
             */
            
            nextThumbnailImage.alpha = 0.5;
            
            /**
             * add thumbnav image to thumbnav container.
             *
             */
            
            nextThumbnailImageContainer.addChild(nextThumbnailImage);
            
            /**
             * position thumbnav image.
             *
             */
                        
            nextThumbnailImage.x = (nextThumbnailImageContainer.width - nextThumbnailImage.width) * 0.5;
            nextThumbnailImage.y = (nextThumbnailImageContainer.height - nextThumbnailImage.height) * 0.5;
            
            /**
             * position thumbnav container on stage.
             *
             */
            
            nextThumbnailContainer.x = int(stage.stageWidth - 10);
            nextThumbnailContainer.y = int((stage.stageHeight - 76) * 0.5);
            
            /**
             * add thumbnav container to displaylist.
             *
             */

            addChild(nextThumbnailContainer);
            
            /**
             * add eventlisteners to next thumbnav container.
             *
             */
            
            nextThumbnailContainer.addEventListener(MouseEvent.CLICK, loadNextImage, false, 0, true);
            nextThumbnailContainer.addEventListener(MouseEvent.ROLL_OVER, showNextImage, false, 0, true);
            nextThumbnailContainer.addEventListener(MouseEvent.ROLL_OUT, hideNextImage, false, 0, true);
            
            /**
             * create new thumbnav instance.
             *
             */
            
            prevThumbnailContainer = new Nextthumb();
            
            /**
             * set thumbnav button mode.
             *
             */

            prevThumbnailContainer.buttonMode = true;
            
            /**
             * fade in thumbnav with delay.
             *
             */

            Tweener.addTween(prevThumbnailContainer, { _autoAlpha: 0, time: 0 } );
            Tweener.addTween(prevThumbnailContainer, { _autoAlpha: 1, time: 0.5, delay:2 } );
            
            /**
             * create new thumbnav image container instance.
             *
             */

            prevThumbnailImageContainer = prevThumbnailContainer.getChildByName("nextthumbholder") as Sprite;
            
            /**
             * set next thumbnav item number.
             *
             */
            
            prevThumbnailImageNumber = Number(largeImageItem) - 1;
            
            /**
             * calculate prev item proper.
             *
             */
            
            if (prevThumbnailImageNumber < 0)
            {
                prevThumbnailImageNumber = imageAmount - 1;
            }
            
            
            /**
             * create new thumbnav image instance.
             *
             */

            prevThumbnailImage = new Bitmap();
            
            /**
             * get thumbnav image from loader.
             *
             */
            
            prevThumbnailImage = imagesloader.getBitmap("thumbnail" + prevThumbnailImageNumber) as Bitmap
            
            /**
             * set thumbnav image alpha for startup
             *
             */
            
            prevThumbnailImage.alpha = 0.5;
            
            /**
             * add thumbnav image to thumbnav container.
             *
             */
            
            prevThumbnailImageContainer.addChild(prevThumbnailImage);
            
            /**
             * position thumbnav image.
             *
             */
                        
            prevThumbnailImage.x = (prevThumbnailImageContainer.width - prevThumbnailImage.width) * 0.5;
            prevThumbnailImage.y = (prevThumbnailImageContainer.height - prevThumbnailImage.height) * 0.5;
            
            /**
             * position thumbnac container on stage.
             *
             */
            
            prevThumbnailContainer.x = -66;
            prevThumbnailContainer.y = int((stage.stageHeight - 76) * 0.5);
            
            /**
             * add thumbnav container to displaylist.
             *
             */

            addChild(prevThumbnailContainer);
            
            /**
             * add eventlisteners to thumbnav container.
             *
             */
            
            prevThumbnailContainer.addEventListener(MouseEvent.CLICK, loadPrevImage, false, 0, true);
            prevThumbnailContainer.addEventListener(MouseEvent.ROLL_OVER, showPrevImage, false, 0, true);
            prevThumbnailContainer.addEventListener(MouseEvent.ROLL_OUT, hidePrevImage, false, 0, true);
        }







is it something simple and i'm just being a doughnut - or is it not very straight forward?

anyone help me please?

Flash Is Stripping First Letter After /
Hi all

I have the following code:

on (release) {
drv = _url.substr(8, 1);
var theTargetUrl:String = drv+":\downloadsaudio";
trace(theTargetUrl);
getURL(theTargetUrl);
}

when you click on the button you get a trace return of:

C:downloadsudio

for some reason it strips out the "a"

this also happens when with the "v" in video or the "i" in images...

anyone know what the heck is going on?

Using A Tree W/ XML And Stripping Out Certain Nodes...
Ok folks,

Using the tree component, we're loading XML into it via dataProvider. Problem is, our XML needs to contain a children node so we can hide some HTML inside the XML. Otherwise we'd just use an attribute.

As a result, I need to go into the tree and loop through all the nodes and strip out ones where label=description.

Can someone help me out with the AS? Driving me up a wall. I can attach the XML and FLA if needed so you can see exactly what we're working with.

Thanks in advance.

steve

Stripping Tags In RSS Feed
Hi, I am new to all this so bear with me if I don't do things correctly.

I have created a FLA which parses an RSS atom and displays the "title" and "description" nodes in dynamic text fields in as3. All is working great except that there are several line breaks in the traced output that appear in the dynamic text fields when the movie is run that I need to get rid of.

I was able to find code that strips the first instance of '
' but not the second or subsequent. How do I create a "loop" or a "find change" function to go through the entire text in each field to strip out all the line breaks and replace them with a space? Here is the code I have so far;
[a]
var myvar:String = myDynamicText.text;
myDynamicText.text = myvar.replace ('
', ' ');
[/a]

Stripping Out Hard Returns
Hi all..

I got two multiline (no wrap) text input boxes. One is where the user
enters information into, the other shows the entered info (after the press of a button) with some simple html tags embedded. So if i type this:

This is a test

and then hit enter, my result text field should show

This is a test<br>

However, it shows
This is a test
<br>
because it records the fact that there is a Hard return in the input field.
So Question is, how do I strip the Hard returns out of my source, so the <br> can just replace it?


THANKS IN ADVANCE
MCM

Stripping String Content?
Hi,

I am parsing in XML from rss and one of the nodes is creating"<p>Item 4 teaser</p>Item 4 descriptions". I want to take out he <p> </p> is that regual expression or substr() thing?

http://www.yousendit.com/transfer.php?action=download&ufid=D4B91B34655AB468

Stripping 'enter' From A Text File
Hey all

is there anyway to strip an 'enter' from a text file? hehe I know thats not a great explination.

basically I want to be able to have a text file to 'loadvariables' into a movie but have the text in the file be like this...

&myTitles=song1
,song1
,song1
,song1
,song1
,song1
,song1

and then split the string using

_root.myTitlesArray = myTitles.split(",");

the reason I want to keep the text like this is so the client can update it easily without having to do song1,song2,song3, etc.


I hope I explained this well enough Thanks!

RegExp For Stripping A Tags From Text
Hi,

In one of my recent projects I've had to use RegExp to strip out the <a> tags from some text, store the tags in an array, then using RegExp again strip out the text of the a tag, and also strip out the actual URL of the tag, storing these in comma delimited strings. I've got it working fine, but it seems that I'm having to take too many steps to parse the text to get it how I want it.

I've been using this RegExp pattern to parse the <a> tags: /<a.*</a>/g;
Then, to parse out just the URL of the a tag, the "http:blah.com" I've been using this pattern: /".*?"/sg;

Which I run as a match, the returned Array contains elements like so; ["http:blah.com", "http:blah.com", "http:blah.com"]
As I don't want the double quotes, I have to again parse the contents of the Array to strip the double quotes out again, using this simple pattern:/"/g used in a replace.

Ideally I'd like to not have to do that last step, so does anyone know of a RegExp pattern for stripping the the URLs out of <a tags>?

The reason for this bit of code is that I'm searching through HTML text for links, and then creating a new RegExp pattern from the text of those links that I can apply to the text representation of the HTML text, finding the links and aligning some icons next to each link in the text. The stuff I posted relates to just finding the URLS, but I use a similar approach to find the links actual text value as well.

Thanks in advance.

Stripping Any Commas And/or Dollar Signs
I have an input field where a user will enter their household income. I want to eliminate any commas or dollar signs that they may enter with their income. Is there a nice way of doing this?

Ex.
User enters: $14,650 => 14650
User enters: 16580 => 16580 does not change

Thanks.

Stripping Components Or Video From Existing Files?
I know I've seen a program somewhere that claims to
be able to find the locations of files loaded by a
main flash file ...

I'm attempting to find the locations of videos that
are being called by a main flash file ...

the file is here:

http://www.marketingsecrets.com/workshopvideos.html

any way to go about this?

[F8] ParseInt(TextInput.text) Is Stripping My Decimal
I’m using flash 8 and programming with as1.

I have a question about the parseInt() function.

I'm pulling a number from a TextInput component and am noticing that the parseInt() function is deleting the numbers decimal.

Example: if I have 13.5 in a textInput and pull it out via:
parseInt(TextInput.text)
It will give me 13 even.

Does anybody know how to retain my decimal in this case?

Thanks!

Flash <embed> Is Stripping Out Part Of The .swfs Src?
This is driving me nuts!

There are two flash movies here: http://boom.biklopsdesign.com/ = a header and a gallery. The gallery shows, but the header doesn't! I'm using the exact same code for both but in Firebug I notice that the flash header is displaying as having an src="flashheader.swf" even though the html specifies src="ASSETS/flashheader.swf." It's stripping out part of the src when it displays! Why?

The javascript you see in the code was provided by the Flash developer and is supposed to prevent the "dotted box" focus effect when you mouse-over in IE. Is that messing stuff up?

Thanks in advance!

Stripping White Spaces On Uploaded Pic Titles
Hi,
My problem is that I use a third party script that allows me to upload extra pictures to my site.
The problem is that any pictures that are uploaded with any white spaces in their title end up with an empty file (red cross syndrom).
I have never really understood how the html/ php/ sql relationship works on picture uploads...
Where in the system do I strip the spaces form the users photo title.
 This is a section of the embedded html php page...

  #// Create a TMP directory for this session (if not already created)
                if(!file_exists($image_upload_path.session_id()))
                {
                    mkdir($image_upload_path.session_id(),0777);
                }
                #// Move uploaded file into TMP directory
                move_uploaded_file($HTTP_POST_FILES[userfile][tmp_name],
                                   $image_upload_path.session_id()."/".$HTTP_POST_FILES[userfile][name]);

                                #//Populate arrays
                $EDIT_UPLOADED_PICTURES[] = $HTTP_POST_FILES[userfile][name];
                $EDIT_UPLOADED_PICTURES_SIZE[] = $HTTP_POST_FILES[userfile][size];
                
                session_name($SESSION_NAME);
                session_register(EDIT_UPLOADED_PICTURES,EDIT_UPLOADED_PICTURES_SIZE);

Is this the section I should be looking at or am I off the mark..

Cheers in anticipation

John

Adding Percentages/Stripping Numeric Values
I have several question banks created using the pre-built question banks.

I wish to compile the results so need to add them as numbers but they are outputted as percentages is there a way of stripping the numeric values out of these strings?

I am not an expert in flash so any help would be gratefully received



Stripping Out Carriage Returns From Input Text
Hello. I know what I want to do, but I just don't know the code to do it. Here goes:

I have a multi-chapter e-learning module that at certain points asks the user to type in their response to a question. I'm using input text fields with scrollers and allowing 500 characters. At the end of the session, a user can print out thier replies to the questions. I'm getting the variables transferred to dyn text fields in the 'printable' MC just fine. However, say a user typed 'return'
<------------
to create a break for a new paragraph. That's all fine because the initial input box can scroll. In the printable MC though, I have the dyn boxes set up large enough to allow the 500 characters and thats about it. So if the user has a couple 'returns' in with their answer, it just slides down to an un-seen area of the dyn boxes in the printout. Does anyone know how I could strip the returns out as it transfers the variables into the dyn boxes??

Basically you would take something like this text here:
Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla. Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla. Bla bla bla Bla bla bla.

Bla bla bla Bla bla bla Bla bla bla Bla bla bla. Bla bla bla Bla bla bla Bla bla bla.

And translate it to:
Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla. Bla bla bla Bla bla bla Bla bla bla Bla bla bla Bla bla bla. Bla bla bla Bla bla bla. Bla bla bla Bla bla bla Bla bla bla Bla bla bla. Bla bla bla Bla bla bla Bla bla bla.

Thanks for takin a look
rulive

Stripping Illegal HTML From Form Inputs To Be Displayed In FMX Dyn Text Box
HI guys,

Need some suggestions.

Ive had a CF developer build a backend for a small flash site for me which stores copy (in HTML) and a URL for a display image.

Now, my client has been copying/pasting content from Word directly into this rich text box, and naturally putting all the crappy word html css and formatting tags in, which obviously break when flash renders the text as HTML.

Just wondering of anyone knew of a CF plugin, or any other suggestions anyone would have to strip the input feild of any word HTML?

Ive been searching all morning and cant find much.

Any suggestions would be helpful.

Thanks.

Copyright © 2005-08 www.BigResource.com, All rights reserved