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




Varible Text Box Will Not Display Correct Info



I am an amiture so please forgive my code. I got my varible text boxes to preview a random number. The random numbers are assigned to text, however the varible text box seems to only want to display the number. I am attaching my file for your viewing pleasure. I appreciate any help, I've been racking my brains for 3 hrs now.



FlashKit > Flash Help > Flash ActionScript
Posted on: 06-25-2004, 08:07 PM


View Complete Forum Thread with Replies

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

Display Info In Dynamic Text Field
I need to have a dynamic text field look up one movie clip and get the text shown in a different dynamic text field. Then display that text. Is there a way to do this?

Correct Totalbytes Display For Preloader
I have five external swf files that I load into different movieclips within my main movie by using the loadMovie command. Everything works fine, but the variable that should contain the total byte amount of all five external files only has its correct value after some time and not immediately. Thatīs a little annoying because I want to display that total amount in a dynamic text field while the content is being loaded. But I donīt want the value to change, i.e. to increase in several steps up to the real loading amount as the user doesnīt reliably see how long he will have to wait.

So hereīs my question:
is there any trick how to get the correct value in my variable as fast as possible (without setting it manually)? I tried to put an empty frame at the beginning of each of my external movies and experimented with the loading order in their publishing settings (upwards/downwards), but nothing really changed...
I understand that my target movieclips can only give a correct value for my mc.getBytesTotal() routine after the external swf has begun loading, but can I somehow force the loading of each of them to begin simultaneously and not one after the other? My loadMovie commands are all in the same frame of the main movie so I donīt see how I could get them even closer to each other?
I also see the possibility to wait with displaying the total amount until every target movieclip has a getBytesLoaded or getBytesTotal value > 0, but thatīs not how it is intended to work: then I would only have a display when the last movie has begun loading...
Or is there a way to directly access the byte size of the swf file so I donīt have to wait for the first frames being loaded into the movieclips?

Thanks for any suggestions... Toby.

Correct Local Display, Not Online?
Hello, i got a little trouble here

I have a mc with a button.
Till then, all is normal hopfully

When the button is pressed it should send vars to a php page which will display the var.

So i use this in as:
on(release){
Imp = new LoadVars();
Imp.ref =_root.Detail.Ref;
Imp.send("http://blabla.com//imprime.php","POST");
//where blabla is the webpage of course
}

And in php:
$Ref=$ref;
echo "DETAILS
";
echo urldecode($Ref);
?>


So, what do we have here?..
When i press Ctrl+Enter to see the results, it works! i see another page displaying
DETAILS
H95
where h95 is the Ref..
But when I press Ctrl+F12 to see as html, it displays only DETAILS, not the ref..
Same thing if i publish the page online...
Where am i wrong??

Page Transition Wont Display Correct
For some reason i cant figure out how come my alpha tween isnt showing up. The sliding motion tween is fine but it should alpha also and its not doing so. How can i get it to do so? Thanks.

How Do You Use A Varible In The Path Of Another Varible In A Condition Statement?
This is part of a load checking script i'm doing

for (i=0; i<split1.length; i++) {
temp = split1[i].split(":");
if (_parent.(temp1).percent == 100) {
trace(temp[1]);
}
}

In this line

if (_parent.(temp1).percent == 100) {

The bit in brackets temp1 needs to be a varible whilst the rest of the path and the varible name needs to be static.

Anyone know how to format the condition like that ?

Matching A URL Variable Against XML File To Display Correct Images
Hi,

What I am looking to do is read a URL variable from within flash and then compare this variable against an XML tree name. Where they match I would like the images within the xml tree to be shown in a slideshow.

The code I have so far is:


Code:
// set random # variables - each must be 0 for first 'while' loop below
var randomNum = 0;
var randomNumLast = 0;

// parent container
var container_mc = this.createEmptyMovieClip("container",0);
// movie clip containers
container_mc.createEmptyMovieClip("loader1_mc",2);
container_mc.createEmptyMovieClip("loader2_mc",1);

// preload watcher
this.createEmptyMovieClip("watcher_mc",100);

// load xml
images_xml = new XML();
images_xml.ignoreWhite=true;
images_xml.onLoad = parse;
images_xml.load("images.xml");
loadVariables("http://www.domain.com/test.html?city="+city, _blank);

function parse(success) {
if (success) {
imageArray = new Array();
var root = this.firstChild;
_global.cityname = this.firstChild.attributes.cityname;
_global.numPause = Number(this.firstChild.attributes.timer * 1000);
_global.order = this.firstChild.attributes.order;
_global.looping = this.firstChild.attributes.looping;
_global.fadetime = Number(this.firstChild.attributes.fadetime);
_global.xpos = Number(this.firstChild.attributes.xpos);
_global.ypos = Number(this.firstChild.attributes.ypos);
var imageNode = root.lastChild;
var s=0;
while (imageNode.nodeName != null) {
imageData = new Object;
imageData.path = imageNode.attributes.path;
imageArray[s]=imageData;
imageNode = imageNode.previousSibling;
s++;
}
// place parent container
container_mc._x = _global.xpos;
container_mc._y = _global.ypos;
// parse array
imageArray.reverse();
imageGen(imageArray);
} else {
trace('problem');
}
}

// depth swapping
function swapPlace(clip,num) {
eval(clip).swapDepths(eval("container_mc.loader"+num+"_mc"));
}

function loadImages(data,num) {
if (i==undefined || i == 2) {
i=2;
createLoader(i,data,num);
i=1;
} else if (i==1) {
createLoader(i,data,num);
i=2;
}
}
function createLoader(i,data,num) {
thisLoader=eval("container_mc.loader"+i+"_mc");
thisLoader._alpha=0;
thisLoader.loadMovie(data[num].path);
watcher_mc.onEnterFrame=function () {
var picLoaded = thisLoader.getBytesLoaded();
var picBytes = thisLoader.getBytesTotal();
if (isNaN(picBytes) || picBytes < 4) {
return;
}
if (picLoaded / picBytes >= 1) {
swapPlace("container_mc.loader2_mc",1);
alphaTween = new mx.transitions.Tween(thisLoader, "_alpha", mx.transitions.easing.Regular.easeOut,0,100,_global.fadetime,true);
timerInterval = setInterval(imageGen,_global.numPause,data);
delete this.onEnterFrame;
}
}
}
function imageGen(data) {
// random, or sequential?
// The below line is my attempt at doing the comparison....
if (_global.order=="random" and _global.cityname==city) {
// choose random # between 0 and total number of images
while (randomNum == randomNumLast) {
randomNum = Math.floor(Math.random() * data.length);
trace(randomNum);
}
loadImages(data,randomNum);
randomNumLast = randomNum;
} else if (_global.order=="sequential") {
// start at 0, increment to total number of images, then drop back to zero when done
if (p==undefined || p==data.length && _global.looping=="yes") { p=0; } else { break; }
loadImages(data,p);
p++;
} else {
trace ("order attribute in xml isn't correct - must specify either 'random' or 'sequential'");
}
clearInterval(timerInterval);
}
stop();


The XML file looks like this:


Code:
<!--
'timer' :: number of seconds between each image transition
'order' :: how you want your images displayed. choose either 'sequential' or 'random'
'looping' :: if the slide show is in sequential mode, this stops the show at the last image (use 'yes' for looping, 'no' for not)
'fadeTime' :: velocity of image crossfade. Increment for faster fades, decrement for slower. Approximately equal to seconds.
'xpos' :: _x position of all loaded clips (0 is default)
'ypos' :: _y position of all loaded clips (0 is default)
-->
<gallery name="london" timer="5" order="sequential" fadetime="2" looping="yes" xpos="0" ypos="0">
<image path="images/1.jpg" />
<image path="images/2.jpg" />
<image path="images/3.jpg" />
</gallery>

<gallery name="manchester" timer="5" order="sequential" fadetime="2" looping="yes" xpos="0" ypos="0">
<image path="images/manchester1">
<image path="images/manchester2">
<image path="images/manchester3" />
</gallery>


So if my link was: http://www.domain.com/test.html?city=london

I want the flash on the page to pull the variable 'london' from the URL and compare it against the 'gallery name' in the XML file and where they match output the images in that XML gallery.

Any ideas?

MP3 Info Display
I want to create a Flash mp3 player (probably an exe or swf) that can be used to play music without having to install a program. Is there a way that I can load the id3 information of an mp3 (or even alter it) in Flash MX?

How Do You Display Info On Mouseover?
I have constructed a scrolling graphics clip with a mask. My mask has 2 windows - upper and lower. As the clip is scrolled my graphics appear in the upper window. As I "mouse over" a graphic I would like to display information about it in the lower window of the mask, and on "mouseout" the info would disappear. Could someone please step me through this or guide me towards the proper tutorial? Any help is greatly appreciated. Thank you.

Help With Resizing Info Display
It isn't scaling right, and I can't determine what exactly the problem is. I got it off of a tutorial I found, and I just can't seem to get it to work quiet right with my layout.

I want the top to keep it's height, and the grey bar on the right to keep it's width, with the text area scaling both ways. Further more, I want the scale button to stay relative to the other parts. Now it just flies off wherever the mouse goes.


Thanks much! Any help is much appreciated!

Display An Info Window
Hi All,

I have a button which when clicked loads a swf file from the library; the button works as a toggle. Now within the loaded swf (from the library) I have a button to remove the infoWindow when this button is clicked. All works perfectly, until I click on the button on the maintimeline again to open the swf from the library; works untill I use the button on loaded swf to remove itself from screen. it will not work and I get the following error:

ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild()
at voiceswfPresenter_fla::MainTimeline/infoWindow()

I have also attached the code ;) Any help much appreciated.

Kind Regards,

Boxing Boom







Attach Code

// Code for Info. Window begin here

infoBtn_mc.addEventListener(MouseEvent.CLICK, infoWindow);
var popWin:Boolean = false;
var square:MovieClip = new squareEx();
square.x = 505;
square.y = 25;

function infoWindow(e:MouseEvent):void {
if (!popWin) {
addChild(square);
mc.stop();
mc.alpha = .8;
square.gotoAndPlay(2);
popWin = !popWin;
} else {
removeChild(square);
mc.play();
mc.alpha = 1;
popWin = !popWin
}
}


square.redSqr_mc.buttonMode = true;
square.redSqr_mc.addEventListener(MouseEvent.CLICK, removeInfo);

function removeInfo(event:MouseEvent):void
{
removeChild(square);
}

























Edited: 07/11/2008 at 05:35:05 AM by Boxing Boom

How To Display Info Like At Http://www.nunomira.com/
How did you set up the scroll/info? Is it pure html? How do the links work?

Display Info For Form On Same Page
Hey all,

I am tring to use a form (radio buttons and drop down list) ....i have it on half of the page and on the other half i want the info they checked to be displayed.

Can anyone help me with this?

Thanks

Display Info From Forms On Same Page
Hey all,

I am tring to use a form (radio buttons and drop down list) ....i have it on half of the page and on the other half i want the info they checked to be displayed.

Can anyone help me with this?

Thanks

Display Info From A Form On Same Page
Hey all,

I am tring to use a form (radio buttons and drop down list) ....i have it on half of the page and on the other half i want the info they checked to be displayed.

Can anyone help me with this?

Thanks

Dynamic Info To Display For Chart
hi,

i have seen a flash chart whereby the chart info are drawn from external sources like xml etc.

so it make the chart info dynamic and will reflect whatever that is being output by the xml or other sources.

i very much like to know how this is done. is there any example, tutorials i can refer to.

pls advice. would very much appreciate any help rendered.

thanks.

Lawrence

Weather Info Display In Flash
Hi,

I have got a weather display file in flash.. I modified it and its working locally.. but on the server the data is not loading. Please have a look at the file attached.

Weather Info Display In Flash
Hi,

I have got a weather display file in flash.. I modified it and its working locally.. but on the server the data is not loading. Please have a look at the file attached.

How To Create A Mouseover Box To Display Info
Hello,

I am still considered new to flash.

I want to do something like the attached pic for our company CD.

Required help:

1. How to create a mouseover box with a data attached?
should XML be used for backend purpose? If yes, please help how.
Should Textfiles(notepad) be used..how can I store data?

2. If the images are very small on the pic like a small bicycle stand in the pic, which is hardly visible will the same style of showing window work?

Any suggestions and help will be appreciated.

Thanks,

Neo

Use Buttons To Display Info Imported From XML?
I'm creating a floating window to display descriptions of my projects. I'd like to put all the descriptions in an XML file and add them to the popup window using an onRelase event on a movieClip button.
In Lee's tutorials, he uses an index to access the various videos and pics in his XML, but here I need to get to them using a name so I can address the elements with a button.

Is this clear? Can anyone help?

Thanks.

Mitch

Backend Scope/info Display Problem
I am using an Apache web server (last release) with a Win 32 OS. When i try to load data into my flash site dynamically on my local machine it works (this is the case for loading XML data from a file or retrieving info from servlets i query). Although when i try to run the site remotely (on a computer not on the network via the internet) it does not load or possibly it just doesnt display. I have absolutely no idea why this happens, so if any one has any ideas please let me know because it is very annoying, and its making my web site a bit.... errrr rubbish.

Thanks in advance!

Display File Name, Info, And Size Dymanically
is there a was for actionscript to get the file name, creation date and file size of a file, and display that information in a dynamic text field?

if it's possible, can the answer be written for the inexperienced actionscripter.... because that's exactly what i am.

thank you, flashkit community.

How To Display Simple Weather Info In Flash
Hi,

Where can i get the weather, in realtime (let's say each 10 minutes), of a specific place like Newyork, Dubai etc and display it in flash ?. I want to incorporate the information into the design that I have made.

How To Display Simple Weather Info In Flash
Where can i get the weather, in realtime (let's say each 10 minutes), of a specific place like Newyork, Dubai etc and display it in flash ?. I want to incorporate the information into the design that I have made.

Display File Name, Info, And Size Dynamicaly
is there a was for actionscript to get the file name, creation date and file size of a file, and display that information in a dynamic text field?

if it's possible, can the answer be written for the inexperienced actionscripter.... because that's exactly what i am.

thank you, ultrashock community.

Using Video Caption To Display Product Info
Hi everyone,

I have a question:
What would be the best way to add an image and a link to a playing video.
I have this project where I'm going to have a video that contains video reviews of more than one product. What I'd like to do is when a specific product is being reviewed, for example an ipod to be original, on top of the video I display a link and an image to buy the product.

I tried doing this using the caption component, it's kind of working but the image is flashing I don't know why. This is what I have in my xml file :
.....
<p begin="00:00:35.00" end="00:02:00.00"><a href="#" target="_blank"><img src="images/51607743_50.jpg" /></a>Camera button</p>
.......

Is there a better way to do what I'm trying to do, like not using caption but something else?

Thanks a lot in advance!

Display Info By Date (from Access Database)
I am trying to set up a dynamic page that automatically displays information from a database, that is specific to the current date. For example, at midnight tomorrow morning, the page would automatically display content specific to July 6th, and then would update to July 7th information on the following midnight, etc. Any ideas on the best way to accomplish this? Thanks so much!

Varible & Text In Same Txt Box.
Sorry for the n00b-ness of this post, But I am still learning proper syntax.
I am just trying to make a text box display a percentage and want the % attached to the end of the variable. What is the proper syntax? Thanks in advance!

Dynamic Text + Varible Help
First of all thanks to all the people that have put in tutorials and help with Flash. I have a very productive addiction now and blame you all for it.

Im using Flash 5.0

Main Question:
If this is answered i can figure out someway around my other problem.
Is it possible to include a variable value in the output of a dynamic text. (ie. Color= Blue , Output text "Your (color) shirt").


Problem:


Root>Movie1>Movie2

I want a varible within Movie2 to manipulate a dynamic text box within
Movie1 without putting the dynamic text box in the root. Its very easy to target a movie clip to any other movie clip but i can't seem to figure out how to use the varibles inside each the way i intend

From Varible To Text Field Problem...
Alright, This is the problem I am having. Im just not getting this why it is doing this.

Ok.. I have this Movie the first thing it does it load a txt file in to the movie. it sends User Name "Billy" to /:name1. When it finishes loading it checks to see if Billy is in /:name1.
This is the codeing I have so far.

If (/:name1 eq "Billy")
Go to and Stop (Scene 2, 1)
Else
Go to and Stop (25)
End If

The problem I'm having is, It goes to ' Go to and Stop (25)'.
The 'Billy' is correct. But it doesnt run it.

Little Help here?

Thanks!

Make A Text Box Desplay A Varible Value?
Make a text box desplay a varible value?

I have:

_root.total = smallweapon + largeweapon

What should i have?

Send A Varible From A Text Box To A Url In Actionscript 3.0
well i'm just learning 3.0 and know how to do this in 2.0 but need to know how in 3.0. I basically need to send a variable that a user types in and send that variable to the url string.. here is the code I have but it's not working and instead of sending a variable it sends the words [object textfield] to the url


ActionScript Code:
stop();


search_input.text = '';

function ButtonEventHandler(eventObject:Event):void{

            var btnName:String = eventObject.target.name.split('_').shift();

            var search:String = search_input.text;

            MovieClip(parent).gotoLink(btnName, search);

}

//var Name=escape(search_input.text)

var link:URLRequest = new URLRequest("http://www.mysite/somepage/search/search.php?query="+ search_input +"&search=1");

search_mc.addEventListener(MouseEvent.CLICK, onClick);

function onClick(event:MouseEvent): void

{

            navigateToURL(link);

}

 

search_mc.buttonMode = true;

anyone have any ideas what i'm doing worng or how to correctly do this?

Can I Change Dynamic Text Boxes Varible Names Via Script?
I just have some dynamic text boxes inside a movie clip and I want to be able to change their names via action script, so the can take data from an external txt file. For example there is "myTitle1", "myTitle1a", and "MyText1". How can I call from the same txt file to the same boxes "myTitle2", "myTitle2a", and "MyText2"? If anyone can help the will be my personal actionScript hero(s)!!!

[F8] How To Create A "cloud" Style Info Display
Greetings. I'm trying to achieve a dinamyc display similar to youtube wrap. I have a database with people and a database with relationships (A is friend of B, B is friend of C).

Does anyone know of a component or some guidance to how to start developing a cloud style display, like a universe, where every user is planet, and you can see the other pepole linked to it, and you can click on them to move around?

I don't know how to call it, or how to search it, does this have a name?

Thanks ahead.

Display Info Of Playlist Items - "like Lee"
On gotoandlearn.com, Lee's playlist items will have information associated with each of them. In other words, when an item is selected from the playlist, information about the video is displayed below the playlist (including title and an option to download specific files).

How Do I Do This

I looked on Lee's site and DLed the site, but I don't understand how to integrate that code with his code in the video tutorials. Here is the code for his site's playlist:

Code:

var tl = tutorialList.tutList;

tl.setStyle("color", 0x000000);

tl.setStyle("rollOverColor",0xD6E0EB);
tl.setStyle("backgroundColor", 0xFFFFFF);
tl.setStyle("textRollOverColor",0x000000);
tl.setStyle("textSelectedColor",0x000000);
tl.setStyle("selectionColor",0xD6E0EB);
tl.setStyle("fontFamily","standard 07_56");
tl.setStyle("fontSize",8);
tl.setStyle("embedFonts",true);

tl.iconFunction = function(item) {
   if(item.data.indexOf("aftereffects")!=-1) return "ae";
   if(item.data.indexOf("flash")!=-1) return "flashIcon";
   if(item.data.indexOf("swift")!=-1) return "swiftIcon";
   if(item.data.indexOf("photoshop")!=-1) return "photoshopIcon";
   
}

var listlist:Object = new Object();
var lsound:Sound = new Sound();

lsound.attachSound("been");

listlist.itemRollOver = function(obj) {
   if(obj.index < vidArr) {
      infoTip.info.text = _root["tut"+obj.index].info;
      infoTip._x = _root._xmouse;
      infoTip._y = _root._ymouse;
      infoTip._visible = true;
      infoTip.onMouseMove = function() {
         this._x = _root._xmouse;
         this._y = _root._ymouse;
      }
      lsound.start();
   }
   
}

listlist.itemRollOut = function() {
   delete infoTip.onMouseMove;
   infoTip._visible = false;
}


listlist.change = function() {
   if(tl.selectedIndex < vidArr) {
      ns.close();
      np.timetext.text = "Loading File...";
      playtime(_root["tut"+tl.selectedIndex].earl);
      np.info.text = _root["tut"+tl.selectedIndex].info;
      np.title.text = _root["tut"+tl.selectedIndex].title;
      if(_root["tut"+tl.selectedIndex].files.indexOf(".zip")!=-1) {
         np.files.htmlText = "<a href="files/"+_root["tut"+tl.selectedIndex].files+"">"+_root["tut"+tl.selectedIndex].files+"</a>";
      }
      else {
         np.files.htmlText = "<font color="#000000">"+_root["tut"+tl.selectedIndex].files+"</font>";
      }
   }
}

tl.addEventListener("itemRollOut",listlist);
tl.addEventListener("itemRollOver",listlist);
tl.addEventListener("change",listlist);


Attempts
Obviously, the key is with the listlist.change, but it doesn't work when I copy the information below it below the videoList.change in his tutorial. Yes, I did create a MC with the instance name "np" and the appropriate dynamic text fields.[/code][/b]

Correct Input Text
[size=2][color=Black]

i am working with an exercise in flash. i use input text so the user can input an answer. i also create a check button to check if the answer is correct.

this is the code in check button:



on (release) {

if (box1 == 28.26) {

setProperty(good, _visible, 1);

} else {

setProperty(no, _visible, 1);

}
}



this code will show a happy face if the answer is right (instance name of happy face is good) and if the answer is wrong a sad face will appear (instance name of sad face is no).

the problem? whenever i input the right answer, which is 28.26, the sad face will appear. but, 28.26 is the right answer. i don't know what's wrong.

can anyone help?

thank you in advance

Plz Correct ASed Text Effect
Overview:
-------------------------------


I am currently designing a website for a catering company. I tried scripting text effects. I started by splitting the required text into an array of characters so that each character can be movie clip of it's own. I have used the given actionscript to do just that.

I had a lot of problems and a hell lot of time consumed just to get this much of script to work. It successfully displays the movie clips on the screen with the characters in the array. In this case : "Hello there".


The setting:
-------------------------------


Movie Clip:
Name : movText2; Instance name: movText2

|->Movie Clip:
Name: movText; Instance name: movText

|->Text Box:
Dynamic; Instance: Txt; Variable: Letter


The Problems:
-------------------------------


--> After some testing, I found that if the number of characters is more than 10, the last character simply disappears.

--> The main problem: the movie just won't play. If I animate the movie clip and it is duplicated with the script mentioned below, only the parent / original movie clip will animate. The rest will just remain static.



ActionScript:
-------------------------------

rawstr = "H e l l o t h e r e";
str = rawstr.split(" ");
movText2.movText.Txt.AutoSize = true;

x = movText2.movtext.txt._x;
y = movText2.movtext.txt._y;

movText2.movText.duplicateMovieClip("z", -2);
movtext2.movtext._visible = false;
movtext2.z._visible = false;

for (i=0; i<length(str)/2+1; i++) {

if (i == 0) {

duplicateMovieClip(movText2.z, "z"+i, i);
setProperty("movText2.z0", _x, 10);
movText2.z0.letter = str[0];

} else {

movText2.z.duplicatemovieclip("z"+i, i, new Init());
setProperty("movText2.z"+i, _x, 10+i*10);

}
}

function Init() {

this.letter = str[i];
this.gotoandplay(1);

}



----------------------------------------------------------------

Sincere help will be appreciated. Thanks in advance.

Displaying Correct Title Text And Next Btn
Hi am trying to get my mp3 player to display the correct track title as well as fix my next button. Right now I have:

ActionScript Code:
function checkXML() {
    if (count == 0) {
        prevBtn.gotoAndStop("prevUp");
        prevBtn.enabled = false;
    } else {
        prevBtn.enabled = true;
    }
}
audioxml.load("audiofeed.xml");
var mp3:Sound = new Sound();
function startMP3(songNum:Number):Void {
    checkXML();
    mp3.loadSound(songs[songNum], true);
    trackTitle.text = titles;
    mp3.onSoundComplete = function():Void  {
        count++;
        if (count<totalNodes) {
            startMP3(count);
        } else {
            count = 0;
            startMP3(count);
        }
    };
}


////button control////
this.pauseBtn.onRelease = function() {

}
this.playBtn.onRelease = function() {

}
this.nextBtn.onRelease = function() {
    count++;
    startMP3(count);
}
this.prevBtn.onRelease = function() {
    count--;
    startMP3(count);
}

The titles are displaying, however they are displaying every single title. I know it is obvious since I have
ActionScript Code:
trackTitle.text = titles;
but I dont know what else to put there.

And for my next button, basically I want it disabled if there is no more songs on the list. My previous button works fine. I just did if count == 0 in the array disable the button. I tried doing the same thing for the next by doing:

ActionScript Code:
function checkXML() {
    if (count == 0 or count == audioxml.firstChild.childNodes.length) {
        nextBtn.gotoAndStop("nextUp");
        nextBtn.enabled = false;
        prevBtn.gotoAndStop("prevUp");
        prevBtn.enabled = false;
    } else {
        nextBtn.enabled = true;
        prevBtn.enabled = true;
    }
}

That isnt working to great. Any suggestions of ideas? You can view the site at http://blindedblack.airboxstudios.com

All Correct For Text Boxes In Flash Mx
I have an interactive assignment in which the students have to enter text entries into an input box. I have it working to where when the enter the correct answer it will tell them, or if it's wrong. I need to be able to tell them when they get to the last question, after they have gotten all of them correct, that they got all the questions correct. I know how to do this with a drag and drag interaction but not text entry. can someone point me in the right direction? it's not really scored, just keeping up with if they are all correct. thanks

Help, Please 2 Clicks To Load Correct Text?
I'm loading dynamic text into a textField created at runtime. The problem is that you have to click the button twice to see the correct text. The previous text won't clear on the first click.

Go to this link Web Site and click on "Our Work" then click on one of the categories to see what I'm talking about.

Here is the function to create the textField:
// Create TextField and load text
function makeTxtBox(txtFile) {
var txtFile;
this.createTextField("txtBox",1,87,-58,358.4,198);
txtBox.multiline = true;
txtBox.wordWrap = true;
txtBox.border = false;
txtBox.embedFonts = true;
this.loadVariables(txtFile);
txtBox.variable = infoText;
txtBox.text = infoText;
defaultFormat = new TextFormat();
defaultFormat.font = "FuturaFont";
defaultFormat.size = 10;
defaultFormat.color = 0x666666;
txtBox.setTextFormat(defaultFormat);

Here is the callback:
makeTxtBox("pathToTextFile");

All Correct For Text Boxes In Flash Mx
I have an interactive assignment in which the students have to enter text entries into an input box. I have it working to where when the enter the correct answer it will tell them, or if it's wrong. I need to be able to tell them when they get to the last question, after they have gotten all of them correct, that they got all the questions correct. I know how to do this with a drag and drag interaction but not text entry. can someone point me in the right direction? it's not really scored, just keeping up with if they are all correct. thanks

Help, Please 2 Clicks To Load Correct Text?
I'm loading dynamic text into a textField created at runtime. The problem is that you have to click the button twice to see the correct text. The previous text won't clear on the first click.

Go to this link Web Site and click on "Our Work" then click on one of the categories to see what I'm talking about.

Here is the function to create the textField:
// Create TextField and load text
function makeTxtBox(txtFile) {
var txtFile;
this.createTextField("txtBox",1,87,-58,358.4,198);
txtBox.multiline = true;
txtBox.wordWrap = true;
txtBox.border = false;
txtBox.embedFonts = true;
this.loadVariables(txtFile);
txtBox.variable = infoText;
txtBox.text = infoText;
defaultFormat = new TextFormat();
defaultFormat.font = "FuturaFont";
defaultFormat.size = 10;
defaultFormat.color = 0x666666;
txtBox.setTextFormat(defaultFormat);

Here is the callback:
makeTxtBox("pathToTextFile");

Displaying Correct Title Text And Next Btn
Hi am trying to get my mp3 player to display the correct track title as well as fix my next button. Right now I have:
Code:

function checkXML() {
    if (count == 0) {
        prevBtn.gotoAndStop("prevUp");
        prevBtn.enabled = false;
    } else {
        prevBtn.enabled = true;
    }
}
audioxml.load("audiofeed.xml");
var mp3:Sound = new Sound();
function startMP3(songNum:Number):Void {
    checkXML();
    mp3.loadSound(songs[songNum], true);
    trackTitle.text = titles;
    mp3.onSoundComplete = function():Void  {
        count++;
        if (count<totalNodes) {
            startMP3(count);
        } else {
            count = 0;
            startMP3(count);
        }
    };
}


////button control////
this.pauseBtn.onRelease = function() {

}
this.playBtn.onRelease = function() {

}
this.nextBtn.onRelease = function() {
    count++;
    startMP3(count);
}
this.prevBtn.onRelease = function() {
    count--;
    startMP3(count);
}


The titles are displaying, however they are displaying every single title. I know it is obvious since I have Code:

trackTitle.text = titles; but I dont know what else to put there.

And for my next button, basically I want it disabled if there is no more songs on the list. My previous button works fine. I just did if count == 0 in the array disable the button. I tried doing the same thing for the next by doing:
Code:

function checkXML() {
    if (count == 0 or count == audioxml.firstChild.childNodes.length) {
        nextBtn.gotoAndStop("nextUp");
        nextBtn.enabled = false;
        prevBtn.gotoAndStop("prevUp");
        prevBtn.enabled = false;
    } else {
        nextBtn.enabled = true;
        prevBtn.enabled = true;
    }
}


That isnt working to great. Any suggestions of ideas? You can view the site at http://blindedblack.airboxstudios.com

Loading Text Files Info Text Fields On AS3
Hey guys, I am following some examples from Flash CS3 Help files and some portions of the ActionScript 3.0 Cookbook on TextFields. Here's the code I currently have on my first frame of the timeline. When I test the file, I get "TypeError: Error #2007: Parameter text must be non-null. at flash.text::TextField/set htmlText() at textFields_fla::MainTimeline/textFields_fla::frame1()"

What's wrong?









Attach Code

import flash.display.Sprite;
import flash.events.*;
import flash.net.*;

var source:String = "html.txt";
var dataFormat:String = URLLoaderDataFormat.TEXT;


var loader:URLLoader = new URLLoader();
loader.dataFormat = dataFormat;
var request:URLRequest = new URLRequest(source);
loader.load(request);


var myT:TextField = new TextField();
myT.autoSize = TextFieldAutoSize.LEFT;
myT.width = 300;
myT.wordWrap = true;
myT.htmlText = loader.data;
addChild(myT);

[F8] If Entered Text Is Correct, Goto And Play
stop ();

if ans_1 = ("50") {
play();
)

I have that so far.

What am i doing wrong??

(the dynamic input box is called ans_1).

Many Many Many thanks

What'are The Correct Settings For Dynamic & Input Text?
Hello everybody..

I did a website and checked it in different computers and the font changes in one of the computers.

The entire website is done with flash 8. I don't understand why it does that.

What is the best way to use Dynamic & Input Text? so the quality or the font itself do not change?

These are the settings I have for the font are:
Font: standard 07_53,
Anti-Alias for readability
Auto-Kern selected

Correct Text In A Text Field?
How do i get flash to check if someone has written correct text into a text field box and then click a button next to the text field. This button would then see if the answer in the text field is correct and then either proceed to another frame or clear the text field for that person to try again.

Thanx

Easier Way To Compare Text Input To Correct Answer?
Hi All,

I have 20 textfields that a user can enter a value into, then each of these values is compared to the correct answer for that question.

At the moment I have 20 'if' statements.
if (String(CONST_1) == String(_level0.content.sum1)){
numberCorrect++;
trace("Got one more correct" + rightcount);
}
if (String(CONST_2) == String(_level0.content.sum2)){
numberCorrect++;
trace("Got one more correct" + rightcount);
}
.........

sum1,sum2,etc. are the input fields.
CONST_1,CONST_2, etc. are the answer constants.

This works, but seems like an ardous way of doin it, especially if I have to make 100 textfields rather than 20 later on.
Ive tried sticking this code into a 'for' loop, but with no success.

Can any of you guys think of a better way of doing this?

Thanx in advance,
Dwayne

LoadVars, Variable Traces Correct But Text Doesn't Change
I'm not by my code at the moment, but I've used the loadVars object to load a series of variables from a file called configurations.txt.

These are the captions to a series of dynamically loaded images, a series of small slide shows I've been working on.

There's a global variable called imageCounter which designates which image and caption to load. The next button adds 1 to imageCounter, the previous button subtracts 1.

Contained within configurations.txt is a variable called imageMax, which is set equal to the amount of images in the folder. This way I can set up an

if (_root.imageCounter >= _root.myVars.imageMax)

to tell it to go back to the first image.

The images are coming out right, changing on cue, and in general the captions are, too. But every now and then the caption doesn't change for
two consecutive images.

Like I said, I'm not by the program now, but I believe this happens as the captions turn the bend (from last to first or visa versa).

The caption text code, if I recall, is set up like this:

_root.slideShow.captionText._variable = "caption"+_root.imageCounter

I really can't figure why, if when loading the image I use the same variable, the caption doesn't change.

Any ideas?

Code Not Accepting Correct Entry In Input Text Field
Can anyone tell me why this code does not proceed to "correct" when 133 is entered into the input text field titled "input_txt3"? I've used this code elsewhere with different text entry with success.

keyListener = new Object();
keyListener.onKeyUp = function() {
if (input_txt3.text == "133" and Key.getCode() == 13) {
//13 is key code for 'Enter'//
gotoAndPlay("correct");
_root.answer_txt = "Correct!";
} else if (input_txt3.text != "133" and Key.getCode() == 13) {
//13 is key code for 'Enter'//
_root.answer_txt = "Incorrect.";
gotoAndPlay("incorrect1");
}
};
Key.addListener(keyListener);

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