Using Jsfl To Create Instance Name Same As Button Or Mc Name
I have the following code (below), which when I select all the buttons or movie clips I want to rename, and run the jsfl file, it dutifully puts instance names for all of them according to the naming convention MyButton01, MyButton02...
for(i in fl.getDocumentDOM().selection){ fl.getDocumentDOM().selection[i].name = "mybutton"+i; }
That's fantastic, but how do I get it to make the instance name exactly the same as the button name?
For instance, if the button name is "SomeSound" - how do I get the jsfl file to add the instance name SomeSound to that button?
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 07-19-2006, 06:47 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Button To Create An Instance?
I'm extremely new to flash.
i want to be able to click a button and make another instance of say a circle on the stage, how would i do this? so they stack next to each other as well?
JSFL Problem:how To Open A Swf File In WindowSWF With JSFL Commands?
i am working on a JSFL extension. please download the attachment and place it in the config->WindowSWF folder ,open flash,choose window-> external panel ->JSFLShower to display the effect. it will display all
the Commands and custom panels.
but i don't konw how to open these SWF file in WindowSWF so that it will
appear in a panel .now i can do is use FileSystem.executeDocument to open
the SWF directly. i have searched the methods in JSAPI Docs and some unDos methods,
but ...no answer yet...
[JSFL] Export Movieclip For AS And Not In First Frame + JSFL Reference
great JSFL reference
http://dynamicflash.com/jsfl/
I've used it yesterday to set Export for AS and not Export in first frame for some using item.name, but exaple is for all movieclip in library
it's fairly simple to code in JSFL when you have good reference like this
code is
Code:
var libItems = fl.getDocumentDOM().library.items;
fl.outputPanel.clear();
for (i = 0; i < libItems.length; i++){
var item = libItems[i];
if(item.itemType == "movie clip"){
fl.trace(item.name+" will be export to 1st Frame. " + item.itemType);
item.linkageExportForAS = true;
item.linkageIdentifier = item.name;
item.linkageExportInFirstFrame = false;
}
}
if you have problem how you can use this I can post few sentences
JSFL In AS2.0 - AddNewText Inside Button
Hi,
I have a button in a library:
fl.getDocumentDOM().library.addNewItem("button", "Buttons/btn");
var closeBtn = fl.getDocumentDOM().library.findItemIndex("Buttons/btn");
var closeBtn_timeline = fl.getDocumentDOM().library.items[closeBtn].timeline;
closeBtn_timeline.addNewLayer("btn text","normal",false);
closeBtn_timeline.currentLayer = 0;
closeBtn_timeline.insertBlankKeyframe(3);
closeBtn_timeline.currentLayer = 1;
for (var i=1; i<4; i++){
closeBtn_timeline.insertBlankKeyframe(i);
}
and would like to addNewText in the second layer in first frame. I know how to add text on the main timeline, but was struggling to add it inside button.
Any ideas?
How To Get Button's Instance Name On Stage? OR Can A Button Ahve 2 Instance Names?
i have a button the the stage, with an instance name of: "butt1"
the button itself lives inside a movieclip, where it is called thisButton
when flash runs and I click the button I want to output the button's instance name on the stage (i.e. butt1) but i'm only getting the button's instance name in it's own movie
this._name gives me = thisButton
is the name i want stored in a separate property?
edit: sorry - i realise that the problem is that the button code is inside the mc itself, where the button's name is thisButton
Still Can't Create An Instance ...
I have a movieClip called mcSmoke, which I want to create an instance of at runtime.
Its linkage looks like this:
Quote:
Class: MinSmoke
Base class: flash.display.MovieClip
[v] Export for ActionScript
[ ] Export for runtime sharing
[v] Export in first frame
I tried the following code, but it didn't create an instance nor any error message:
Code:
var myObject:MinSmoke = new MinSmoke ();
addChild(myObject);
Since it didn't create any error message, I guess it isn't "technically wrong", and it just does something other than what I want it to do ...
The movie clip is also supposed to delete itself at its last frame:
Code:
this.parent.removeChild(this);
this=null;
However, it doesn't like this=null, since it "cannot assign to a non-reference value".
So, how do I create and remove a movie clip?
Regards,
bigGiant
Create ONE Instance At A Time?
Hey yall,
I can't post code with this because there IS no code to post. Nothing i've tried works. What I want to do is use an event listener to listen for MOUSE_OVER, and when the mouse is over the specified movie clip (let's call it "about"), I want it to create ONE and ONLY one instance of a puff of smoke behind the about movie clip that the mouse is currently over. The problem is, since the mouse is sitting over the about movie clip for more than one frame at once, it creates 1 instance of the smoke puff per frame (at least, that's what appears to be happening). This doesn't work for obvious reasons-- it creates 30 movie clips all moving and changing alpha values within 2 seconds. LAGGGG!!
I've tried using variables to indicate whether or not there is a smokepuff already there... but that doesnt work. Is there a "test for instance" command or something? Like, test to see if there's already an instance of the smokepuff at the specified X location, and if so, don't create a new one? And if not, create one! This HAS to be an easy fix.
Thanks for whatever you have for me.
--L
(HOW) Create Dynamic Mc Instance Name?
I want to attach a behavior to a button which attaches new mc instance on release. Currently the code looks like this:
ActionScript Code:
on (release)
{
attachMovie ("bar","newbar",1);
newbar._x = _root._xmouse;
newbar._y = _root._ymouse;
}
Obviously this create a SINGLE movie clip instance everytime because I always use the same instance name for it (newbar). How can I make the code generate unique instances.
I thought about anything like the following but it does not work.
ActionScript Code:
on (release)
{
attachMovie ("bar","newbar"+i,1);
["newbar"+i]._x = _root._xmouse;
["newbar"+i]._y = _root._ymouse;
i++;
}
Any hint?
Create Instance At Mouse Pos. Every ½ Sec.
Hello,
I need to create a movie with a bit of scripting. I am new to ActionScript, so it would be great if someone could give me some pointers. I really need some help getting into this language.
What i want to do is this:
Every ½ second, IF the mouse is over a certain button, there should be created a movie clip at the mouse position.
I guess I also need some "delete myself" code at the last frame in the movie clip.
By the way, the movie clip is a smoke animation I have created. It is located here, feel free to use it:
http://www.kasperhviid.dk/stuff/smoke.zip
Regards,
Kasper
Easy Way To Create 100 Instance Of Same MC ?
I know for sure this is a stupid question, but I've never come across this before, so please forgive me for asking
What's the best method to put 100 (or 25 or any large number) of movieclip instance on stage & give them all the exact same onRollOver event/function ? Ofcourse with the fewest possible lines of code.
Any kind of hints/advice very much appreciated.
Whats The Code To Create An Instance?
I need the code to create an instance of an object, I already have the movie clip and everything set I just dont have the code so when the left mouse button is clicked it will create an instance at the possition the mouse was = can someone help me with this soon please!
Thanks in advance
[AS2] Create Instance Of Class From String
I can't figure this out. I want to create a class instance based on the string variable passed to it:
Code:
var className = "someClass";
var sc = new className(); // fail
var sc = new _root.className(); // Throws no errors, but doesn't create a class instance
I searched the forums but the only true solution was as3, and this is as2. Any ideas?
Create And Name Class Instance Dynamicly
Hi,
I've got a couple of movieclips stored as classes in the library. The class names are stored in an array:
var ground_elem_array:Array = ["", "oak", "willow", "cypress", "boabab", "cactus", "pole"];
I want to create and name a variable amount of instances from these classes and I'm using this while loop:
PHP Code:
while (counter < amount){
var this[ground_elem_array[emo_i_array[i]]+counter]:this[ground_elem_array[emo_i_array[i]]] = new this[ground_elem_array[emo_i_array[i]]]();
counter++;
}
The variable i is set in another loop that is around this one.
The dynamic code should read for example: var willow0:willow = new willow();
After the class instances are created and named I want to reposition and at a later stage remove them.
I get stuck with the naming. I get this error: 1084: Syntax error: expecting identifier before this. I don't know what this means...
Hope someone can clarify or help me with the proper syntax.
Thanks a lot in advance.
Calling An Instance Name To Create A Variable.
I'm working on a project that basically has multiple buttons on the stage that when clicked are to be sent out as an answer to a question to be checked if they are correct or incorrect.
I was planning on assigning the instance name for each button what would be a possible answer for the question. I was curious if there was a simple way to call the instance name of the button via ActionScript in order to create a variable that would be submitted as a possible answer to the question.
Thanks!
How Do I Create A Instance Of Loader Component
I was wondering using ActionScript how do i create a instance of Loader. NOt the progress bar but the loader object would it be something like this below.
Code:
var ldr = createLoader("country", 10);
Thanks...
Create Instance Of Random Class
hey all
in as 2 you could set up a bunch of movies with linkage ids of id1,id2, id3 etc and then get a random number and use that in the attachmovie line
eg
_root.attachMovie('id'+randomNum,'mc',1);
How do you do this in AS3?
Thanks in advance
(AS2, OOP) Create An Instance Of A Class, By Name (String)?
In as simple an example as I can think of, I have two classes: Dog and Cat. Both are subclasses of Animal, in this stupid example...
I know how to create instances of both, however I don't know how to dynamically create them by name from a string.
It would be something like...
function addAnimal( type:String ):Animal {
return new [type]();
}
Thanks in advance.
How To Create An Instance Of Class Extending MovieClip In AS2.0?
In Action Script 2.0, how do you create an instance of a class that extends the MovieClip class and put it on the screen?
So I have a class below that extends MovieClip that simply draws a triangle. How do programmatically create an instance and put it on screen? I tried createClassObject() but that didn't work.
class MyMovieClipClass extends MovieClip
{
// Constructor
function MyMovieClipClass()
{
this.drawMe();
}
// Draw a simple triangle for the heck of it.
private function drawMe():Void
{
this.clear();
this.lineStyle(10, 0xCCCCCC);
this.lineTo(300,0);
this.lineTo(300,200);
this.lineTo(0,0);
}
}
'new' Keyword To Dynamically Create An Object Instance
Hi,
I was just wondering if the following is possible. Can I dynamically create new instances by passing in the type of object I want to create:
Consider the following pseudocode:
Code:
var typeOfThing:String = figureOutWhatToCreate();
// 'newThing' is the superclass of the typeOfThing I am trying to instantiate.
var newThing:[superclass] = new [typeOfThing] (param1, param2...);
Or, does the parameter after new need to be a class object ? I know that the above code doesn't work because I've tried it, but I guess I'm asking of it is possible through other means.
I just have a huge switch statement that I am trying to do away with. If this is a totally stupid question, just tell me to forget it altogether and keep the switch.
Thanks in advance,
Function - Create An Instance At The Hisghest Depth
Hi, I'm trying to do a function that creates an instance of a movieclip, inside a movieclip, at the next highest depth. So far this is what I have:
To declare the function:
Code:
function openClip(linkageID, instanceName) {
clipHolder.attachMovie(linkageID, instanceName, this.getNextHighestDepth());
}
To call the function:
Code:
_root.openClip("aboutClip", "clipAbout");
It does render the movieclip but when I load another one it is replaced by the one before, because it appeared at the same depth. Can anyone help me?
Thanks
Actionscript To Create A New Instance Of A Movie Clip
right now i am using this code to create a list of thumbnails from an xml file. (the function is called once for each thumbnail. ) now i want to make them into buttons so when i click on them they create a new instance of a movieclip from the library. (once i figgure this out, my next step will be to pass a file name to the clip and display the full image from the thumbnail.)
what is a good way to do this?
Code:
function addthumb( image, itterator ) {
var newclip:MovieClip = this.createEmptyMovieClip( "clip"+itterator, this.getNextHighestDepth());
newclip._y = 0
newclip._x = itterator * spacePerThumb;
newclip.loadMovie(image);
}
thanks for any help.
Looping Thru Array To Create Instance Of A Class
Hello - I am new to as 3 - I have been combing forums for an answer ... to no avail. Here is the deal: I am creating a site for a medical center in France. I want the list of treatments to appear 1 by 1 with a nice animation. The list of treatments is changing fairly often so I am using an array to create instances of a Symbol ( called CONTENEUR_TRI_TEXTE ) that has been exported as a class ( called CONTENEUR_TRI_TEXTE) using the Linkages options in the library.
This symbol contains 3 dynamic text fields (TITRE_txt, DESC_txt and PRIX_txt ) respectively the name, description and price of the surgery.
I have obviously used simplified versions of the descriptions and prices here, for the sake of clarity - so, don't be mistaken: one can't get Heart surgery for 100€ in France!
Since I am a newbie, I tried a hard-coded version of the code on 1 instance of the class, to check that everything was in place - and it works.
HERE IS THE HARD CODED VERSION
ActionScript Code:
//Declare variables for text content
var TITRE1:String = "Heart Surgery";
var DESC1:String = "Surgery on your heart";
var PRIX1:String = "100€";
//Add child CONTENEUR to stage
var SV_HEART:CONTENEUR_TRI_TEXTE=new CONTENEUR_TRI_TEXTE();
stage.addChild(SV_HEART);
SV_HEART.x = 200;
SV_HEART.y = 200;
//Assign variables to each text box + embd fonts
SV_HEART.TITRE_txt.text=TITRE1; SV_HEART.TITRE_txt.embedFonts=true;
SV_HEART.DESC_txt.text=DESC1; SV_HEART.DESC_txt.embedFonts=true;
SV_HEART.PRIX_txt.text=PRIX1; SV_HEART.PRIX_txt.embedFonts=true;
Problem is when I use 2 dimensional arrays to create these instances, I get compile error:
Line 21: var SURGERIES[i]:CONTENEUR_TRI_TEXTE=new CONTENEUR_TRI_TEXTE();
1086: Syntax error: expecting semicolon before leftbracket.
HERE IS THE CODE USING ARRAYS:
ActionScript Code:
//Declare arrays details
var SV_HEART:Array = new Array();
SV_HEART[0] = "Heart Surgery";
SV_HEART[1] = "Surgery on your heart";
SV_HEART[2] = "100€";
var SV_BRAIN:Array = new Array();
SV_BRAIN[0] = "Brain Surgery";
SV_BRAIN[1] = "Suregry on your brain";
SV_BRAIN[2] = "200€";
//Declare OVERALL SURGERIES array
var SURGERIES:Array = new Array();
SURGERIES[0] = SV_HEART;
SURGERIES[1] = SV_BRAIN;
//START LOOP THRU SURGERIES ARRAY
for(var i:int=0; i<SURGERIES.length; i++ )
{
//Add child CONTENEUR to stage
var SURGERIES[i]:CONTENEUR_TRI_TEXTE=new CONTENEUR_TRI_TEXTE();
stage.addChild(SURGERIES[i]);
SURGERIES[i].x = 200;
SURGERIES[i].y = 200;
//Assign variables to each text box + embd fonts
SURGERIES[i].TITRE_txt.text=SURGERIES[i][0]; SURGERIES[i].TITRE_txt.embedFonts=true;
SURGERIES[i].DESC_txt.text=SURGERIES[i][1]; SURGERIES[i].DESC_txt.embedFonts=true;
SURGERIES[i].PRIX_txt.text=SURGERIES[i][2]; SURGERIES[i].PRIX_txt.embedFonts=true;
}
I suspect this is not actually a simple syntax error - Any suggestions as to where the solution might be would be extremely appreciated
Thanks
How Do I Dynamically Create An Instance Of Class Which Extends MovieClass
I have a class which extends the MovieClip Class. I know I can create a symbol in the library, create an instance of it, give a name and manually set AS linkage to my extended class - is there a way to do it without creating a symbol at all. I.e. create an empty movie clip and then just cast it to my class that extends Movie clips?
Thanks
Leonid
Function Not Defined Immediately After Create MovieClip Instance
Hello kirupa flashers,
I create a new MovieClip, call it Somehow, and link it to the name "MyClip", for example.
Inside of the Clip, there must be a Function like this:
Code:
this.sayHello = function() { return("Hello"); }
(In fact, my script should do different things, but this should be enough at first
In my root frame, i do something like that:
Code:
attachMovie("MyClip", "MyClip01", 1);
trace(MyClip01);
trace(MyClip01.sayHello());
For the first trace i get "_level0.MyClip01", which is correct.
But i cant call the function sayHello(), it says: "Undefined".
And when i put the last line in the second frame, or as a button action, it is working, but
this is not what i want.
The reason is, that i get a big struct object where all the information is stored about
the Clips i have to create and how to initialize them and so on.
It LOOKS LIKE this:
Code:
for(i=1; i<=100; i++) {
attachMovie("MyClip", "MyClip"+i, i);
theClip = eval("MyClip"+ i);
theClip.tellSomething(i*i);
}
They must be MovieClips, because the functions not only response with hello, like in the example.
So I want to create the Clip copies and call the functions in one step. This example is also not working when i put it inside of a onLoad, or onEnterFrame and so on....
And ideas? I doubt that its so difficult...
Eclipse2k
Function Not Defined Immediately After Create MovieClip Instance
Hello kirupa flashers,
I create a new MovieClip, call it Somehow, and link it to the name "MyClip", for example.
Inside of the Clip, there must be a Function like this:
Code:
this.sayHello = function() { return("Hello"); }
(In fact, my script should do different things, but this should be enough at first
In my root frame, i do something like that:
Code:
attachMovie("MyClip", "MyClip01", 1);
trace(MyClip01);
trace(MyClip01.sayHello());
For the first trace i get "_level0.MyClip01", which is correct.
But i cant call the function sayHello(), it says: "Undefined".
And when i put the last line in the second frame, or as a button action, it is working, but
this is not what i want.
The reason is, that i get a big struct object where all the information is stored about
the Clips i have to create and how to initialize them and so on.
It LOOKS LIKE this:
Code:
for(i=1; i<=100; i++) {
attachMovie("MyClip", "MyClip"+i, i);
theClip = eval("MyClip"+ i);
theClip.tellSomething(i*i);
}
They must be MovieClips, because the functions not only response with hello, like in the example.
So I want to create the Clip copies and call the functions in one step. This example is also not working when i put it inside of a onLoad, or onEnterFrame and so on....
And ideas? I doubt that its so difficult...
Eclipse2k
How Do I Dynamically Create An Instance Of Class Which Extends MovieClass
I have a class which extends the MovieClip Class. I know I can create a symbol in the library, create an instance of it, give a name and manually set AS linkage to my extended class - is there a way to do it without creating a symbol at all. I.e. create an empty movie clip and then just cast it to my class that extends Movie clips?
Thanks Leonid
Question About Create Dynamic New Instance Of Typed Movieclip In Class Code.
Hi,
Im having some troubles (driving me crazy.. ) when i try to duplicate typed class movieclip dynamically, the problem its when i use duplicateMovieClip method only to duplicate a mc in runtime, the new instance doesn't have the mc´s original contents(Images, other mc, tx area) neither the contents of the movieclip (like its in the library...) but if i add the attachMovie method doing something similar to duplicate, a line before duplicate, it works , so it makes the copy of contents, but this copy doesn't have the properties and methods included in the class so i can't use it.
-------
This is the code of class Product, to use it in scroll of products that come from a database, every product imported from the db, its created dinamically from a mc loaded in the Library linked to a class who extends of the MovieClip, that i called "Product" class. This is the code ->
Code:
public function loadColection(xml:XML) {
var total:Number = xml.childNodes.length
for (var i:Number = 0; i < total; i++) {
var img_temp = "imagen_" + i;
var id:String = xml.childNodes[i].attributes["id"]
trace (id);
var name:String = xml.childNodes[i].attributes["name"]
var price:String = xml.childNodes[i].attributes["price"]
var imagen:String = xml.childNodes[i].attributes["imagen"]
trace (imagen);
var data:Object = {_x:130 * i, margen:(130 * (total - 1)) + 10};
this.colection.attachMovie("imagen_mc",img_temp,this.colection.getNextHighestDepth(),data);
var mc:MovieClip = this.colection.imagen_mc.duplicateMovieClip(img_temp, this.colection.getNextHighestDepth(), datos);
this.loadImagen(imagen,mc);
}
}
Any suggestions ?
Instance Names...changing...or Addressing Txt Field Instance Based On Instance Of Mc
i'm creating a mail form, that has a text effect which displays the type of info to be entered in each input box. To create this effect, i had to assign the variable name txt to the input boxes as well as the instance name txtBox. each of these text fields is contained within a movieclip, each with a unique instance name. what i need to do, is somehow assign a value/variable to each text field to pass to PHP to generate an email. I have always used components for contact forms so i'm not sure how to make the switch, AND.. the script i use for my contact form is an EXTERNAL AS file. (i use a customized version of a contact form from www.actionscript-toolbox.com [which apparently is no longer Flash related site])
ok.. this is hard to explain..... so bear with me....
If my original mail form component instance names were: tiName, tiEmail, tiSubject and taMsg (ti for textInput and ta for textArea)
and my current instance names for the mc's which CONTAIN the input boxes (with txtBox textfield instance inside them) are: name_txt, email_txt, subject_txt & comments_txt...
how would i pass/convert the users input text in each movieclip's txtBox, into the original instance name for my mail form so i can continue to use the form/PHP i have been using??
OR....
how do i take the values input by the user in each txtBox (i.e name_txt.txtBox.insertedTextFromUser or name_txt.txt, email_txt.txtBox.insertedTextFromUser or email_txt.txt) and send them to a new PHP script to send mail??
please keep in mind i am PHP retarded... hence why i re-use the same form over and over..
thanks in advance for any help. it's greatly appreciated...
if you're confused about my problem, please let me know... i'm having a difficult time explaining....
Mc Instance Activated By Button How Do I Unload Mc On Click Of Another Button?
I have 4 buttons each with a mc instance attached. on release of button one it plays the movie clip - eg click "about us" button plays a movie clip to open up the company details. But when you click the 2nd button "contact us" I want the first movie to disappear(unload) and the 2nd movie clip to play.
Can anyone help?
Desperate!!!
Pass Button Instance Name To A Function When Button Is In ScrollPane?
I have a ScrollPane component which holds a movieclip from my library. I am trying to set up a funtion to read the movieclip.button instance name when I click a button. On a trace, all I receive is "spContentHolder."
How can I capture the button instance name when the button resides inside the scroll pane?
Thanks.
Button Instance From Anoter Button
Hi
how i do to create a Button when click in anoter button?
Thanks and sorry my English.
--
Rodrigo Barrere Brezina
Dpto. Sistemas - Aguas del Valle S.A.
Tel: 430003 - int 233
S.F.del V. de Catamarca - ARGENTINA
Button Instance Name
Hi, I am trying to indicate the button instance name of a existed button. However, it's fail.
Code:
on(release){
_root.textfieldInstance.text = this._name;
}
Would anyone know what's up?
Thank you for reading my post!
Visit example at:
http://ddlam1.netfirms.com/Instance.swf http://ddlam1.netfirms.com/Instance.zip
(20KB)
Getting A Button's Instance Name..is It Possible
Quick question. I have say 50 buttons in my flash movie, that when clicked need to send their instance name to my php script. Everything works fine and dandy as of now. I'm just wondering if there is a way to use an abstract idea to access these button names. Rather than having to copy and paste the same actionscript block and change the instance name 50 times. I've tried this._name (which actually gives me to the movie clip name) and a few other things, none which seemed to work. Most show up undefined. Anyways, any help on how to accomplish this would be very helpful, as I have 50 movies to this to, and most of them have well over 100 buttons...thanks
[F8] Button Instance
I have a lot of buttons in my library. They're all the same with only the text and url different. The buttons are text only with a font color change on the 'up'.
I thought I could make one generic button and just change the text of the instance. Thus I wouldn't have to go through each new button changing the text for each state. Very time consuming.
Can I do this?
Thanks
How To Get Button Instance Name?
i would like to get the instance name of button when i click on it, then i will get it's name.
i have a button--> btnTry as instance name.
then the code
Code:
on (release){
trace(this._name);
}
but i got nothing in output. appreciate your help
Get Instance (Button) Name
Hi,
I've been trying to get the instance name of the button the user clicks on to help make my code easier to manage etc, how do i get the name of the button they have just clicked on?
I found this code in the flash help, but I can't seem to make it work for a single button, the code here gets the name of every button on the time line.
on (release){
for (i in this) {
if (this[i] instanceof Button) {
trace(this[i]._name);}
}
}
Your help would be much appriciated!
Thankyou
Matt
Using Instance Name Of Any Button
Hi,
I've got a movie that loads images stored on the server in a seperate directory. I do this because preloading all of the images (some 500) would take an awful amount of time. I'm trying to optimize the process so instead of doing
on (release) {
pic = "image2.jpg";
loadMovie("images/"+pic, "_root.blankmovie");
}
for one button and
on (release) {
pic = "image3.jpg";
loadMovie("images/"+pic, "_root.blankmovie");
}
for another and so on and so on like 500 times, I'd like to make a global statement on main movie like
_global.pic = Button._name
and then for entire movie do something like
on {???everybutton???}(release) {
loadMovie("images/"+pic, "_root.blankmovie");
}
but I really have no idea how to tell the movie that the button I'm referring to is the one I just clicked. Any ideas? I'm open to a complete change of thinking here too. I'm kinda new to flash and may be in over my head. If you know of a better way to do this, let me know or if you just know the correct syntax of what I'm trying to do, I'd love some pointers.
tia,
dan
Calling Button Instance Name
Hi All!!
I'm writing some actionscript for a button, but I can't get the button's instance name as a string? Anyone know how would I get the button's instance name into a string?? Sorry if this is a bit of a newbie Q.
thanks all
Button Instance Actions
This may seem like a dumb question but when I go to place an action on a button instance, (hit), for some reason my actions are all grayed our and I can't select. I'm trying to do a simple
button link to a url. Any clues?
Flash MX Button Instance Name
Hi
Just wondering, I made some buttons in my .swf, and I am exporting it as Flash Player 5, but when I export,its gives the warning of Flash MX Button Instance names are not supported with Flash 5 player. When I play the .swf in the player, all seems to work well. Will it be ok in a flash 5 player? I think so, but since my player is Flash 6, I'm not positive. Any info on this would be great!
Button Instance On (release)
my students and i are trying to insert a goto action on a button. our actionscript looks like this:
on (release) {
gotoAndPlay ("Scene 2", 2)
}
i personally have made this work in the past. now, though, i'm getting an error that says "Mouse events are permitted only for button instance on (release)".
we're using flash mx.
currently, all of us are getting this error. help!
Fading In An Instance Of A Button
I'm trying to have several buttons fade in during the beginning of my movie. The alpha setting in the color pannel does not seem to controlling the visibility of the instances of the buttons. Is there a different way to perform the desired effect, or am I not doing something that will fade the buttons in? Thanks.
Button Instance Name In Flash5
How do I give a button an instance name in Flash 5 ?? I'm trying to recreate this very simple tutorial : http://www.flashkit.com/tutorials/Ac...-766/index.php
But I guess this guy is using something else than Flash 5. I don't see the field where I can enter a name for the instance of my button.
Thanks
Getting A Button's Instance Name In On(release)
Just wondering if anybody know if there is a way of getting the button's instance name that was clicked inside the button's on(release) function. Similar to UI button where the component is pass to the event handler function, so you know what UI button was clicked. I can convert the button to a movie clip and use this._name to get the instance name, but just want to know if there is a similar way to do it with a button.
|