"IF" Dosnt Wrk?
i have a quiz kind of a thing in which i am loading questions with four options(A,B,C,D, from external txt file.After the questions i have a inout text box(variable=yrans) where i ask to type the right option.Then on check answer button i load a varible(ans) from another text file(this is loading ok as i can see it in another display box) And i check by If yrans==ans
tell target result,goto frame 2 and stop(which has your answer is write writen in it) somehow the if statement is not working. I am using the expert panel so no prob with syntex.
FlashKit > Flash Help > Flash ActionScript
Posted on: 09-19-2001, 04:13 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Still Dosnt Work?
thanx,but still it dosnt work
::::::
on (release)
{ loadVariablesNum ("ransquiz.txt", 0);
my = _root.rq1; ---(rqi is the variable from text file)-
if (my ==_root.answer)-----(answer is the inputtext box)--
{tellTarget (_root.result)
{ gotoAndStop (2);
}
}
}
:::::::::
I tried asigning values from text variable to another variable then comparing, i can see both the variables 'my' and 'answer' but when the relational statement IF dosnt work ?totally surprised!!!!
Why Dosnt This Work?
ok... this is bloody anoyying,
iv done this website right, and iv exported it to html, now umm, why doesnt it load? it gets half way and then stops.
any ideas?
thnx
Autorun Dosnt Work?
i am making a cdrom in which i have a starting full screen(fscomand fullscreen) flash projector file(cd.exe) which i want to launch.i put a AUTORUN.INF file in which i write:::
[autorun]
OPEN=CD.EXE /AUTORUN
When i put the cd a blank flash window opens but not the cd.exe. Otherwise on double clicking the file it runs properly. Why?
If A Input Text Box Dosnt Have Anything In It
what i am trying to do is this
I have 8 input boxes and 8 Dynamic Boxes
the 8 Input boxes is A-G and the dynamic boxes are A1-G1
Right now i have the code setup to calculate whats in the input boxes and display the results in the dynamic boxes but what i need is if the input boxes are left blank the answer taht goes in that input box will be in teh dynamic box.. get what i am saying?
basically
value1=A
value2=b
value3=C
value9 = Number(value2)+Number(value3)
A1=value9
what i need to do is if A isnt filled in it does this equation but dosnt display anything in the input box (like NaN or 0)
any help would be nice
thanks
Jonathan
[Edited by jonathanc on 03-19-2002 at 11:43 PM]
Score, Dosnt Increment On Collision ?
i am making a small game kind of a thing,where on a click of a button a MC starts playing(a ball jumping),i have another MC(a ship maving across the screen).
Now i want to increment the score,a Variable,on every colision.Every thing is fine i.e,i get the true/false value from the hitTest,but the score dosnt increment on collision instead it satrs all of a sudden and the value starts incrementing endlessly.i have put the fallowing code in the 2nd keyframe of the movie(total frames=2)
----------
score = Number (score) + (s);
if (status==true){
s = "1";
}
----------
*Collision detection is working fine as i can see it in a dynamic text window.
Movieclip..it Dosnt Work Properly
onClipEvent (enterFrame) {
Mouse = _xmouse;
if (mouse<0)
{
Mouse = -1*mouse;
}
scale = 200-mouse;
if (scale<100)
{
scale = 100;
}
if (scale>200)
{
scale = 200;
}
setProperty ("", _yscale, scale);
}
is the code im using but if i ad a
this.onPress = gotoAndPlay(2); its wierd...ude have to see what i mean...but it dosent work....if u want to help me ill send u the fla can u tell me wats wrong...anyone
Swedish Signs Dosnt Work, Why ?
Hi every1.
i have a problem, again.
I have posted at the General flash gelp but the help i got ther didint help, so i'll try here.
I have a dynamic textbox witch i have some code in, i have a wordpad document with some text in, and it loads in the textbox.
But now i have this problem, when i publish the browser wont load swedish signs like Å,Ä and Ö. Why is that
i have checked the charahter options.
All charachters
i have tryed only lowecase uppercase, numerials, "and these characters"= ÅÄÖ
What am i doing wrong ?
I am using the font ARIAL witch includes the characters ÅÄÖ
An just for case i changed the font to arial in the wordpad document, witch shouldn have any effect relly...
What am i doing wroooongg ??
AttachMovie And OnRelease Dosnt Work
Hi,
i am new to mx.
I am trying to build my own photo album.
i have a large stage, and a blank mc to load my images into.
i get a list of images from my server, then loop over that list and
attachMovie("blank_mc","image_mc"+i);
then i scale the image to like 10.
i want the image to scale back to 100 with easing when the image is clicked.
i have tried several different ways to attach the blank mc load the image and build a onRelease function for each blank_mc. but nothing seems to work. the only way i have gotten it to do anything close is to createEmptyMovieClip() on the root then attach my blank to the that, then i can put my onRelease on the target_mc not the blank_mc. But i cant tell which image was clicked.
Please help
thanks
heres my creation code:
Code:
for (var i = 0; i"<"tmpArray.length; i++) {
var tmpmc:MovieClip;
tmpmc =_root.target_mc.attachMovie("picmc","pic_mc"+i,_root.getNextHighestDepth()+i,{gID:i});
//this dosnt work here:
tmpmc.onRelease = function (){
expand_mc(tmpmc.gID);//function to move the image around and scale.
};
tmpmc._xscale = 12;
tmpmc._yscale = 12;
}
Sending Html Text To Html Dynamic Text Field But It Dosnt Show
code: theNews = "<font color=#FF9900>"+newsRow0newsDate+"</font>"+": "+newsRow0newsStory+newline+"<font color=#FF9900>"+newsRow1newsDate+"</font>"+": "+newsRow1newsStory+newline+"<font color=#FF9900>"+newsRow2newsDate+"</font>"+": "+newsRow2newsStory+newline;
newsArea.textMain.htmlText = theNews;
trace("the news ="+theNews);
The data dosn't display but if i change the textMain.htmlText to .Text then it works, i need the formatted text.
Is ther something wrong with this?
i cant see anything wrong.
Cheers
Paul
Sending Html Text To Html Dynamic Text Field But It Dosnt Show
ActionScript Code:
theNews = "<font color=#FF9900>"+newsRow0newsDate+"</font>"+": "+newsRow0newsStory+newline+"<font color=#FF9900>"+newsRow1newsDate+"</font>"+": "+newsRow1newsStory+newline+"<font color=#FF9900>"+newsRow2newsDate+"</font>"+": "+newsRow2newsStory+newline;
newsArea.textMain.htmlText = theNews;
trace("the news ="+theNews);
The data dosn't display but if i change the textMain.htmlText to .Text then it works, i need the formatted text.
Is ther something wrong with this?
i cant see anything wrong.
Cheers
Paul
|