ActionScript 2.0 :: Setting A Component Variable
Mar 23, 2009
How do I set/access the "Text File" variable as shown in the two pictures. _root and _global don't work.I also tried to access it from _root.CrosswordPuzzle.cp_words_textfile.I don't get components.
View 1 Replies
Similar Posts:
Dec 8, 2011
In my custom component (Login), I create and set a variable userName, it is bindable: [Bindable] private var userName:String; userName = txtUsername.text; I need to pass that variable to a different custom component (Overview), here is the code of the viewstack:
[Code]...
I've searched for a way, but I haven't found one that does the trick.
View 1 Replies
Nov 8, 2010
I'm building a custom Audio Player. The whole thing drives a MediaPlayback component. I have a scrubber set up that moves with the progress of the song. I want to be able to click and scrub with it though. Currently I have it set to set the playheadTime equal to the percent distance the slider is dragged to times the totalTime of the playback component. After the release of the slider I trace out the playheadTime and it seems to be fine, but I can't get it to resume playing at all. Here's the code in the controller:
var totalDistance = bar_mc._width - slider_mc._width;
var wasPlaying = false;
this.onEnterFrame = function(){
[Code]....
View 1 Replies
Mar 12, 2009
I'm trying to dynamically set some parameters of a component using AS3. The component has a parameter named "imagePath". I want to set this to a variable named "pathVar" This is where i'm at.
Code:
var pathVar
pathVar="images/folder1"
imagePath=pathVar
This clearly isn't working.
View 1 Replies
Apr 21, 2009
i never use compenents, and was recently asked to build one. Ha. Anyway, i have a working class that does all i expect, however, when transforming the class to a component, i am having trouble getting the inspector to actually 'set' the variables. below is a very general idea of what i am doing. All the variables show in the spector, but only the default values are working at runtime.
[Code]...
View 2 Replies
May 19, 2009
I ve got a series of frames, each with its own instance of a scrollPane called actionText. When navigating from frame to frame I want the vertical scroll position of actionText to reset to 0.For some reason these separate instances of the component are inheriting scroll positions from one another,for example,if I scroll to 50% in one frame, jump to a new frame with a new instance of actionText, that new instance starts at 50%, not 0.
I should be able to set the scroll position by actionText.vPostion = 0 but I get Position is an undefined property of the object actionText .Roll over either the star one or star twotabs and select any action item, scroll the text down (actually a pdf converted to swf), then navigate to another action item and the new scrollPane does not default to 0. Only stars one and two are coded.[url]......
View 3 Replies
Oct 25, 2010
I am loading a component which makes a HTTPService call to get data that will then be used to set certain variables in the component. I make the HTTPService call in an init() function (for the initialization event) and then set the variables according to the data received in the HTTPService result handler. However, the variables are still null at both the initialize stage and at the creationComplete stage. If I try and read the variables in a creationComp() function (for the creationComplete event), those variables are still null. Is this correct?
I guess I don't understand the flex initialization cycle very well. When are those variables actually set and available to be used? I need to manipulate those variables automatically after the component loads. Is there an event that comes after creationComplete that is appropriate or some other way to approach this? I am using Flex 3.
View 2 Replies
Aug 31, 2004
ive got a radiobutton component on my stage named radio1. I need to duplicate it and then change a few properties, but i cant seem to get the path/naming right. This is my code:
Code:
i=2;
radio1.duplicateMovieClip("radio"+i, radio1.getNextHighestDepth(), {_x:20, _y:20});
_root["radio"+i].setLabel("test");
i++
if i use a constant name instead of "radio"+i it works but the ["radio"+i] seems to be the problem, could someone help me with this? (using flash mx)
View 7 Replies
Jul 19, 2010
I just spent 2 hours scouring the web for the answer. All I'm seeing is a whole lot of "how do you do it" and a lot of "do a google search for it'. I found a tutorial for CS4 that looked promising yet when I tried it in CS5 the damned Preview attribute (or whatever) just sits there looking at me. You're supposed to be able to click on it and choose a frame. I click and double click and nothing happens.
View 3 Replies
Dec 11, 2009
I am trying to define the content area of a custom component that extends mx:VBox. The component has predefined headers and footers (visual children) and I want to set the area in the middle for adding children to the component. The component will be used like this:
<custom_component>
<mx:button/>
</custom_component>
How would I set this content area?
View 3 Replies
Sep 2, 2010
I am wondering if flex enforce style settings and throws compilation errors if a style that is applid to a component that is not supported by it. Has any one tried it before ?
View 1 Replies
Dec 10, 2011
I'm pulling in a xml-file with just one result in it. One of the nodes is picture, which contains a link to a picture. This is the xml-file:
<artist>
<id>502</id>
<name>Bad Religion</name>
[Code]....
I've tested the url, and it's correct. This is how I try to bind the url to the image instance (artistPic), but it's not working. Displaying the artist name does work.
var artist:XMLList = new XMLList(event.result);
artistPic.source = artist.picture;
lblArtistName.text = artist.name;
View 1 Replies
Jan 11, 2010
I am trying to set a listener so that I can respond to an flvComponent when it resizes etc. I am not uses any home made classes. I have stripped the code right down to this, and it still wont work! Have dragged a flvcomponent onto the stage and given it the instance name myVideo.
ActionScript Code:
stop();
myVideo.addEventListener(AutoLayoutEvent.AUTO_LAYOUT, fred);
function fred(e:AutoLayoutEvent){
trace ("hi from fred");
}
when I test I get "type was not found or is not a compile time constant:AutoLayoutEvent". I can do all sorts of processes like changing flv being played, moving it around etc.
View 2 Replies
Oct 4, 2011
I have a video which has an flvplayback inside. I have been using it for others flv. But with these 3 flv, when I set the path in the component parameters, flash shuts down. I have used aftereffects, media encoder to convert them from mov and avi to flv.
View 0 Replies
Feb 29, 2008
How to get my data grid working so that it is set the stage.width - 250; therefore it would scale with the window when minimized.
View 3 Replies
Dec 9, 2009
I am trying to develop a custom component to act as a divider.
[Code]....
I would like to use this component to assign objects like this:
[Code]...
Unfortunately, this does not work. I get a compiler error saying: In initializer for 'left': multiple initializer values for target type mx.containers.Canvas.
View 1 Replies
Aug 18, 2010
How do you set the default value of skinClass for a custom component in Flex? I've extended the DropDownList with my custom component, but I would like to specify a default skin to go with it instead of always setting the skinClass value for each instance.
View 1 Replies
Mar 7, 2011
How can I set font size of title property (header) in TitleWindow component? If I use fontSize property, it sets the font size for all components in TitleWindow, which is not what I want. I only want to set it for the title. I'm using Flex 3.
View 1 Replies
Mar 2, 2008
I created a movie clip symbol with a user interface in it, using the standard components. It contains various components that I draged on the stage. I named the instances (e.g titleLabel). Then I created an ActionScript class for that user interface. Under the linkage properties of the symbol I specified that class. In the class itself, i declared the attribute "var titleLabel:Label". I thought this would be the same instance from the symbol? But: Trying to set the text of the Label AFTER the movie was dynamically added to the parent does not work. I cannot access any properties.
Here is the example:
My Class for the user interface:
Code:
import mx.controls.*;
class Information extends MovieClip {
var titleLabel:Label; //this is the same instance name as in the symbol
[Code].....
View 1 Replies
Oct 22, 2010
I'm having trouble setting the color of the text of a TextInput component. I know there is a TextField within it, I'm trying several methods, but none works:
[Code]...
View 1 Replies
Dec 18, 2009
I can't figure out how to set a boolean variable to 'true' if someone clicks a checkbox. Help, please. I'm working on AS2, btw.
View 1 Replies
Nov 21, 2009
[Code]....
What I am trying to do is create a root variable that can simultaneously equal a range of numbers. But I cant use the for command because the variable it will assign will only be confined to those brackets and can only be pulled from code inside the brackets
View 1 Replies
Nov 12, 2009
my string LINK at the end of the script is undefined it should change when i select the categories with my combo box
here is the xml :category.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<slideshow>
[code].......
View 4 Replies
Jun 3, 2010
I'm using createTextField to create a textfield. I have also created a input textfield with a variable called textline1 (I don't create the inputfield with as).I want to display the letters in the created textfiled that I'm typing in the input field. So this in my AS coed:
_root.createTextField("text1",1,100,100,300,100);
text1.variable = textline1;
format1 = new TextFormat();
[code]........
View 3 Replies
Dec 4, 2009
How could I set a Flash (Actionscript 3) variable using javascript? Or is it possible to call a flash function with parameters from javascript? I have tried ocument.getElementById('flash').SetVariable("data", "asdf");but it only works in AS2 and AS1.
View 3 Replies
Feb 8, 2010
I have loaded a movie clip from the library using the addChild Method. Now, from withing the main timeline of this loaded movie clip I'm trying to set the value of a curScore variable on the stage.
Code:
MovieClip(this.parent).curScore += 10;
Doesn't work...
View 0 Replies
Aug 3, 2010
trying to get a variable set so that I can use it in another class.I am trying to set the class variable animate. My "intended" goal is that I am trying to load in an external SWF file that is a pulley In this external SWF file I have a function that stops the animation called "stopAnimation()". I want to be able to access this stopAnimation function in a couple of class files. So I pass this object to those classes and then I should be able to access the stopAnimation() function from where ever but I cannot seem to get the contentloader info into a class variable in order to call it from other objects.
Here is the code
PHP Code:
packagecom.ahicks.assets{
importcom.ahicks.Main;
importcom.ahicks.Trace;
importcom.ahicks.ndTween.easing.*;
[code]....
View 0 Replies
Oct 26, 2004
PHP Code: azar pin:Number;pin=1234; enter_btn.onRelease = function(){if (pin=input_pin) {gotoAndPlay(3)}} It's a cash machine demo, if you were wondering about the "pin" variables. Basicaly there is an input textbox with the instance name "input1" and the "var" setting is "input_pin" the button has the instance name "enter_btn". If the pin number = pin number typed in, go to frame 3. But it dont work...
View 8 Replies
Apr 23, 2006
I am using laco tweening prototypes http://laco.wz.cz/tween/ and have a little problem which im sure is easy to solve, but i just dont know how...
I have e.g 3 movieclips which i want to animate with a rollover from 3 different buttons - btn1 animates mc1, btn2 animates mc2 etc.
Each mc has the same animation (3 tweens - x,y and rotation) so i have set up a function for the three tweens using a variable for the mc name:
[Code]...
View 9 Replies
Jun 1, 2009
im trying to set up a variable passing system where once the user clicks a button it sets a variable and then once the movie hits a certain frame an if statement checks the variable and sends the user off in the direction depending on what the variable is.
here is the code on the button
on(release) {
set("global", "variable1");
}
[Code]....
the code seems to be working on the first part as the movie goes to the "here" part but i cant get it to go to the "thisplace" section.
View 6 Replies