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








Renaming Imported Jpgs


Hi everyone
I wonder if you can help....

I have a e-commerce interface built in Flash MX and I am loading in 10 pics (jpgs of various product name) into 10 MC's. The trouble is I have loads of products so I need to find some way of importing 10 random named jpgs into 10 separate MCs.
I know you can use loadMovie("filename.jpg");
to load in any jpg ...but how do i separate them into the different MCs??

I would appreciate any help you have to offer.
Thanks
WB




FlashKit > Flash Help > Flash ActionScript
Posted on: 06-09-2003, 06:29 AM


View Complete Forum Thread with Replies

Sponsored Links:

Preloader For Imported JPGs
Hi, I have a photo section in my site where when the viewer clicks, the JPG is loaded onto the main sector. Is there a way to make 1 preloader and apply it to every JPG. Or do I have to turn every JPG into a SWF in order for this to work?

Thanks again

View Replies !    View Related
Imported JPGs - Improve Quality?
Hi.

Please have a look at the following Flash MX movie that I created, and advise me on whether I can improve the quality of the JPGs that are loaded into the movie. There is a lot of pixelation (sp?) in the jpgs.

Canadian Army Flash Movie

Is it just a matter of importing larger files?

BTW, thanks to all who helped me with the preloader.

View Replies !    View Related
Scrolling Issue With Imported JPGs
Hey guys,

Here is my problem I have 2 movies one embedded in the other ... in child MC displays data from a text file (text and pics)

If the list is long I want to scroll though them and stop when it reachs the bottom of the list and stop when its at the top

I've attached the fla, pics, and text file in a zip file ...

can any body please help me ...

thanks

BTW ... I got it so when the user click the up button and the MC is on top it doesn't scroll

View Replies !    View Related
Masking / Resizing Dynamically Imported Jpgs
Hello All,

I am making a photo gallery app that I would like to be able to give to different clients and will be customizable. Right now it is all controlled by a txt file that allows the user to put all images in the same folder and and the text file assigns them their names that will be used in the scripting. I can get the images to load using either loadMovie() or loadMovieNum() , but the problems I have is either setting the xScale & yScale to maintain size consistancy. or masking out parts of the image that are beyond what I want to be the viewable area. I am also having issues in assigning the dynamicly loaded jpgs their _x & _y.

any help would be appreciated

View Replies !    View Related
Flash Crops Bottom And Right Of Imported Jpgs
I have MX Flash. I created a few jpgs in Adobe or Jasc, each image with a one pixel black border, that I imported into my flash library. When I place the images in a layer, I find that the bottom and the right pixel borders are eliminated.

I've tried this a number of times with a number of images - same problem.

Not sure what is going on, any suggestions on how to retain the black border (how to retain the ENTIRE image)?

View Replies !    View Related
Imported Jpgs Loose Color Intensity...
Being new to Flash I have run into a problem. I have really nice photographs in jpg that have great color intensity. When I import them in Flash "Place on Stage" the colors look boring and faded... What is the solution to this basic task?? I have tried importing the photos as jpg, png, psd and they all look horrible comparing to what they look like in Photoshop...

Thanks in advance!

Anna

View Replies !    View Related
Problems With Imported Graphics - Jpgs, Gifs And Pngs
When I import my graphics from photoshop, doesnt matter which type of file it is, they will "jump" or stretch when used in a symbol. The graphic will look fine in flash, but when i test or export, it becomes distorted. How can I fix this?? It looks very bad and I have no idea how to fix these graphic problems. I'm currently using Flash MX if that helps.

View Replies !    View Related
Renaming Mcs On The Fly
In my flash movie I have a control mc which works on an mc on the main stage, called 'part'.

I want to be able to have different mcs on the stage which can be renamed 'part' when I click on them, so that once renamed, the control mc will work on that mc.

I know if I do this I have to rename the mc I've clicked on to 'part' and then rename any mcs around called 'part' to something else - say just blank.

Well, I've got this action on a button in the mc:

on (release) {
setProperty ("/part", _name, "");
setProperty ("", _name, "part");
}

Which I thought would work, but it doesn't, it just ends up with the control mc being targetted, even though that is named 'control'.

I've uploaded the fla in case anyone fancies a better look! It's here

Many thanks

Jim

View Replies !    View Related
Renaming MCs
Hey All,

Does anybody know if it's possible to rename an MC on the fly?

For Example

I have a movie clip with an instance name of mc1.

Is there a way to rename that by actionscript to mc2?

Is this even doable? Code available for this?

Thanks

View Replies !    View Related
Renaming
When you go to the right side where you can insert all kinds of things such as radio buttons, text fields, etc. and you hit a radio button or just a button to insert it, the default name of that object is "radio button" or just "button." How do you change the name of those? Are they automatically buttons, or do you have to convert them to buttons?

View Replies !    View Related
Renaming?
How do i can change a variable?

I mean i made a Box anda button. The Name/or var for the box is Box... I want to make it so that when i press the button the name/var of the box changes to something other... like Box2 or so...

i tryed
on(release) {
box=Box2;
}
but it did not work...

View Replies !    View Related
Renaming MC's Dynamicaly. Best Way?
Hi,

I have the following code to dynamicaly rename MC's:

old_name = "_level0.butt_"+(c-1);
new_name = "butt_"+c;
setProperty(old_name,_name,new_name);

Now, "old_name" should be turned into(/evaluaded as) an expression, shouldn't it?

What's the way to do this? Is there a better way to rename MC's?

ThanX

cYa

Ivo

View Replies !    View Related
Renaming Projector .EXE
Hi,

Does anybody know how to rename the Flash projector .EXE so that it doesn't just say "Macromedia Flash Player 6" in the title bar? I have done a search on the subject and haven't found any answers. Any Ideas?

View Replies !    View Related
Dynamically Renaming MC´s
If I have an mc instance on my scene, and I want to dynamically rename it, (depending on where it appears on a grid/array after it has moved position) what is the easiest/best way of doing this?
Thanks

View Replies !    View Related
JavaScript Pop-up Renaming
Hi guys and gals.

Does anyone know please, how to rename a javascript pop-up window?

My online pop-ups have the full URL in the bar. I want to put a window name of my choice. Is there a way of doing this?

I've tried to change the html <HEAD> using wordpad, but it doesn't do the trick????

Thanks.. ROB

View Replies !    View Related
Renaming Scenes
hi i'm using flash mx pro 04, how do i re-name scenes??

tks,
kira

View Replies !    View Related
Folder Renaming
Hey, I was wondering what happens if I change the name/destination of my folder where all my library items and Flash projects are kept. Would I have to import everything to my .fla again? Are maybe it won't take any effect at all?

View Replies !    View Related
Renaming An Object
Does anyone know how to rename an existing object?

Thanks,
Kris

View Replies !    View Related
Renaming Dynamic Mcs
Hello and Happy New Year!!!

I have been trying to rename dynamic movieclips on the stage and place them into new levels without re-attaching.
I have used eval, _name and .name, but to no avail.

I would appreciate your prompt assistance,
Emma=)








Attach Code

_root["thumbNail"+a].name=eval("thumbNail"+p);

View Replies !    View Related
Renaming A Movieclip
How would one go about renaming a movieclip? ie: I have a movieclip named enemy1 and want to give it a new name of enemy11 when something happens. What code could I use?
Thank you for your help

View Replies !    View Related
Batch URL Renaming In A Swf
I'm looking for a program much like URL Action Editor but this program must do large scale batch renaming. I have about 1000 swf are sitting on one server and now need to be sent over to another server and the URLs will be incorrect. the UAE is exactly what i'm after, but wondering if there is a tool that does a batch rename. Anyone know of a solution?

View Replies !    View Related
Renaming Movieclips Using AS2.0
Hi all. Is there a way to rename a movieclip once it's been duplicated onto the stage?

I'm basically duplicating an MC onto the stage, moving it using the tween class, and then I want another one to appear and be tweened.

I'm only testing the possibilites at the moment but hope to be able to get hundreds of them appearing one after another so I've got them going in a function controlled by setInterval, but once it's duplicated, the last one disappears. Please help!

Here's the code:

function boxAnim():Void {
duplicateMovieClip("boxMC", "mc_Box", this.getNextHighestDepth);
new mx.transitions.Tween(mc_Box, "_x", easeType, startPosX, endPosX[i], speed);
new mx.transitions.Tween(mc_Box, "_y", easeType, startPosY, endPosY[i], speed);
i++;
if (i == 4) {
clearInterval(nInterval);
}
}
var nInterval:Number = setInterval(boxAnim, 1000);

View Replies !    View Related
Dynamicly Renaming Variables
I have a bunch of buttons loaded. I want to input names from a text file into a dynamic textbox inside of a dynamicly loaded mc. So far i have all my variables named in my text file, but i need flash to rename them automaticly.
heres what i basicly want to do
heres what i have now:
_root.menu1.type = text1
_root.menu2.type = text2
_Root.menu3.type = text3
etc....
text1,2,3 are varibles loaded from my text file. I have code to duplicate the menu name. type is the variable i want put the text2,2,3 into with every new loaded mc.

for (i = 0; i <=numMenus; i++) {
set ("_root.menu"+i+".type",);
}
i tried using same code for menu1,2,3 but it doesnt seem to work. I need some help. Any Ideas?

View Replies !    View Related
CD Burning And File Renaming
Ok here'tis

Flash movie to be viewed in a browser. Movie created on a cd but must also work on a mac. Burnt on a cd, but when viewed on a mac it renames all the files and all the links are lost..

Any ideas

Flag

View Replies !    View Related
Renaming Browser Window
AAARGH!!! I have a popup window which is currently showing a URL in the blue top bar of the window (where this window says "flash kit community forums") I want to change this window name to something else and im sure its really easy but i cant for the love of god figure out how. Javascript command? Html tag? HEELLLPPPPP!!!!!

View Replies !    View Related
After Renaming Duplicate Symbols?
More symbol weirdness. I want to swap a symbol with a similar-looking one, so I duplicated the symbol and edited the second one(after renaming it, of course). But after dragging the copy onto the stage, it reverts to the original!

Moreover, I tried this: dragging the original onto the stage, and then the copy. Both symbols appear correctly... but then I delete the original, and the copy instantaneously becomes the original! E.G., if I have a square symbol, and a circle symbol made from that both on the stage, the circle becomes the square when I remove the square.

What gives?

View Replies !    View Related
Renaming Class-instances
Is it possible to rename a class-instance (of a dynamic class) that has already been created with a specific name?

For instance:

// Step 1) Create and name class-instance
var myClassInstance_1:myClass = new myClass();

// Step 2) Change name of myClassInstance_1
?????

View Replies !    View Related
Creating And Renaming Scenes? HELP
I have a flash project with 5 scenes named Scene 1 - Scene 5. I also have a working menu which links to all my scenes. What I want to do is create a preloader and create a scene called "preload" and place this preload scene physically before Scene 1. I know this can be done but I can't seem to get it done. When I select a button and say goto scene I've tried to rename the scene here but it doesn't take it. I'm using Flash MX. Thanks for your help!!!

View Replies !    View Related
I Dont Want To Keep Renaming My Ants
hi can someone please help

ive got a game, your a tank and you have to blow up ants, ive got the ant movieClip but i need mutiple instances of the same movieClip to be destroyed seperatly but for the hit test to require only one instance name.

easyer way to understand it:

when you hit an alien in space invaders only one alian blows up, yet there all differnt instances of the same movieClip and run from one bit of code i need the same thing for my ants.

o and the ants ave to be within a movie clip called "bad" to make them scroll correctly

if youve got any ideas or need any infomation email me please
jeb.50g@gmail.com
ill attach the flash file to this message

View Replies !    View Related
Always Renaming Symbol Names ?
It can't be. Every time we use an imported fla or swf and try to add it to our current movie, the Flash ask us if we want to replace existing names ( since they are the same ) - and we, of course, do not. Is there a way of adding the resources but without having to rename the symbols ( 20, 40, 100+ or more... ) ?

Regards,

Adamastor

View Replies !    View Related
Renaming Instance Names
Hello. I have a chat room. And one of the problems that I have with it is that I have a var set up for a picture to apear everytime the person chooses an avatar. but I have different avatars with different instance names. I need it so that when the person clicks on that avatar it changes the instance name from "avatar[1]" to "chosenavatar". Please help.

View Replies !    View Related
#Batch Renaming Images
I am doing a photo album, and i want to be able to upload images within a given folder, however i would like to rename them all to image1, image2... etc.

Is there a way of batch renaming in flash?

View Replies !    View Related
Renaming Symbols In Flash
hi,

i have this problem of trying to rename many symbols and have to do it one by one (adding a common name like "1" or "2" to rename the symbols)

is there a way to rename the symbols all at once?

i very much in need of this help, will appreciate very much for any help rendered.

thanks.

View Replies !    View Related
Renaming Movieclip With Variable
I have a bunch of movieclips named "mc_Img_0", "mc_Img_1", etc. What I cant figure out is how to target a certain movieclip using a variable within a function. Here's an example:

for (i=0; i<5; i++) {
var renamedBtn:MovieClip = this["btn_Img_"+i];
renamedBtn.onRelease = function() {
mc_Whatever.gotoAndStop(3);
};

Unfortunately, I'm not using a for loop. I'm guessing it would look something like this:

function changeThis(randomNumber:Number) {
var renamedBtn:MovieClip = this("btn_Img_"+randomNumber);
renamedBtn.onRelease = function() {
this.gotoAndPlay(3);
};

But of course it doesnt work. Any help is appreciated.

View Replies !    View Related
Dinamically Renaming A Mc Instance
hi all,

how can i change dinamically the instance name of a dinamically created mc? is it possible?

for example:
i've a temp movieClip
and after it is created i want to change its instance name.

the goal is to create several mc's from a list of xml data... they'll be posicioned in the stage by the coordinates recived from that xml file.

and before create the next mc of the list.. i want to validate with a (hitTestObject()) if the last mc created... overlaps any one of the others previously created.

for example if all the movie clips previously created have the same instance name, as 'fix'.. and my new one as 'tempMc'.. a can make the test at once like this:

if (tempMc.hitTestObject(fix))

if it's true... i generate an alert message... if it's false.. a change the instance name 'tempMc' to 'fix' too... and start creating another mc from the xml list.

to much confusion??

i hope that any one can help me with this..

thaks

View Replies !    View Related
Dinamically Renaming A Mc Instance
hi all,

how can i change dinamically the instance name of a dinamically created mc? is it possible?

for example:
i've a temp movieClip
and after it is created i want to change its instance name.

the goal is to create several mc's from a list of xml data... they'll be posicioned in the stage by the coordinates recived from that xml file.

and before create the next mc of the list.. i want to validate with a (hitTestObject()) if the last mc created... overlaps any one of the others previously created.

for example if all the movie clips previously created have the same instance name, as 'fix'.. and my new one as 'tempMc'.. a can make the test at once like this:

if (tempMc.hitTestObject(fix))

if it's true... i generate an alert message... if it's false.. a change the instance name 'tempMc' to 'fix' too... and start creating another mc from the xml list.

to much confusion??

i hope that any one can help me with this..

thaks

View Replies !    View Related
[CS3] Renaming Uploaded Files
This is the situation: I am trying to build an uploader that will take data collected earlier in the form before the upload occurs and then rename the uploaded file with it. I've gotten the upload itself to work, but thus far I have no luck getting any sort of renaming to work, not even by PHP. I tried Loadvars to transfer the variables over and rename it during upload, yet it says "NO" and rejects the post variables when the upload occurs. I even tried loading the variables into an external file and transfering them back to the uploader via cookie, all at the same time. Again it says "NO!", and the file is uploaded as __"filename".jpg. This is my code thus far:


Code:
stop();
////// Other Variables ///////////
/* XML Variable Transfer */
var xml:XML = new XML();

xml.ignoreWhite = true;
xml.onLoad = function(s:Boolean):Void {
var usercode:String = this.childNodes[0].childNodes[0].attributes.logged;
if (s) {
userlist.text = usercode;
}
};
xml.load("/system/flash/xmltest.php");

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

import flash.net.FileReference;

var allTypes:Array = new Array();

var imageTypes:Object = new Object();
imageTypes.description = "Images (*.jpg, *.jpeg, *.gif, *.png)";
imageTypes.extension = "*.jpg; *.jpeg; *.gif; *.png";

allTypes.push(imageTypes);

var listener:Object = new Object();
_global.filename = file.name;

listener.onSelect = function(file:FileReference):Void {
log.text = "File selected for upload";
filename_txt.text = file.name;
size.text = file.size;
type.text = file.type;
name.text = file.name;
filetype.text = usercode + "_" + cardnameinput + "_" + file.name;
};

listener.onCancel = function(file:FileReference):Void {
log.text = "File upload/download cancelled by user";
};

listener.onOpen = function(file:FileReference):Void {
log.text = "onOpen: "+file.name;
};

listener.onProgress = function(file:FileReference, bytesLoaded:Number, bytesTotal:Number):Void {
progress.mode = "manual";
progress.setProgress(bytesLoaded,bytesTotal);
log.text = "bytesLoaded: "+bytesLoaded+" bytesTotal: "+bytesTotal;
};

listener.onComplete = function(file:FileReference):Void {
progress._visible = false;
log.text = "File is uploaded";
};

listener.onHTTPError = function(file:FileReference, httpError:Number):Void {
log.text = "HTTP Error :"+httpError;
// Write code here to do corrective actions
};


listener.onIOError = function(file:FileReference):Void {
log.text = "An IO Error occured";
};

listener.onSecurityError = function(file:FileReference, errorString:String):Void {
log.text="SecurityError: "+file.name+" ErrorString: "+errorString, "Error";
};

var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);

browse.onRelease = function() {
upload.enabled = true;
fileRef.browse([{description:"Image files", extension:"*.jpg;*.gif;*.png", macType:"JPEG;jp2_;GIFF"}]);
};

upload.onRelease = function() {
this.enabled = false;
/*** Change the URL here to point to the location where your upload.php resides **/
var sendUserName:LoadVars = new LoadVars();
sendUserName.uname = usercode;
sendUserName.cardID = cardnameinput;
sendUserName.send("postvars.php","_self","POST");
fileRef.upload('upload.php');
};
accept.onRelease = function() {
gotoAndStop(8);
PHP:


PHP Code:



<?PHP
$username = $_COOKIE["extrauser"];
$cardname = $_COOKIE["cardlist"];
$target_path = "";
$target_path = $target_path . "_" . $username . "_" . $cardname . "_" . basename( $_FILES['Filedata']['name']);


if(rename($_FILES['Filedata']['tmp_name'], $target_path))
{
echo "The file ". basename( $_FILES['Filedata']['name']). " has been uploaded";
}
?>




Is the goal of renaming the files during upload even possible?

View Replies !    View Related
Dynamically Renaming Movieclips
Help needed!

Is it possible to dynamically rename movieclips in Flash? I have been attempting to rename mc's using movieclip._name on a clipEvent, however Flash keeps returning 'undefined'.

I have read elsewhere that it is possible to do this although all my attempts have failed. Is it possible to change a name during runtime, and is ._name a writeable property?

Any help would be much appreciated! thanks!

View Replies !    View Related
Moving And Renaming Objects
Hey all,

Here is my situation, and I'd appreciate any suggestions: I have a movie clip that contains an unspecified number of other movie clips. Let's say theyr are at 0x0 0,40 0,80. And I've given them names of it1, it2, it3.

Now, I can remove these objects by clicking a button. So, what I need to do is move the ones under the object that's been removed up, and also to rename the remaining objects. For example:

Let's say I remove it2. I have it1 and it3 left. I need it3 to go up to 0,40 and be renamed it2. I use eval() to access these movie clips, as their names are based on another variable which contains the number. How can I do this? Obviously, moving them is fairly simple, just adjust the _y. But how can I rename them?

View Replies !    View Related
Renaming Files On Upload
I wish to automatically rename files as I upload them, and I am at a loss to understand how I might achieve this. Here is the code I am using (it allows for multiple file selection):


ActionScript Code:
var fileRefList:FileReferenceList = new FileReferenceList();
fileRefList.addEventListener(Event.SELECT, selectHandler);
fileRefList.browse();

function selectHandler(event:Event):void
{
    var request:URLRequest = new URLRequest("http://www.[yourdomain].com/upload/");
    var file:FileReference;
    var files:FileReferenceList = FileReferenceList(event.target);
    var selectedFileArray:Array = files.fileList;
    for (var i:uint = 0; i < selectedFileArray.length; i++)
    {
        file = FileReference(selectedFileArray[i]);
        file.addEventListener(Event.COMPLETE, completeHandler);
        try
        {
            file.upload(request);
        }
        catch (error:Error)
        {
            trace("Unable to upload files.");
        }
    }
}
function completeHandler(event:Event):void
{
    trace("uploaded");
}

I wish to rename the files uploaded as "img_1.jpg...img_n.jpg" where n is the number of files uploaded.

Any ideas?

View Replies !    View Related
Always Renaming Symbol Names ?
It can't be. Every time we use an imported fla or swf and try to add it to our current movie, the Flash ask us if we want to replace existing names ( since they are the same ) - and we, of course, do not. Is there a way of adding the resources but without having to rename the symbols ( 20, 40, 100+ or more... ) ?

Regards,

Kepler

View Replies !    View Related
Renaming Index Page
I've changed the title of the page to a different name, but when I publish it, it remains index.html (index.swf). How can I change the http page to display the title?

View Replies !    View Related
Renaming Class-instances
Is it possible to rename a class-instance that has already been created with a specific name?

For instance:

// Step 1) Create and name class-instance
var myClassInstance_1:myClass= new myClass();

// Step 2) Change name of myClassInstance_1
?????

View Replies !    View Related
Renaming Files Through Flash
Hello everyone,

I'm trying to make an actionscript automator to batch rename swf files. does anyone know a tutorial that talks about referencing files and specifically the files name?

thanks

View Replies !    View Related
Renaming Class-instances
Is it possible to rename a class-instance that has already been created with a specific name?

For instance:

// Step 1) Create and name class-instance
var myClassInstance_1:myClass= new myClass();

// Step 2) Change name of myClassInstance_1
?????

View Replies !    View Related
Renaming A Existing Symbols
Can anyone tell me how to go about renaming a existing symbols that we created?

View Replies !    View Related
Batching And Renaming Movies Automatically
This may be impossible but....
Here is the deal.....
I have a site that I need to post hundreds of sound files (similar to this site) in a default player that I made. The problem is that I have to import each sound file into my movie and export the movie under the name of the original sound file in order for our database to find it. Is there any way to batch this process? Someone please help I am spend all of my time on converting files. Thanks.

JeepMan

View Replies !    View Related
Duplicating And Renaming Move Clips
I am developing a game but I have to come to a standstill at one point...


The problem is that I have a duplicated movie clip which is duplicated many times. When one of thes movie clips collides with another I want it to trigger something but seeing it's one clip it is testing to see if it's overlapping a clip of it's own name therefore it's overlapping itself, how do i solve this problem...????

View Replies !    View Related
Dynamically Renaming Movie Clips
does anyone know how to dynamically rename a movie clip and dynamically assign a new level? I am creating new movies on the stage via action script and need to rename them on the click of a button? Is this so easy i'm going to kick myself? or is it just not possible?

cheers

craig

View Replies !    View Related
[CS3] FileReference Download Renaming File
Is there a way to restore the extension of a file if a user renames it when downloading it? Or at least, is there a way not to allow users to rename files?

For what i´ve seen, if I set up my windows to hide extensions, and when I download a file I rename it, it will lose the extension even if it is not showing.


thanks!

View Replies !    View Related
Renaming Flash Folders And Publishing
I am going to have to move Flash folders at work and maybe even rename them. The people I work with are not going to understand that they have to reset the publishing command to make sure Flash publishes to the correct folder and name since it's been changed. It's been my experience that it will look for the older folder name. Is there a way I can avoid this hassle? I don't believe there is, but I might as well try and ask.
Thanks

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved