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
ActionScript.org Forums > Extensions and Plugins > JSFL - Extending Flash
Posted on: 06-02-2005, 10:39 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
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
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.
Symbol Names As Variables?
I have an fla already made with many different buttons, each of which has it's own unique name. I want to send the name of these buttons as a variable to a php file.
My problem is that I have no idea how to (if it's even possible) to pull the name of a symbol and use it as a variable.
Anyone have any ideas?
Symbol Instance Names
(please tell me if any of this is incorrect)
In AS3,
I can create a new MC by
var myVar:MovieClip = new MovieClip();
I can add an instance of that MC to the main stage by
addChild(myVar);
How do I give that movie clip an instance name using only AS3?
Thanks,
Wayne
Edited: 10/17/2007 at 09:54:42 AM by SpectacularStuff
Partial Match In Symbol Names
I am working on the interactive US map, and what I need done is to be able to disable / enable all 50 buttons with one push of a button.
The button names are like the following: btnOR (for Oregon), btnMO (for Missouri), etc. Is there a way to create a function that would enable or disable all 50 buttons, using a partial match mechanism? That is, if a symbol's (a button's) name starts with "btn", then disable/enable it.
Thank you for your help!
[Flash8]help Using Symbol And Instance Names
I'm building a platforming game using AS2. I just got collision detection working between my character and multiple instances of an object. the different collisions (top, left, right, and bottom of platform blocks) are determined by a single symbol with 4 instances named for the different sides. this is good if i only want to have one block. is there a way to reference the symbol name in the actionscript or to have multliple instances of the same name to actually work?
Create Marquee Names In Flash But Edit Names In Text File HELP
Hi all im trying something new with a website. I have looked around and havent been able to find a file or help sections on this. Maybe someone can help me on this...
The marquee is going to scroll left to right and repeat over and over. This is going to be in flash. What i need is the names that are going to be in the marquee needs to be in a text file so they can easily be edited by anyone that doesnt have flash knowlege.
Can this be done?
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
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
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?
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...
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
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?
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
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
Renaming Scenes
hi i'm using flash mx pro 04, how do i re-name scenes??
tks,
kira
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?
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);
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
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?
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);
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?
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
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
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!!!!!
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?
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
?????
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!!!
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
#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?
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.
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.
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
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
[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?
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!
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?
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?
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?
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
?????
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
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
?????
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
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...????
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
[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!
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
|