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




Help With Text._visible Property



In my movie when I get to a certian key frame I want to make 2 text fields that are in the next frame invisible. But I don't seem to understand the syntax correctly.

Would not do something like this in the keyframe before you get to the frame with the text? I need to control it from one frame ahead.


Code:
evelutionText1._visible=false;
evelutionText2._visible=false;



FlashKit > Flash Help > Flash ActionScript
Posted on: 11-21-2003, 01:48 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

_visible Property?
In my main timeline i have a movie clip instance called "menu_mc" that consists of 4 buttons that animate. So when i first load the my swf or whatever i want it so 3 of the 4 buttons dont show. I tried going "_root.menu_mc.buttonName._visible=false; but it doesnt seem to work. Am i doing something wrong or what? plz help thanks!!

[F8]using _visible Property
I'm creating a standalone .exe file in Flash. Instead of loading external swf's (the whole file needs to be completely self-contained if possible) I'm trying to use the _visible property to turn a slide show on and off. However, when I assign a "_visible = true" property to a button, the movie only stays visible for one frame then blinks off again.

Complicating this somewhat is that I'm using a scroll pane component. The button which turns on the _visible property is inside the scrolling content, and the slide show plays on a layer in front of the scroll panel. So the end result I'm looking for is being able to make the slide show visible from inside the scrolling content, then turning it off again with a button that is either inside the slide show or a separate mc.

Thanks for any help!

Gerry

_visible Property
I am loading external swfs as my webpages, but when i roll over them and go over a location where i have buttons on my homepage behind the external swf i still get the little hand pointer, but there is no button in the swf just on the homepage(parent swf) behind it. I thought of trying to make the buttons not visible when i load an external swf but that was no help because then they go away before the page is loaded. Is there an alternative to this problem. Please Help!

_visible Property...how Does It Work?
Hi!

I'd like to know how can I do to make a button or a graphic to become visible/invisible.

Any idea??

Thanks... and keep on rockin' !!!

Problem With _visible Property
i got this as error

**Error** Symbol=Clock, layer=a, frame=1:Line 6: Syntax error.
clock_mc.0_mc._visible =false

this is the code

clock_mc.0_mc._visible =false

0_mc is a movie clip that is inside clock_mc, another clip, WHATS WRONG :S this is driving me crazy

Please Explain _visible Property...
Can someone please explain how the _visible property works and how I can use it with loading external movies into my main.swf...

I have 3 movies loading into my main and I want to hide two of the movies until my main movie is preloaded. I am using a preloader for the main movie but I don't need it for the other two movies...

Any help is appreciated.

Help With _visible Property Onload...
Hi All,

I'm hoping someone can help me with this... I have 2 EXTERNAL movies being loaded with initial load of my site into my main.swf, one of which (movingbg.swf) is being loaded with a preloader. The problem is that my other movie (menubar.swf) is loaded before my first movie. I think I should use the _visible property to solve this and here is what I have so far...

On second.swf I have:

onClipEvent (load)
{
_y;
_y = 0;
this._visible = false;
}

On my preloader located in my main I have:

this.onEnterFrame = function ()
{
var _l1 = _root;
percent = _l1.empty.percent;
if (_l1.empty.percent == 100)
{
_l1.menubar._visible = true;
this._visible = false;
} // end if
};




I am stuck because I have no idea what to use in the first frame of my main movie. I think I am on the right track here... please let me know if I am not.

Any help is greatly appreciated.

Question On The _visible Property
As in, I want to load up a bunch of jpegs, but not display them on the stage.

Is there a way to load jpegs and swfs, into the library, and not even worry about killing their visibility on the stage?

thanks

Property Assignments Etc. Ignored (_visible And SwapDepths Mainly)
Hi!

I have a lot of functions which are called in an onClipEvent(enterFrame) based on a lot of boolean variables. One of the functions sets ._visible = true and .swapDepths(nDepth)
on a clip, but it doesnt happen. if I try to trace the ._visible property, it's true, but in the debugger it's still false. the clip doesn't show either. I even tried to call ONLY .swapDepths in one frame, but this results in some random behavior.
Seems like only 60% of my new settings is applied, but all of the code is correct. (believe me, I'm not green)
Is there some rules not described by Macromedia for those properties and methods? Like "this action must be executed in a frame for iteself".
I haven't found anything in the documentation.

please help!!

bonghead

Changing The _visible Property Of A Symbol
As above, how do I set & change the visible propery of a symbol?

The only reference to visibility I could find was under properties in the actionscript menu.

_visible Property Not Displaying Correctly
I have a problem with programming a simple Memeroy game, where you have to find pairs. Only two cards can be revealed at a time. If it is a pair they will stay visible, if not they should be turned again after waiting some seconds. The pictures are the underlaying layer, the backside of the cards are in movieclips of which the visible property is changed and invisible buttons on top trigger the thing.

The SWF can be viewed at http://www.mhofele.de/Memory3.swf

The code should be fine, because all the trace prompts are correct, but somehow I can't see the visibility changing on the second cards. Can someone see what is wrong with it?
Here's the code of the buttons. (There is only a global variable in the framescript, no other scripts)


Code:
on (release) {
trace ("Beginn");
if (A2._visible == true) { // this script is only doing something, when card was not revealed
trace ("card is not yet revealed");

// 1. Click
if (aufgedeckt < 1) {
trace ("1. Click");
A2._visible = false; // reveal card
aufgedeckt++;
trace ("Variable 'aufgedeckt' was increased by 1");
k = A2;
trace ("movieclip is saved in global Variable k");
trace ("k = " + k);
}

// 2. Klick
else {
trace ("2. Click");
trace ("reveal card");
setProperty("A2", _visible, false); // reveal card

trace (" is partnercard already revealed?");
if (D2._visible == false) { // if partnercard (pair) is revealed
aufgedeckt = 0;
trace (" Card was already revealed, var 'aufgedeckt' is set to 0");

}
else { //if 1. Click was not the partnercard: wait and then turn the cards

//Timer
trace ("Timer for waiting: wait 3 seconds");
x = getTimer()/1000;
y = x+3;
while ((getTimer()/1000) < y){
trace ("Timerstart:" +x +"Timer plus 3 seconds" +y);
setProperty("A2", _visible, false); // Karte aufdecken
}
trace ("Timer finished, now turn cards again");

trace ("turn this card");
setProperty("A2", _visible, true);
trace ("now turn the card that was revealed first");
trace (" What is in k? " + k);
setProperty ("k", _visible, true);
aufgedeckt = 0;
trace ("cards are turned and 'aufgedeckt' was set back to 0");
}
}
}
}
[Edited by MoniH on 05-25-2002 at 05:28 AM]

Looping And Setting _visible Property
Hi everyone, I've been a lurker for awhile, but now I'm stuck myself.

I'm basically trying to load a given number of .swfs into new mc's and then turn the _visible = false but it's not working. I think I'm reference the mc's correctly since the positioning is working...here's the code. And it is getting in the if..then statemement. THe movies are loading and positioning, just not hiding. Thanks!

PHP Code:



for (x= 1; x <= maxSlide; x++) {
    var sName = "slide" + x;
    this.createEmptyMovieClip(sName,x+1);
    this[sName]._x=0;
    this[sName]._y=50;
    var sPath = "content/" + sName + ".swf";
    trace (sName + ", " + sPath);

    if (x>1) {
        trace ("in loop, " + sName);
        this[sName]._visible = false;
    }
    
    loadMovie(sPath,sName);


CreateEmptyMovieClip() And Setting _visible Property
I am attempting to create a series of empty MCs, load an external .jpg into each created MC and then make the MCs invisible so I can have my way with them later in the file.

My code is as follows:


Code:
var slideCount = 1;
while (slideCount<=6) {
createEmptyMovieClip("slide"+slideCount, slideCount);
loadMovie("img/img"+slideCount+".jpg", "slide"+slideCount);
setProperty("slide"+slideCount, _visible, false);
slideCount++;
}
The creating and the loading are working fine. But it seems it is not possible for me to set the _visible property of the created movie to false. Strangely, any other property I attempt to manipulate this same way (_alpha, _x, _xscale, everything else I've tried) works. But not _visible. I've even tried using direct references in later frames to make these created clips invisible and it's not working.

What am I missing here? So baffled.

._visible Property True...only For Several Seconds?
Hi everyone,

I'm wondering if there is a way to make a movie clip only visible for several seconds. Instead of saying


Code:

this._visible = true;



Is there a way that "true" could be replaced with the amount of seconds somehow?

Thanks for any advice here.

Brian

_visible Property Resets After Scene Redraws
Hi,

I have a button on a scene. I make it invisible onrelease and goto a different scene. When I come back it is visible again.

What can I do besides not leave the current scene?

Does "_visible" Property Really Invisible?
A simple Question!
I have a movieClip with a lot of tweens... When I set the "_visible" property to FALSE, does my movieClip still running for my CPU??? Does my CPU still calculate the tweens of my Mc???

Thank's for lightning me???

???

Reading _visible Variable From Text File
hi

i have a SWF that reads a variable for the _visible property from a string in a text file that looks like this:

s1visible=false

the 'false' part is whether it is visible or not (it would be 'true' if it is visible of course). but when i have this code in my SWF to read the variable:

MC1._visible = s1visible;

it doesn't work, the object is still visible if the variable is set to false. i have tried a bunch of ways to fix this including using:

MC1._visible = Boolean(s1visible);

OR

MC1._visible = (s1visible == "true") ? true : false;

and those don't work...any ideas? thanks!

Setting A Text Box's Text Property That Is Inside A Duplicated Movie Clip?
How do you set a text box's property that is inside a dynamically duplicated movie clip?

for instance:
I have several duplicated movie clips (mc1, mc2, mc3, etc...) which were duplicated off a movie clip named "mc" and I was wondering how you set a text box's property that is inside one of those duplicated movie clips.

I don't know how many of these movie clips there are, or I would just use a for() or while() loop.


I hope I've explained this clearly, but I think I just confused everybody.
Furry

Full Justify Text Property In Scrolling Text Field
Does anyone know how to set the full justify property in a scrolling text field? I have everything formatted, but I just don't see any way to get the full justify formatting applied to the text...

Trouble Parsing Name To Dynamic Text Field .text Property
Hia, I'm making a media player with a playlist, when a list item is selected the 'name' (of selected track) should be parsed from the xml into the dynamic text field (title_txt).

What's happening is when the swf starts title_txt contains "level0.title_txt", when you first click an item, title_txt is parsed "undefined".

The trace function I set up to mimic this also brings back "undefined".

I'm not sure what's happening, any help would be really appreciated.

In my fla, I have:a list component inth an instance name of "list"
a video holder with the instance name of "video"
a title box with a var of "title_txt"

its a pretty simple fla.

the list is populated by xml

XML Code:
<xml>    <listitem name="Battle 1" url="streams" thumb="battle1.jpg">        <stream name="battle1.flv" start="0" len="-1"/>    </listitem> 
    <listitem name="Fight!!!" url="streams" thumb="fight.jpg">        <stream name="fight.flv" start="0" len="-1"/>    </listitem>        <listitem name="Marco Diaper" url="streams" thumb="marcodiaper.jpg">        <stream name="marcodiaper.flv" start="0" len="-1"/>    </listitem> 
    <listitem name="Cheetah Cougar" url="streams" thumb="cheetahcougar.jpg">        <stream name="cheetahcougar.flv" start="0" len="-1"/>    </listitem>        <listitem name="Cloning" url="streams" thumb="cloning.jpg">        <stream name="cloning.flv" start="0" len="-1"/>    </listitem>        <listitem name="Run" url="streams" thumb="run.jpg">        <stream name="run.flv" start="0" len="-1"/>    </listitem>        <listitem name="Midgets 1" url="streams" thumb="midgets1.jpg">        <stream name="midgets1.flv" start="0" len="-1"/>    </listitem>        <listitem name="Midgets 2" url="streams" thumb="midgets2.jpg">        <stream name="midgets2.flv" start="0" len="-1"/>    </listitem>        <menu>        <listitem name="Battle 1"/>        <listitem name="Fight!!!"/>        <listitem name="Marco Diaper"/>        <listitem name="Cheetah Cougar"/>        <listitem name="Cloning"/>        <listitem name="Run"/>        <listitem name="Midgets 1"/>        <listitem name="Midgets 2"/>    </menu></xml>

This is my main actionscript file (VideoSourcePro.as), line 65 is where the problem is.

Actionscript Code:
bG_mc.setStyle ("backgroundColor", 0x404040);trans_mc.setStyle ("backgroundColor", 0x404040); 
mx.controls.treeclasses.TreeRow.prototype.drawRowFill = mx.controls.listclasses.SelectableRow.prototype.drawRowFill = function (mc:MovieClip, newClr:Number) {    this.setStyle("backgroundColor", 0x404040);    switch (mc._name) {    case "bG_mc" :        //Alpha when the row is not selected        var tempAlpha = 0;        break;    case "tran_mc" :        //Alpha when the row is selected        var tempAlpha = 10; 
        break;    default :        var tempAlpha = 10; 
    }    mc.clear();    //Here's the trick:    mc.beginFill(newClr, tempAlpha);    mc.drawRect(1, 0, this.__width, this.__height);    mc.endFill();    mc._width = this.__width;    mc._height = this.__height;    //Hide the main bg of component    list.depthChild0._alpha = 0;};//Set up the list box, call function VideoThumb to create the actual thumbnailslist.rowHeight = 70;list.cellRenderer = "VideoThumb";list.selectable = true;list.setStyle("color", 0xFFFFFF);list.setStyle("fontSize", 12);list.setStyle("fontFamily", "Verdana");list.setStyle("backgroundColor", 0x404040);listitem.setStyle("backgroundColor", 0x404040); 
title_txt.setStyle("color", 0xFFFFFF);title_txt.setStyle("fontSize", 12);title_txt.setStyle("fontFamily", "Verdana");title_txt.setStyle("backgroundColor", 0x404040);title_txt.setStyle("backgroundColor", 0x404040);//create new empty listener objectlistListener = {};//Function to handle what happens when an item in the list is selectedlistListener.change = function(evtobj) {    var nav = list.dataProvider[list.selectedIndex];    nc = new NetConnection();    //create a connection    nc.connect(null);    //null connection for progressive download    ns = new NetStream(nc);    //create a stream    video.attachVideo(ns);    //pipe stream to this video object    // walk through the chosen item, build and play it      var reset = true;    for (var i = 0; i < nav.childNodes.length; i++) {        var stream = nav.childNodes[i];        if (stream.nodeName == "stream") {            // build path to flv, and play it            myStreamPath = nav.attributes.url + "/" + stream.attributes.name;            title_txt.text = nav.name;            trace(nav.name + "_" + "title_txt");            ns.setBufferTime(10);            ns.play(myStreamPath);            reset = false;        }            }    };//Add an event listener on the list, when it triggers, run the listListener function to repopulate the listlist.addEventListener("change", listListener);//Function that loads the XML file, parses it, and builds the list of available video clipsvar xmllist = new XML();//setup a variable to hold the XMLxmllist.ignoreWhite = true;xmllist.load("playlist-demo-1.xml");//load the XML file//The following gets called when the XML has been loadedxmllist.onLoad = function(status) {    if (!status) {        trace(status);    }    var entries = this.childNodes[0];    var playlists = {};    var nav = [];    for (var i = 0; i < entries.childNodes.length; i++) {        var entry = entries.childNodes[i];        if (entry.nodeName == "listitem") {            //builds array of video clip names            playlists[entry.attributes.name] = entry;        } else if (entry.nodeName == "menu") {            //builds array of available videos            for (var j = 0; j < entry.childNodes.length; j++) {                nav[j] = playlists[entry.childNodes[j].attributes.name];            }        }        //end else if        }    //end if    //sends the array of videos to the listbox UI    list.dataProvider = nav;};//end xmllist.onload 
//resizes the video object to the width and height of the clip function onVideoResize() {    if (video.width != video._width || video.height != video._height) {        video._width = video.width;        video._height = video.height;        //center video in playback area        newx = (400 - video._width) / 2;        newy = (335 - video._height) / 2;        video._x = newx;        video._y = newy;    }}setInterval(onVideoResize, 200);//keeps checking video size

And this is the actionscript file which gets the thumbnails for the list (VideoThumb.as)

Actionscript Code:
class VideoThumb extends mx.core.UIComponent {    static var symbolName = "VideoThumb";    var label:Object;    // the new text label we'll use    var listOwner:Object;    // reference to the tree - supplied by the tree    var thumb;    var nc;    // NetConnection    var ns;    // NetStream    var streamurl;    function VideoThumb() {        // nothing needed - we're extending v2;    }    function init() {        // nothing needed - we don't have any instance variables to initialize    }    function createChildren(Void):Void {        // attachMovie (linkageID, new name, depth)        var v = this.attachMovie("VideoHolder", "thumb", 0);        v._width = 80;        v._height = 60;        v.styleName = listOwner;        var c = createLabel("label", 1);        c.styleName = listOwner;        c.selectable = false;    }    // pass all sizing from the tree to the cell    function size(Void):Void {        label.setSize(label.getPreferredWidth(), label.getPreferredHeight());        label._x = thumb._width + 10;        label._y = thumb._height / 2 - label._height / 2;    }    // str is the suggested string to render from the tree (based on the node)    // node is the entire XMLNode for the row    // sel is the selected state (not usually used)    function setValue(str:String, item, sel) {        _visible = item != undefined;        if (!_visible) {            return;        }        label.setValue(item.attributes.name);        //trace(item.attributes.name);        // Thumbnail is picked up as the first frame of the playlist        var url = item.attributes.url;        var stream = item.attributes.thumb;        var start = item.attributes.thumbpos;        //grab jpg thumbnail instead of initiating stream        var newClip = this.createEmptyMovieClip("thumbie", this.getNextHighestDepth());        newClip.loadMovie("thumbs/" + stream);        // If explicit thumb is not specified use the        // start frame of the first stream        if (stream == undefined) {            stream = item.childNodes[0].attributes.name;            start = item.childNodes[0].attributes.start;        }        // Give up if we still don't have valid thumb info         if (stream == undefined) {            return;        }        // Render the thumbnail only if necessary         if (streamurl == url + "/" + stream) {            return;        }        streamurl = url + "/" + stream;        //trace( streamurl );        trace(stream); 
            }    // ensures the cell is centered vertically properly - luckily, the label also implements this method.    function getPreferredHeight() {        return 60;    }    function getPreferredWidth() {        return label.getPreferredWidth();    }}

I've also zipped up the source files and uploaded them, they can be downloaded from here.

Thank you in advance.
James

Text Format Property: Leading (=text Spacing, BUT)
Hi!

In Flash it is possible to set the line spacing to a negative value - with the result of tighter lines.
It is also possible to define line spacing via ActionScript (.leading property of text format), but it is not possible to set negative values.

I really need those text lines with less spacing than 0pt.

Does anyone know how to fix this problem? Maybe a workaround?

Thank you!

Tensile

Set Text Property Of Dynamic Text Via Actionscript
I am using a form application, and am trying to setup a login screen. On the login screen I have a text field named txtDisplay. The field is set to DynamicText.

I want to use this text field to display a message back to the user if their login fails. In testing, I am trying to set the text property to some test string when a button is clicked. Here is the code that I am using:

on(click) {
txtDisplay.text = "TEST"
}

I know that the on(Click) event fires, because I used this same even to show a different form within the application, and it worked fine. I just can't seem to be able to set the text value of this object. I have tried using a label component, and again was unsuccessful.

The instance name of this form is login. This is a nested form under the toplevel form cms - if that helps.

Any help on this is greatly appreciated.

Thanks,
Ron
rivey@izinteractive.com

Text Property
Is there anyway I can change the text property? say from input text type to just static type using actionscript?

Problems With .text Property
Hi out there.

I´ve just been working with Flash for a couple of weeks and I´ve found my first serious problem.

I use loadVariablesNum to read a variable from an external text file:

loadVariablesNum("top1.txt", 0);

Then I show the content of this variable in a dynamic TextBox. This is OK.

The problem appears when I try to asign this content to another variable to work with it later. I thought I could do something like this:

var x = _root.textBox.text;

but it doesn´t work. And if anfter that I write

trace(x);

I find that the variable x has nothing inside.

Could somebody help and tell me what´s going on here?

Var Property In Text Field
I am wondering what kind of usage it can have ?
I mean what is different from instance name ?

Thanks,
Keeyong

TextField.text Property
hey guys!!
PLz tell me if TextField.text property is only for string?? To be clear, I want to retrieve value for an Array from input text fields placed on stage.THe function is actually to get an average where I need value for variable sum.
Script I have written is below-

function average() {
var sum = 0;
var numbers = arguments.length;
i = 0;
while (i<=arguments.length) {
sum = sum+arguments[i];
i++;
}
trace(sum/numbers);
}
average(fld1.text,fld2.text,fld3.text);///here it takes input numbers in text fields (i.e. instance name txtfld1 and so on)as string and does calculation.


What do I do if I want those values as numbers???(ouchhhh...is it a stupid question??)

Property Of Text Field
i'm trying to change text color in some text field when i click on button.. but i wont work if i load "txt" file to that text field and then try to change color..

Modifying .text Property
Hey folks,

I'm having an issue which I can't seem to find an explanation for (I'm not very experienced with AS 3.0). I've created a simple button graphically in Flash (and set the linkage appropriately). In the following code, I (think I) treat the button I've created as a class, creating three instances of that button (One, Two, and Three) programmatically. Regardless, that worked fine. I decided I would like to label those buttons in the code. So, when I created the button graphically, I included a text field to which I gave the instance name buttonText; this is where the problem lies.

When I test the movie, clicking on the any of the buttons gives me the following error: TypeError: Error #1010: A term is undefined and has no properties. at Streamline_fla::MainTimeline/buttonResponse() which I assume is coming from buttonOne.buttonText.text = "Ha!" in the code below. However, when I change the symbol for genericButton from type Button to type MovieClip it works fine. So, the question is, is there someway I can modify my code to make this work when the type is set as Button?

I might anticipate that folks would (reasonably) suggest I just use a movie clip or create the text field programmatically. Based purely on personal preference, I'd rather figure out a way to fix the code below so it works with a graphically created button and text field.

Thanks much,

Tap


var buttonOne:genericButton = new genericButton();
var buttonTwo:genericButton = new genericButton();
var buttonThree:genericButton = new genericButton();

stage.addChild(buttonOne);
stage.addChild(buttonTwo);
stage.addChild(buttonThree);

buttonOne.y = 100;
buttonTwo.y = 100;
buttonThree.y = 100;

buttonOne.x = 100;
buttonTwo.x = buttonOne.x + 200;
buttonThree.x = buttonOne.x + 450;

function buttonResponse(event:MouseEvent):void
{
switch (event.target)
{
case buttonOne:
buttonOne.buttonText.text = "Ha!"
trace("Button One was Pressed");
break;
case buttonTwo:
buttonTwo.buttonText.text = "Ha ha !"
trace("Button Two was Pressed");
break;
case buttonThree:
buttonThree.buttonText.text = "Ha ha ha!"
trace("Button Three was Pressed");
break;
}

}

buttonOne.addEventListener(MouseEvent.MOUSE_DOWN, buttonResponse);
buttonTwo.addEventListener(MouseEvent.MOUSE_DOWN, buttonResponse);
buttonThree.addEventListener(MouseEvent.MOUSE_DOWN , buttonResponse);

Dynamic Text Set Property ?
Hi

I have a function which is duplicating an object each time i click on a button. Everything is fine except for the setting the dynamic text within the object i am duplicating.

I actually have a counter which is naming the duplicated movies and its this counter which i need to insert into the dynamic text. I'll show my code.


ActionScript Code:
var count = 1;

add_box_table.onRelease = function(){
    duplicateMovieClip (_root.box0_mc, "box"+count+"_mc", count);
    setProperty ("box"+count+"_mc", _x, 200);
    setProperty ("box"+count+"_mc", _y, 200);
   
      //Problem Area
      //_root["square"+i+"_mc"].number_txt.text = count;
    //setProperty ("square"+count+"_mc", ??number_txt.text??, count);

    count++;

    }

I've tried everything but it simply wont duplicate the movie clip and insert the incremeneted number.

Thanks for your help.

Dynamic Text Property
i have a dynamic text box with the name 'prodName'

in the actions layer I have set prodName.text = "something"; prodName.textColor = 0x000000

When I test it, the color code works fine, but the dynamic text doesnt. I have tried htmlText on and off. Tried embedding and not embedding. Cant figure out why this wont work. I have done this before, what am I missing this time?

chers
mm66

Dynamic Text Box - Var Property
I have set up dynamic text box in flash which loads an external text file when the movie is played. my text file looks like this:

Quote: &text=Welcome
&text2 = Hello
&text3 = Goodbye

so in flash i have to set the var property to f.ex 'text'.

I want code which will allow me to change the var property of a dynamic text box.

Can ne 1 help. Thanx

Dynamic Text And Alpha Property
is it just me? but dymanic text dosn't seem subject to setting the _alpha property..even if the text is in a movie clip and you try setting that clips alpha, the text just shines through..any ideas?

thx

Alpha Property Of Dynamic Text Box
I am trying to set the alpha property of a movie clip with the following actionscript:

_root.movieclip._alpha = 20;

the problem I'm having is that the movie clip contains a dynamic text box and while the rest of the contents of the movie clip dim to the 20% alpha setting, the dynamic text remains at 100%.

Any thoughts on how to make the dynamic text dim as well would be greatly appreciated.

Thanks,
Brian

Text Instance And Alpha Property
Hi everybody:
I am trying to make "dissapear" an instance from flash5 actionscript, putting its alpha propierty into 0. But I have just found out that, when that instansce consist of text, nothing happens.
However, It turns into 0 easily manually, when I change the property from main panel.
Any suggestion?
Thanks in advance.

Gone Mad --alpha Property For Text Fields?
the book says you can do this but ... not sure what I am doing incorrectly. I have created a text field -- _root.createTextField("myField", 10, 20, 50, 200, 30);
but when I then add the code myField._alpha = 40 (or whatever value) it does nothing to the text field value. Im going mad, if anyone could shed some light, would be very greatful. ta k

Changing .text Property From Eventhandler
Code:
var FacilityPassListener = new Object();
LName.addEventListener("focusIn", LNameListener);

LNameListener.handleEvent = function(eventObj) {
trace("listener is LNameListener"); //as expected
if (eventObj.name == "focusIn"){
login_mc.myText._y = row2; //no change
login_mc.myText.text = "enter name."; //no change
}
I'm able to fire the correct event via the inputtext control (LName) but I can't get the code inside the handler to control the text field.

I've reviewed notes on the delegate class but that doesn't appear to apply to this situation. Or does it?

Passing To Object.text Property
I can't understand why the text string will not pass to the variable userAnswer.

AnswA.distractor.text = "My text string here";
userAnswer = AnswA.distractor.text;
trace(userAnswer);

I can't get the string to trace, i've tried other formats including...
trace(AnswA.distractor)//0
trace(AnswA.distractor.text)//0

thank you

iaustin

Changing Text Property Using Script
I'm using 3D Flash Animator. I have an action where I need to change the "text" property of a text element. The problem is the .text property is not changable. I can trace and see the correct output (Example: my element is Text10, the following code outputs the correct value...

Trace(element("Text10").text)
outputs 11 (my original text)
Trace(getDate())
outputs 31 (todays date)

I can use following without errors:

element("Text10").text = getDate()
element("Text10").show()

My element shows, but it's still 11

I need to display and change the current date and it's not feasable to have 31 elements to do this.

ARGH!!!!!!!!!!!!!!!!!!!!!!!!!!
HELP!!!!!!!!!!!!!!!!!!!!!!

my email is webmaster@jerseythings.com

Also, where do I report bugs in 3D Flash Animator?
Thanks in advance.

[F8] _x Property Of A Dynamic Text Field
Hello there.

I want to generate a dynamic text field in action scrip, but I want the length to dynamically adjust to suite the load of the external txt file. So when I change the text I won't have to adjust my text fields or action script.

Can this be done and if so, how would I go about doing it?

Thank you,

RSB

Alpha Property For Dynamic Text
How to apply alpha rpoperty for dynamic text.

Thanks in advance

Dynamic Text _height Property?
guys,

i have this problem from my client.

please download this file:

www.sooonism.com/dynamictext.zip

there i have posted questions and detail explaination on what i wanted to do. tahnks for helping.

Setproperty. Property Of Dynamic Text Box?
Given this:


Code:
setProperty ( target, property, value);
What is the property name for dynamic text boxes? Here is what
i'm trying to do:


Code:
setProperty(_root.PromoLink.LinkText, _text??, "Hello world!");
So what do i put as _text?? i.e. if i wanted to change the alpha it
would be _alpha but what if i want to change what is in the text box?


thanks

Alpha Property Not Working With Text
I have created a simple motion tween with a MovieClip created from a text phrase created in Flash and have tried to set the alpha index to got from 0% at the beginning of the tween to 100% at the end. Here is the problem, the tween works great, however the alpha value is not working AT ALL. It works with MovieClips created using jpg and png images imported into flash, however if I use text inside flash and convert that to a MovieClip it will not work. I am not using actionscript, I am only working with the timeline and property inspector. What is going on and why will this not work? I have searched the forum and it seems I am the only idiot who is having a problem like this. Can anyone please help me out? Also, I am using Flash 8.

Thanks!
Chuck

Accessing Text Property In Class
I'm having problems accessing the .text property of text fields in my object. When I try to reference the text field outside of function responsible for creating the text field I get "1120: Access of undefined property titleField." Any insight is appreciated. Thanks!







Attach Code

//constructor function
public function Panel(panelTitle:String,
panelWidth:Number,
panelHeight:Number,
panelX:Number,
panelY:Number,
panelType:String = "",
panelText:String = ""):void {
this.panelTitle = panelTitle;
this.panelWidth = panelWidth;
this.panelHeight = panelHeight;
this.panelX = panelX;
this.panelY = panelY;
this.panelType = panelType;
this.panelText = panelText;
}

//add/format the title field
protected function addTitle():void {
var titleFormat = new TextFormat();
titleFormat.font = "Helvetica";
titleFormat.bold = true;
titleFormat.color = 0x444444;
titleFormat.size = 11;
titleFormat.letterSpacing = 2;

var titleField:TextField = new TextField();
titleField.defaultTextFormat = titleFormat;
titleField.x = getPanelX() + 5;
titleField.y = getPanelY() + 5;
titleField.autoSize = TextFieldAutoSize.LEFT;
titleField.name = "titleField";
setPanelTitle(titleField, getPanelTitle());

addChild(titleField);
}

protected function addTextArea():void {
var panelTextArea = new TextArea();
panelTextArea.setSize(getPanelWidth() - 10, getPanelHeight() - 25);
panelTextArea.move(getPanelX() + 5, getPanelY() + 20);
panelTextArea.editable = false;
setPanelText(panelTextArea, getPanelText());

addChild(panelTextArea);
}

//declare get/set methods
public function getPanelTitle():String {
return panelTitle;
}
public function setPanelTitle(theTextField:TextField, theText:String = ""):void {
theTextField.text = theText;
}
public function getPanelText():String {
return this.panelText;
}
public function setPanelText(theTextArea:TextArea, theText:String = ""):void {
theTextArea.text = theText;
}

Cannot Set .text Property Of Txt Field On Button
Hi,

having problems setting the .text property on a textfield that is on a button symbol..


Code:
btn_top.txt_1a.text = "hi";
I copied the textfield on put it straight on the stage and doing this I was able to set the .text property, so I know that the other properties of it are correct - dynamic etc.

btn_top is the instance name of the button.

thanks

[Textfield] No Alias Text Property?
Am I missing something here? Is there a alias text property to textfield?
Because there should be! Again (just like with the skewing thing) Macromedia forgot to implement AS for this feature, didn't they... ?

Heup!

Problem With Dynamic Text Scroll Property
Here's the deal :
I have a simple dynamic text box named "txt" and 1 simple button having an "on(release)" action which is
txt.scroll = txt.scroll + 1;

That works fine when the text and button are in the main timeline on a single frame.
Now if I select the 2 items and convert them into a MovieClip BAOUM doesn't work anymore !
I tried to change the button action to
_root.[clipname].txt.scroll = _root.[clipname].txt.scroll+1;
-> nuts !
I even tried a simple
trace(_root.[clipname].txt.scroll);
just to see the actual value -> NOTHING !!!

BUT if I do a
_root.[clipname].txt = "new text";
the text is actually changing !!!

I'm close to nervous breakdown so I'll promote to GOD level anyone who could help me !!! :-)

Thanks by advance.

A Read-only Property For Focus In Text Fields
a boolean property, is the focus there or not? is there anyway to mimic this? thanx in advance

How To Access The Text Property In A Dynamic Button?
Flash 8 Issue.

I have a button that has a text object in it (aside from some graphic of course). I am trying to set the text dynamically and I can't seem to get it to work because I don't seem to know the proper class to call:

btn = _root.attachMovie("navButton_symbol", "myButton"+i, i);
btn._y = i *50;
btn.text = "please work this time!";

The buttons do render properly and all that other stuff works.

On the button library object the text is set to dynamic and has the name of btnLabel. But I have tried addressing it as btn.btnLabel.text and btn.btnLabel and all of the other permutations I can think of. As you can see the buttons have dynamic names so this is presenting me with this challenge. What is the proper way to address this text field so I can set the text to a value that I need?

btn.btnLabel.text = "I am totally lost!";

I tried to do this with an init object, but that seems to lead me to the same dead end.


-sed

Copyright © 2005-08 www.BigResource.com, All rights reserved