Professional :: CS4 Referring To A Label
Feb 20, 2010
Now that I've set labels, I'm trying to create actionscript code to go to the labels. Here's an example of my code:
btn_me.addEventListener(MouseEvent.CLICK, gotome);
function gotome(event:MouseEvent):void{ gotoAndPlay(me);}
This code has been borrowed from the online video - Getting Started 18: Building an Application. Of course, in that video explicit frame numbers are used so the code looks like gotoAndPlay(15). I'd prefer to use labels for obvious reasons. My question - how do I tell Flash that 'me' is a label? I expect I need to use a special character and I've already tried gotoAndPlay(#me) but that gives me a Syntax error.
View 3 Replies
Similar Posts:
May 27, 2010
Anyone know what the parameters filled by "fmovie" are referring to in this code?[code]Would it be a flash layer or instance name???
View 4 Replies
Dec 9, 2010
I'm finding it useful to add labels to my timeline so I can easily see where animations start and stop for different symbols. However, I can not seem to label sections that are motion tweened. The entire motion tween section is selected when I just click on any section of it. Even if I use CTRL + click to select a single frame, there is no option for "label" in the properties window like there are for other frames. It shows the motion tween options.So is there a simple way to label a motion tween?
View 2 Replies
Mar 16, 2011
I am by no means a Flash power-user but I am accustomed to labeling layers instead of leaving the default "Layer 1, Layer 2, etc."Now that I have Flash Pro CS4 I am unable to do that with any effectiveness. When I double-click on the default layer name, that field should become editable. The problem is that it's only editable for a split second. Unless I type a character as soon as I lift my finger from the second of the double-click - I dont get to edit that field.
View 2 Replies
May 10, 2011
sometime I can edit an existing frame label and sometimes flash is clearing the label name when I click into the textbox in the property window.As I work often with labels this drives me crazy sometimes.Did anyone find out how to avoid the labels to be cleared when clicking on it?
View 1 Replies
Jul 5, 2010
I've got some sentences I need to put in a ComboBox as selections. They are much too long for the width of the box on the page. Is there a way to wrap the text in the ComboBox? I'm wondering if I need to put the text into a jpg or something and use that as the label.
View 3 Replies
Feb 29, 2012
Is it possible to change a frame label within a gotoAndStop('label') with the parameters in a function?I'm playing around with updating code as I learn more and more techniques, and at the moment the code is a basic click-a-button to select the object shape, and on press the button disappears:
// Change the object into a circle.
circle_btn.addEventListener(MouseEvent.CLICK,function(){changeShape_fun(circle_btn,circle);});
// Change the object into a square.
square_btn.addEventListener(MouseEvent.CLICK,function(){changeShape_fun(square_btn,square);});
[code]....
However I can't/don't seem to know how to change a frame label through function parameters, or if what I'm trying to do is even possible.Also to note, while I'm all ears for any more efficient ways of doing what I'm trying to do, I would still like to know how/if you can change frame labels through function parmeters.
View 1 Replies
Apr 20, 2010
I'm using a radio button component in CS4.Just wondering how to chnage the font color in the label?I tried using selectRB.value = 0xFFFFFF;
View 3 Replies
Jun 30, 2010
I'm looking for a piece of AS2 script that will open a different scene and play a label from inside a mc.So it should be something like...On release go to scene x and play x label from inside x mc.I can get to the scene via the button "on release gotoandplay scene 2 . Once in the scene I can get a button to gotoandplay themc.mc and the label.But what I really want to do is get the button on one page to go to the scene and play the label on the second scene.
View 3 Replies
Nov 4, 2011
I usually program with C#, PHP, html etc.trying to learn Adobe Flash now so i downloaded the trial version which has 30 days trial.tried to create and follow the tutor for click ball which all of the code is the same but it doesnt work.
I triple check the code and its all right but it still not working.so i commented out all of the code and has a simple code of changing the text of the label.i set the text to "abcdefg" and but it only show "cdef".i expanded the width of the label so width is not the issue. trying to search for the limitation of the trial but i dont see any.trying to test this before i buy it.it does change but not changing correctly.i try to set to another value it always show partially only.
View 3 Replies
Mar 27, 2010
Is it possible to catch flash label's mouse click event?
mylabel.addEventListener(MouseEvent.CLICK, OnButtonClick);
Does not work
Or can it be done via an extends like
public class MyLabel extends fl.controls.Label {
// how to catch and dispatch mouse event? }
View 3 Replies
Dec 21, 2006
This is my problem: I've got a couple of movieclips, when I click on them I want them to open the URL that I've typed in my XML-file.(The photos are thumbnails stored inside of the movieclips)Here's my XML:
Code:
<?xml version="1.0"?>
<select name="photos">
<option photo="film14" url =">[code]....
How do I refer to the url-code in the actionsscript?
View 4 Replies
Nov 23, 2009
i need to refere to a whole bunch of mc named a1, a2, a3, a4, a5 and var who:MovieClip="a"+3 dosnt work...
ActionScript Code:
import gs.TweenLite;
stop()[code].............
View 1 Replies
Apr 12, 2010
I have a small Flash file where I control a ball.In ActionScript 2.0, I have it to where this ball moves around based on input from the Arrows on the keyboard. It also bounces off the edges.I added a new separate ball (not the same symbol) and I want to refer to the NEW ball's X and Y coordinates to see if I am running into the new ball. How do I refer to the other ball's (or any other object for that matter's) properties from within the ActionScript of the first object?
View 2 Replies
Apr 17, 2003
say i have this code: blah = "123 + i" so blah is a variable right? so how would i refer to this variable? i want to be able to do: _root.blah.onPress = function () but this won't work beause you need an instance name instead, so how would you do this? thx, i hope you understood what i was saying
View 9 Replies
Feb 7, 2006
Code:
var l = 2;
duplicateMovieClip(button, "button"+l, this.getNextHighestDepth());
[code].....
View 4 Replies
Mar 31, 2006
im trying to, to make my MC have a rollover effect but my movie clip had been added by Action Script so this doesnt work
[Code]...
View 5 Replies
Jan 29, 2008
How do you refer to the level one below the current level . I know _root refers to the bottom level, parent refers to one level above but I don't know what to use for one level below. Otherwise, is there a way to refer to a level by its name?
For my needs, I have a clip portfolio.swf that is loaded into a Base flash file. Within portfolio, is a loaded movie called Gallery.swf. Gallery contains a movieclip called Thumbnails which has buttons to load various image.swf files. Also within Gallery is an empty movieclip called "ContainerMC" which is where image.swf are loaded into when called upon by the thumbnail buttons. From within Thumbnails, I want to be able to refer to that movieclip "ContainerMC" which those selected image.swf files are loaded into. I can't use _root as that will refer to the base flash file. I can't use "this" as that refers to the Gallery file.
View 2 Replies
Mar 15, 2009
I have created a loop to add my clips by class and give them a name
tempClip = new clientsThumbs[i]();
tempClip.x = xPos;
tempClip.y = yPos;
[Code]....
How do I reference my instances by name
View 1 Replies
Jul 23, 2009
I'm trying to access an instance by using a variable but when I try to manipulate a property to the instance (by referring to it with a variable) it only recognizes it as a string... for instance... (pun intended??)
public var prevbutton:String = "btn1";
trace(["page"+prevbutton]);
// which traces - pagebtn1
trace(pagebtn1);
// which traces the instance class - [object btn1pageclass]
I want to call the instance by using a variable... how do I do this?
View 11 Replies
Mar 4, 2010
I have an object that I add movieclips into when a user does something.
I'm trying to loop through the items in this object later and perform something when object.objectName = something, however I'm finding it hard to get the right code to use in place of the something.
code within a function that adds movieclip to object:
Code:
if (thisHImage==1) {
healthArray[healthIndex] = new mcCake();
}
[Code]...
when i trace(healthO.objectName) i get [object mcCake], but it won't enter the if statement,
View 2 Replies
Jun 3, 2011
What I am basically trying to do is Like,the yellow boxes are dynamically made,with Actionscript Code: new Sprite(); inside that red and blue are also made with new sprite(); with instance names yellow1(red1,blue10),yellow2(red2,blue2) etc... How can I refer to yellow1.red1?Like,these are dynamically made,and i dont know the limit,like say it adds on with each click,It will make Actionscript Code: 'yellow'+i and red+i etc... How can I refer to the ith sprite when the user clicks?Suppose the user clicks yellow5,I want a reusable code that will refer to yellow5.red5
View 1 Replies
Jul 8, 2009
I have a button located in a movieclip which I want in its overstate to gotoAndStop a particular labeled frame located in a different movieclip. How do I go to a frame of "movieclip A" by interacting with an element of "movieclip B"? Must I sever the relationship between the button and the movieclip its in which I wouldn't want to do...?
View 3 Replies
Oct 12, 2010
I have a button nested in a moveiclip within a larger flash file. I'm trying to have the button launch another swf file in a UILoader that is nested in the parent of this movieclipI thought that the following code would work to refer to a UILoader in a parent movieclip, but it didn't
archGallery.addEventListener(MouseEvent.CLICK, goArch)
function goArch(e:MouseEvent):void {
loadWindow.(this.parent).source = "archGlider.swf"
[code].....
View 5 Replies
Oct 6, 2009
still cant get my head around this..iv created balls inside a function is there a way to reference them out side of the function? with addChild() do they get instance names?
ActionScript Code:
makeBalls();
function makeBalls() {
for (var i:int=0; i<10; i++) {[code]...........
View 1 Replies
Jan 21, 2010
've been trying to figure out how to refer to the stage from a Sprite before it is added to the stage.
I'm working on a small program in which I plan to use external classes for each "window" that comes up. I've made the window classes extensions of Sprite. I'd like to make this window add itself to the stage when its constructor is called, and then just remove it from the window class when I'm finished with it. Is this a good idea? I'll post some of my code to show you what I mean.
This code doesn't work. I get the error "type was not found or was not a compile-time constant: Stage"
From my window class:
ActionScript Code:
public class PlayerSelectionWindow extends Sprite{
var stg:Stage;
[Code]....
View 2 Replies
Dec 6, 2010
The constructor class has the following code:
Code:
//Phase 2: Parse XML Data
internal var xmlParse:ParseXMLData;
[Code]....
View 7 Replies
Jan 26, 2006
I'm using a little flashmovie as a button on a website, and I'm trying to link it to not only a certain page but also a specific place on that page. Right now I'm using the following code:
getURL("SS-nieuws-flash.htm#opendagen", "_self");
This only gets me to the right page, but not the right place on that page. Can this be done in Flash. I haven't been able to find any examples of it in the manual or on the web.
View 1 Replies
Oct 27, 2006
altering values of movie clips (couldnt think of another way to put it)say i need to change the _x of movie clip ##_mc
# being variables
i would normally use:
tellTarget ("_root."+A+B+"_mc")
{
_x++;
}
since the i cant just say _root.G5_mc._x++; cuz i dont know if its G5_mc or G4_mc (follow? im horrible at explaining things!)is there any other way of doing this? or do i have to use tellTarget?
i tried:
"_root."+A+B+"_mc._x" += 1;
but it didnt like that too much
View 5 Replies
Feb 5, 2009
I have found a tutorial which shows me how to create a class. It also shows me how to construct an object in the main code. What I want to do is to access a variable from the object that I made. Heres the code...This is the link to the tutorial:http:[url]....
Code:
package
{
public class Car [code]....
Then I use this code to construct the object, which in this case is a car (the code is in my main flash file):
Code:
var mycar:Car = new Car("Porche", 3.2, 4, "Normal doors");
I understand all of the code, but how do I reference a variable like the engine? I have tried lots of things like "trace(this[mycar] .engine)", "trace(mycar.engine) but nothing seems so work. I just get error messages of property undefined.
View 4 Replies