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




How To Remove The .jpg From The Image.jpg Txt



ok so I have a upload and photos album program I'm working on and to save time
the title of the image is the name of the file. so when you upload the image it will and the string of text which is file name to the title text field, that works great for me, but if I could have it remove the .jpg from the string of text that would be better. any ideas on how to make a function that removes specific parts out of a string, such as .jpg out of image.jpg so the out put would be image only.



FlashKit > Flash Help > Flash ActionScript
Posted on: 06-18-2006, 03:15 AM


View Complete Forum Thread with Replies

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

Load Image, Remove MC, Bring Back Image
I'm using some dynamic images for a scrolling menu. The scrolling menu comes from a version that used static images. In that version, it simply ran through the objects that should be visible, attach new mc's for those that are missing and deleting the ones that are no longer visible. Now, when I bring in the dynamic images, the people will have to load the images several times everytime they go up and down.

How do I load all the images into memory and then call on them just as I would call on them if they were in the library?

Image Slideshow Cant Remove Previous Image
Hi there I have a basic image slide show loading external images that fades out after each image and then I want to load the next image. However I can't figure out how to remove the old image, at the moment when the image fades out you can see all the previous images fading out too.

Here is the code I am using:


Code:
var imageNo:Number = 1;

ImageLoad("images/home/" + imageNo + ".jpg",imageHolderMC);

// image preloader
function ImageLoad(u:String,target){
var targetClip = target;
var _loader:Loader = new Loader();
var request:URLRequest = new URLRequest(u);
_loader.load(request);
targetClip.addChild(_loader);
_loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);


}


function loadProgress(event:ProgressEvent):void {
var percentLoaded:Number = event.bytesLoaded/event.bytesTotal;
percentLoaded = Math.round(percentLoaded * 100);
}

function completeHandler(event):void {
imageHolderMC.alpha = 1;
imageHolderMC.addEventListener(Event.ENTER_FRAME, fadeOut);
function fadeOut(evt:Event):void {
if(imageHolderMC.alpha > 0){
imageHolderMC.alpha -= .02;
} else {
imageHolderMC.removeEventListener(Event.ENTER_FRAME, fadeOut);
imageNo++;
ImageLoad("images/home/" + imageNo + ".jpg",imageHolderMC);
}
}
}
I think it is something to do with removeChild() but I can't figure out where to put it.

Any help would be really er... helpful!

Cheers,

Bob

How To Remove An Image Properly?
Hi - I'm loading in a few images with code like this, found in my onLoadComplete() function, after data gets in:


ActionScript Code:
var imageLoader0 = new Loader();
imageLoader0.load(new URLRequest(prepath + eventXML.item.image[0]));
image0_mc.addChild(imageLoader0);

Can someone please advise me the proper way to remove one of said images, so that I can replace it with another? I always get errors like "must be a parent of the caller" and null object errors whenever I attempt this. I would have thought a simple image0_mc.removeChild(imageLoader0) would do it but I'm not so sure...

Remove Image Tooltips
Hi,

When you go over an image with your mouse this little popup 'tooltip' normally shows, where you can mail, print or save the image with. I once read that you can make that invisible or remove it but I can't find it anymore.

Does somebody know how or know a tut?

Thanks,
Jerryj.

How To Remove Background Of An Image
Does anyone knows how to remove the white frame of images I need to combine into a flash MC? Thanks!

[F8] Remove Loaded Image From Movieclip
I have this XML gallery with loads of different categories. I want to make a button that clears the image that is loaded in the movie clip when I click on it. Can some one tell me how I'm gonna do this plz

thanx.


Code:
var x:XML = new XML();
x.ignoreWhite = true;
var urls:Array = new Array();
var captions:Array = new Array();
var wis:Number;

x.onLoad = function() {
urls = new Array();
captions = new Array();
var photos:Array = this.firstChild.childNodes;
for (i=0;i<photos.length;i++) {
urls.push(photos[i].attributes.url);
captions.push(photos[i].attributes.caption);
}
holder.loadMovie(urls[0]);
caption.text = captions[0];
wis = 0;
}

classic_mc.onRelease = function() {
x.load("XML/gallery/invitations/iClassic.xml");
}

handmade_mc.onRelease = function() {
x.load("XML/gallery/invitations/iHandmade.xml");
}
unique_mc.onRelease = function() {
x.load("XML/gallery/invitations/iUnique.xml");
}


/////////////////////////////////////
p = 0;
this.onEnterFrame = function() {

filesize = holder.getBytesTotal();
loaded = holder.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {

preloader.preload_bar._xscale = 100*loaded/filesize;

} else {

preloader._visible = false;
if (holder._alpha<100) {

holder._alpha += 10;

}

}

};

/////////////////////////////////////////////////

//previous button
previous_btn.onRollOver = over;
previous_btn.onRollOut = out;
previous_btn.buttText.buttonText.text = "previous";

function over () {
this.gotoAndPlay(2);
}

function out () {
this.gotoAndPlay(7);
}
previous_btn.onRelease = function() {
if(wis > 0) {
wis--;
holder.loadMovie(urls[wis]);
caption.text = captions[wis];
}
}
//next button
next_btn.onRollOver = over;
next_btn.onRollOut = out;
next_btn.buttText.buttonText.text = "next";

function over () {
this.gotoAndPlay(2);
}

function out () {
this.gotoAndPlay(7);
}

next_btn.onRelease = function() {
if(wis < urls.length-1) {
wis++;
holder.loadMovie(urls[wis]);
caption.text = captions[wis];
}
}

[CS3] How To Remove Image Jitter In Flash
when i impoting a image it's getting jitter on that. What should i do to avoid this problem. please help me.

How To Remove/Hide A Loaded Image
I am using the following code:


Code:
ImageLoad("pictures/mypicture.jpg",this,0,0);

function ImageLoad(u:String,target,Ypos,Xpos){
preLoader.alpha = 100;
var targetClip = target;
var positionY = Ypos;
var positionX = Xpos;
var _loader:Loader = new Loader();
var request:URLRequest = new URLRequest(u);
_loader.load(request);
targetClip.addChild(_loader);
targetClip.y = positionY;
targetClip.x = positionX;
}
This successfully loads the image mypicture.jpg, however I now want to have another function to remove/hide mypicture.jpg... I cannot figure out how.

Please help!

Prev/next Button Remove When On First/last Image
I have a previous and next button in photo gallery that loads the previous/next images when clicked - they work fine - are actual buttons.

Is there a simple way to remove the relevant buttons if the user is on the first or last image (i.e., no previous button if on first image - no next button if on last button)?

I can post the whole .fla if needed (I'm on MX), but here's the AS that deals with these specifically.

CODEprev_btn.onPress = function ()
    {
        if (_global.selectedImage > 0)
        {
            _global.selectedImage--;
            loadImage(_global.selectedImage);
        }
        else
        {
             // trace("You are watching the first element...");
        }
    }
    
    next_btn.onPress = function ()
    {
        if (_global.selectedImage < _global.Images.length - 1)
        {
            _global.selectedImage++;
            loadImage(_global.selectedImage);
        }
        else
        {
            
             // trace("You are watching the last element...");
        }
    }
    
    loadImage(_global.selectedImage);
}

How Do I Remove Background From Image In Flash? Use Another Program?
i have a background image of a scenery and i have an image of a person. if the person's image has a background to it how can i cut the background out of it so i can just animate the person?

an example of what i am talking about is on the opening part of https://www.amadeodecada.com/Secure.html where u can notice the girl is in in color and looks as if she is a seperate image from the background which is in black and white.

thanx in advance.........

Dynamic Text W/image - Remove Margin
I've created a TXT file that I'm loading into a dynamic text box as htmlText.
The htmlText has jpgs embedded in it. They load fine but Flash seems to put about a 5px padding or margin around each image.
Does anyone know a way to remove this margin?
I haven't written a stylesheet for it yet. Would that work?

How Do I Remove Random Function From This Dynamic Image Gallery?
Hi, I'm new here and new to actionscript. I am trying to remove the random funciton from this script and to add a button which simply allows the user to click forward through the images in order rather than randomly. I've tried a bunch of things but am going nowhere...any help would be greatly appreciated...


MovieClip.prototype.scaleTo=function(m){
with(this){
_xscale=_yscale=100;
var p=new Object({H:_height/m._height,W:_width/m._width});
p=(p.H>p.W) ? p.H : p.W;
_yscale=_xscale=100/p;
_x=m._x-_width/2, _y=m._y-_height/2;
}};

Number.prototype.Rnd=function(){
var num=this
var newRnd=Math.round(Math.random()*(num-1)-(-1));
while((newRnd==this.Rnd.old)||(newRnd==this.Rnd.va ryold)){
newRnd=Math.round(Math.random()*(num-1)-(-1));
}
trace( this.Rnd.veryold+ " "+this.Rnd.old+" "+newRnd);
this.Rnd.veryold=this.Rnd.old;
this.Rnd.old=newRnd;
return(newRnd);
};

//need some pictures Picture1.jpg, Picture2.jpg, Picture3.jpg
//and a movieClip that is _visible==false to scale to "myMask".
//and a movieClip to act as a button

_global.noPictures = 5;

assessLoad = function(clip, loadFunc,myMask) {
if ((clip.getBytesLoaded()/clip.getBytesTotal() == 1)&&(clip._width>4)) {
clip[loadFunc](myMask);
clip._alpha=1;
clip.onEnterFrame=function(){
if(this._alpha<100){
this._alpha+=5;
} else {
this._alpha=100;
delete this.onEnterFrame;
}
}
clearInterval(loadInterval);
}
};
newPic_btn.onRelease=function(){newPic(this,"clip" )};
function newPic(clip){
_root["clip"+this.status].swapDepths(50);
this.status=!this.status;
var genNum=noPictures.Rnd(noPictures);
var pic = "Picture"+genNum+".jpg";
trace(pic);
var clip=_root.createEmptyMovieClip("clip"+this.status *1,100);
clip._x=1000;
clip._y=1000;
clip.loadMovie(pic);
if(loadInterval!=undefined){
clearInterval(_root.loadInterval);
}
_root.loadInterval = setInterval(_root, "assessLoad", 40, clip, "scaleTo", _root.myMask);
};
size.onPress=function(){
this.startDrag();
this.onEnterFrame=function(){
rescale(this,_root.myMask);
}
}
size.onRelease=function(){
this.stopDrag();
rescale(this,_root.myMask);
this.onEnterFrame=null;
}
function rescale(mc,masc){
masc._width=2*Math.abs(mc._x-masc._x);
masc._height=2*Math.abs(mc._y-masc._y);
s=_root.newPic.status;
_root["clip"+s*1].scaleTo(masc);
_root["clip"+!s*1].scaleTo(masc);
}
rescale(size,_root.myMask);
newPic(newPic_btn,"clip");

How Do You Delete / Remove / Unload Xml Jpeg Image From Stage Once Scene Changes?
based on attached file: "slideshow"

Scenario:
suppose after view one slideshow (scene1 slideshow) you want to transition to a new scene (scene2 slideshow) with a completely different slideshow. via clicking on a menu button that takes you to that new scene.

so far I am able to get to new scene but the images from the previous scene (scene 1) xml jpeg image remains on the stage in the new scene (scene 2)

is this a image cache problem? The jpeg is still there but the other stage elements do not remain on the stage in the new scene.

How do I remove, delete them, unload or get the xml jpegs from scene 1 out of scene 2
please help

How Do You Delete / Remove / Unload Xml Jpeg Image From Stage When The Scene Changes?
Scenario:
3 scenes
scene 1 "home"
scene 2 slideshow1 "images" (XML images and file)
scene 3 slideshow2 "images1" (XML images and file)

see attached file: "slideshow"

so far I am able to get to new scene but the images from the previous scene xml jpeg images remains on the stage when you go back to the "home" scene or to another scene.

How do I unload (delete/remove/destroy) the XML jpeg data from the stage when you go to a new scene?

is this a image cache problem? How can I correct this?????

please help!!!!!

JavaScript Remove. Remove Flash Applet When Done Playing?
Is there anyway to remove a section of HTML with a javascript? Ive seen ones that replace text segments, and remove certain tags like <br>. I want it to remove the flash applet once its done playing.

I know that its possible, I just need someone that knows javascript better than me. Someone please help it would be MUCH appriciated! Thanks!

Remove Movie Clip Help, Remove Child {AS2}
So, I'm new here, and do to the lack of good help on Kongregate, I have come here =D Hopefully somebody here will be able to help me

if(_root.row2.block1._x == _root.row1.block1._x)
{
_root.row2.block1.removeMovieClip();
trace("working");
}


now, the trace fires, and, if I remove ".block1" the entire movie clip is removed, but with it in there, to remove the MC from within my MC, it WONT be removed, am I doing this wrong or am I making some other error?

Loaded External Image Question: Use Default Image If Loaded Image Not Found?
Hello,

I use the following code to load an external logo into a Flash Movie.

Quote:




var myRequest:URLRequest=new URLRequest(logoPath);
var loader:Loader = new Loader();
loader.load(myRequest);
holder_mc.addChild(loader);




What if the logo file is not find? I wish that if the logo is not found, another default logo will be used, i.e.

if (logoPath is here) {
var myRequest:URLRequest=new URLRequest(logoPath);
} else (logoPath is not here) {
var myRequest:URLRequest=new URLRequest("defaultlogo.png");
}

How can I do that?

Thanks and best regards

Alex

Remove MC
Hi, can you help me to solve this problem?
I have load a MC in a target (fotina is the name of istance) instead a Flash MC.I want to insert a button that close the MC in target named fotina without close a MC in other target on the same scene.

Thank you very much, and excuse me for my poor english...

REMOVE MC
A movie duplicates a MC 120 times, then it stops.

I then want to get rid of all 120 mc all at once by the press of a button.

I can go:

removeMovieClip("ab" + 1)
removeMovieClip("ab" + 2)
removeMovieClip("ab" + 3) etc etc to 120.......

or I could use........?

I'm sure there's a simple way to do this.

Cheers.

Remove Tag?
as you can see from my previous thread, i've desperately been trying to make flash buttons smaller than the minimum allowed in flash. Now i've realized when inserting the movie in dreamweaver, when i right click on the button i have an option 'remove tag' when i choose it the button becomes much smaller without losing the image (when viewed in browser) whats that all about??? what exactly am i removing, why does the button in turn become smaller and what is the disadvantage of removing this tag? this is more of a dreamweaver question, but i thought i try my luck.
thanks!

If I Want To Remove The Mc
if i want to remove the mc not one by one

Any Way To Remove
i'm putting a website on cd, and would like to remove the notice that asks users to update to flash player 6 when the page is opened, since most of my users will be offline and it tries to make them connect. i published all the .swf's for flash player 5, yet the notice still pops up. any way to do it?

a version is online at http://www.bob-designs.com if that helps. thanks,

bob

How To Remove It?
can anyone teach me how do i remove duplicateMovieClip?! i duplicated 10 of them.. but only the first movieclip was removed from the scene after it move on to the next scene..

the remaining 9 movieclips still remains even when i am at a new scene now.. how do i remove all away?! i want all to disappear after i move to the next scene..

this is how i duplicated my movieclips..

if (max1 != 0) {
for (c=2; c<=max1; c++) {
duplicateMovieClip("con" add (c-1), "Con" add c, c+1);
}
}


a million thx 4 all the help..

Remove Me
new post instead of reply

Remove MC?
Why doesn't this work to remove an MC named rock? Seems like I'm following the proper syntax!

if(this.hitTest(_root.rock)){
removeMovieClip(_root.rock);
_root.rock._alpha = 30 // Just a test
}

(Flash 5)

Thanks

Remove MC
This should be a relatively easy question. I have a Movie Clip on the stage. How can I get it to be removed when I click it? i try :

On release
this.removeMovieClip() ,

On release
_root.removeMovieClip(this) , but neither work.( I know its not the right syntax).

Remove Me
Please remove my account from this board, i no longer use it!
I don't like to leave accounts wondring around on the net

Thanks in advance... and for any help that i found here!

Ciao!

Remove The Zero (mx)
I have a script that will display the time. However, when it's say...1 pm, it displays 01:00.
Where can I find some info on getting rid of the zero?
Thank you for your time!

Remove Xml
I have a menu that loads a sub-menu into a seperate swf. the sub-menu is coming from an xml file.

the menu sends an id to the sub-menu using local connection which then loads the xml file for selected option. the initial sub-menu loads fine selecting a first option on the menu but that stays there and any consecutive clicks on the menu wont load the appropriate sub menu.

so basically what I want to do is unload the xml submenu when the user clicks an option and load a new submenu. I think!

Remove Name
hi,
can u help me with this.... (Attach file)

i know how can i Add "name"
but i donīt know how can i remove only one "name"

thank you a lot

Remove Swf From Swf
previously i had unloadmovie, but now?
how to remove swf from swf when animation is goind to some frame?
i try:

Code:
var loadit = new Loader();
function remove()
{
removeChild(loadit);
}

addEventListener (Event.ENTER_FRAME, remove);
but this is not good, please help me

Remove Xml
I have a menu that loads a sub-menu into a seperate swf. the sub-menu is coming from an xml file.

the menu sends an id to the sub-menu using local connection which then loads the xml file for selected option. the initial sub-menu loads fine selecting a first option on the menu but that stays there and any consecutive clicks on the menu wont load the appropriate sub menu.

so basically what I want to do is unload the xml submenu when the user clicks an option and load a new submenu. I think!

Please Remove
Fixed





























Edited: 01/26/2007 at 12:05:36 PM by d3creative

Please Remove
I recently created a movie with some TextInput components no problem. I just created a new one and i can't get focus on the TextInput. I saw some other posts about this but no solutions. All help appreciated.

c.





























Edited: 01/26/2007 at 12:04:54 PM by d3creative

REMOVE
REMOVE





























Edited: 05/24/2007 at 09:31:24 AM by flying_scott

Help Me Remove MC
This is probably really simple but I seem to never get the hang of AS :(

I have used "attachMovie" to load a movieclip animation on my webpage.
Now I want that movieclip to remove itself as soon as it reaches its last frame.

I tried using the following actionscript but it doesnt seem to work
removeMovieClip("ball_mc");
Please help me out?





























Edited: 03/21/2007 at 09:19:45 AM by aquastealth

How To Have An MC Remove Itself
Okay, I've done things like this a few times, and yet I've ran around every way that I can see possibly doing this without success:

I load an MC dynamically from the library ("WIN_ABOUT"). The MC has a few buttons (MCs) within it, one of which is intended to delete the entire MC from the stage. Here's a few ways that I tried it:

b_close.onRelease = function () {
removeMovieClip(_root.WIN_ABOUT);
}

or?

b_close.onRelease = function () {
removeMovieClip(this._parent.WIN_ABOUT);
}

or?

b_close.onRelease = function () {
this.removeMovieClip();
}

or?

b_close.onRelease = function () {
this._parent.removeMovieClip(WIN_ABOUT);
}

Nothing seems to work. And I know this is a simple one!

Please Help Me Remove This God **** MC
Can someone please help me remove this duplicated mc.

Really bugging me now...Hope someone can help us out


Shallroc

Remove Xml
I have a menu that loads a sub-menu into a seperate swf. the sub-menu is coming from an xml file.

the menu sends an id to the sub-menu using local connection which then loads the xml file for selected option. the initial sub-menu loads fine selecting a first option on the menu but that stays there and any consecutive clicks on the menu wont load the appropriate sub menu.

so basically what I want to do is unload the xml submenu when the user clicks an option and load a new submenu. I think!

To Remove A Mc
Code attached

Im trying to have a button that would remove the mc that has been inserted from an array.

Please Help Me Remove This God **** MC
Can someone please help me remove this duplicated mc.

Really bugging me now...Hope someone can help us out


Shallroc

Help, Remove
Hi, i was wondering if anyone knew how to remove a movie clip after it is done playing. I know this might sound alittle noobish.

Remove()
is there a remove() method to remove characters from a string in ActionScript?

How Do You Remove This?
Everytime I make a Flash Movie I always have to Click it to activate it. But here: http://www.xploaded.cz/home.html : I noticed that you don't need to click it or press spacebar to activate it, Now how do I do that?

Remove XML?
I've loaded and XML file using

but.onRelease = function() {
xml.load("text.xml")
}

-- is there a way I can remove an xml file or replace it w/ another w/o
adding to the previous xml file???

cheers

Title Bar - Can You Remove It?
Hi - in Flash 4, I am creating a ticker - that's done... Can I set the swf file (or exe file) to show without a title bar? Ie. so it is just the ticker which shows?

Also, is it possible to set the swf/exe to be 'always on top'?

Many thanks for any advice,

Mark

How To Remove Borders
Hi Im not sure how you remove the borders when you publish your site, I was a tutorial somewhere on flash kit but I cant find it, anyone no where it is or can tell me??

Thanks

REMOVE ON CLICK
I have 5 test viz. Test 1, Test 2, Test 3, Test 4, Test 5,
They appear on the first keyframe in the oredr..If the userclicks on Test 1 he is taken to that test and so on..Now at the end of the test(25 questions) there is a button which says main page, which brings him to the 1st keyframe...What I want is that now the link for Test 1 should dissappear since he has already taken it..If he takes Test 4 then at the end of that test the link for that test should disappear..


What is the best way to do this

Thanx

How Do I Remove Text?
I have 3 movieClips on top of each other. I have three buttons controlling these. I want each button to load their corresponding text "on top of everything". I have used _root.MC.blah blah....
This works for me, but I can't get the unwanted text to go away.... What the hell?

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