Var Troubles
hey guys,
well I have a frame that has a variable named language and it's value will depend on the button clicked.
ActionScript Code:
var language:String;enterBtn.onRelease = function() { language = "eng"; gotoAndPlay(14);}
now on frame 23 I have
ActionScript Code:
stop();_root.container.unloadMovie("swf/splash.swf");if (language == fr) { trace("selected language is french"); _root.container.loadMovie("swf/aboutFr.swf");}else if (language == eng) { trace("selected language is english"); _root.container.loadMovie("swf/aboutEng.swf"); } trace(language);
my problem is that no matter what the language is it won't go in any of the if statements, nothing gets traced except the last trace which tells me what language has been selected and that works perfectly.
I can't seem to find the problem, can someone please help me out
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 10-26-2005, 05:36 AM
View Complete Forum Thread with Replies
Sponsored Links:
MC Troubles
I have a few questions:
1) I have 3 MC's and 3 corresponding buttons. On the rollover of button "1" MC "1" needs to play(the trick is I want it to play to it's end no matter what else happens {rollout/release} then complete it's task ie goTo URL) this is the code I have for that as of now (tried many others but to no avail)
on (rollOver) {
gotoAndPlay ("left");
}
I was also advised to try:
on (rollOver) {
gotoAndPlay ("left");
if (left._currentFrame) {
play ();
}
}
2) Then at the end of the MC I want it to return to frame 1 on the main stage?
View Replies !
View Related
PHP Troubles
Ok, this is a bit of a weird problem. I'm useless at coding anyway, so you can imagine how I fare with PHP. However, I got both a 'mailing list' type thing as well as a 'comments' form working absolutely no problem. That is when tested offline in the stand alone flash player.
When I publish the file online the PHP wouldn't work for some reason. I have this code on the first frame:
Quote:
mailform = "http://www.domain.com/mailform.php";
action = "";
an input text box assigned the instance name 'vemail' and this code on a 'submit' button:
Quote:
on (release, keyPress "<Enter>") {
if ((vemail.indexOf("@") != -1) && (vemail.indexOf(".") != -1) && (length(vemail)>5)) {
action = "Send";
loadVariablesNum("http://www.domain.com/mailform.php", 0, "POST");
vemail = "";
getURL("java script:NewWindow=window.open('http://www.domain.com/success. htm','newwin','width=240,height=200,top=0,toolbar=
No,location=No,scrollbars=No,status=No,resizable=N
o,fullscreen=No'); NewWindow.focus(); void(0);");
} else {
vemail = "incorrect entry!";
action = "";
stop();
}
}
This is the PHP script as well:
Quote:
<?
$adminaddress = "email";
$siteaddress ="http://www.domain.com";
$sitename = "site";
$date = date("m/d/Y H:i:s");
if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);
IF ($action != ""):
mail("$adminaddress","subject",
"new member: $vemail
Logged Info :
------------------------------
Using: $HTTP_USER_AGENT
Hostname: $ip
IP address: $REMOTE_ADDR
Date/Time: $date","FROM:$adminaddress");
mail("$vemail","thank you for visiting $sitename!", "Hi $fname
Blah Blah Blah
$sitename
$siteaddress","FROM:$adminaddress");
ENDIF;
?>
Like I said, I am pretty awful at coding but this seemed to work when I was offline, so I can't work out why it doesn't work online. Presumably there is no problem with the server that the PHP file is uploaded to seeing as though it worked before.
Can anyone help?
telekin:
View Replies !
View Related
SWF To AVI Troubles...
I'm a TOTAL newb, so I hope I'm just not doing something right...
I'm trying to convert the SWF files from this page into AVI files so I can burn them onto a video CD or a DVD.
My problem is that no matter what program I try, when I export the movie, it does NOT save the sound at all...
Anyone know what I may be doing wrong???
Is there a program that will convert the file for me in whole???
Thank you very much for your time.
-EB64
View Replies !
View Related
SWF To AVI... Troubles... Help... Please...
Hey, I've got this problem, see if you can give me a hand.
I made an animation in Flash, that has several movie clips, with other movie clips inside, and so on (I'll explain better so you can understand: they're some animals that move, and their eyes (that blink) are another movie clips inside of the first movie clip). When I publish it as an .SWF, it works as expected, but if I export it as an .AVI (the animation will come out in video, and the person that's going to edit it asked me for that specific format), the movie clips don't move, like it is only reading the main timeline. Do you understand me? The only movements that come out are the ones that happen in the main timeline. The others movie clips stay still in the first frame. oes anybody know what's going wrong and how can I export that .AVI? Thank you.
View Replies !
View Related
Dns Causes Troubles?
Hi
In this site I made, there is a popup function that's allow to see
pictures. When I click on the buttons, it tries to open a new page
but not a popup.
Since I applied a dns management package and cloaked the site's name, that function doesn't work anymore( and it used to ).
The pictiures are in a file that's on the same level that the only
.fla wich contains the all site.
function popCenter (url, nom, largeur, hauteur) {
getURL ("java script:window.open('http://www.webcold.com/MahalR" +url +"','" +nom +"','width=" +largeur +",height=" +hauteur +"scrollbar=yes,top='+((screen.height/2)-(" +hauteur/2 +"))+',left='+((screen.width/2)-(" +largeur/2 +"))); void(0);");
}
On the buttons itself:
on (release){
_root.popCenter("popup/IMG_1393.html", "gpopup", "410", "307");
}
If you want to have a look, go http://www.mahalrayan.com ,in the photogallery section and click on the pictures.
View Replies !
View Related
Dns Causes Troubles
Hi
In this site I made, there is a popup function that's allow to see
pictures. When I click on the buttons, it tries to open a new page
but not a popup.
Since I applied a dns management package and cloaked the site's name, that function doesn't work anymore( and it used to ).
The pictiures are in a file that's on the same level that the only
.fla wich contains the all site.
function popCenter (url, nom, largeur, hauteur) {
getURL ("java script:window.open('http://www.webcold.com/MahalR" +url +"','" +nom +"','width=" +largeur +",height=" +hauteur +"scrollbar=yes,top='+((screen.height/2)-(" +hauteur/2 +"))+',left='+((screen.width/2)-(" +largeur/2 +"))); void(0);");
}
On the buttons itself:
on (release){
_root.popCenter("popup/IMG_1393.html", "gpopup", "410", "307");
}
If you want to have a look, go http://www.mahalrayan.com ,in the photogallery section and click on the pictures.
View Replies !
View Related
Mac Os + MX Troubles
Hi ,
I’ve been downloading tons of movies from the flash archive, i was looking for some kind of nice, simple mouse follow but with flash MX i am not able to open any .fla .
I am using Mac os 9.01 on a G3 eand it gives me ERROR -39.
I also try to change the Type of file with ResEdit, the icon change but i got always the same message. -39.
Any mac user got any clue ?
thanks!
View Replies !
View Related
Pop Up Troubles
Okay, so I have this flash site I'm making for school. The main site loads into a pop up window that I made with this javascript that I put into a welcome page:
SCRIPT LANGUAGE="JavaScript"
function popup() {window.open('intro.html','','toolbar=no,location= no,directories=no,status=no,menubar=no,scrollbars= no,resizable=no,width=504,height=360,left=0,top=0' );}</script>
It was originally working okay, but I made some changes and republished the pop up html and swf files. Now the pop up window opens okay, but the flash movie is shifted to the bottom right, cutting off some of the movie. I tried placing the flash movie in differant places within the html file ie.Top, Absalute middle etc. but nothing has worked.
Thanks.
View Replies !
View Related
MC Troubles
Hi Dudes & Dudettes!
I am hoping that one of you flash bods can help me out with this MC problem that I can't get my head around!?
I have a movie that I am working and in theory it should be quite simple. I have a MC(screen) of a display screen that part-rotates on a timeline of 100 frames (24fps) frame 1 shows a 3/4 left side on view of the screen - frame 50 shows a flat front on view - and frame 100 shows a 3/4 right side on view. This movie clip is then put into another timeline on a 750width stage where the MC-Screen starts on the far left hand side of the stage and moves to the exact centre on frame 50 and finishes on the far right of the stage on frame 100 all positions on the stage correspond to the rotation amount in the MC-screen.
What I want to do is have 10 screens placed at intervals across the stage and want the MC-screen to start playing from different frames of the MC-screen ie: the first screen plays from frame 1 of it's timeline then the next screen will always play from frame 10 etc... so it gives the effect of continuous movement by the screens. I have tried to duplicate the MC-screen and then paste the first 10 frames at the end of the timeline for the MC-screen so as frame 10 becomes frame 1 but it seems to eat the memory up.
How do I do it??? someone out there must have some idea......
......please!!!!
Cheers
Diga
View Replies !
View Related
Mc Troubles
Hi Dudes & Dudettes!
I am hoping that one of you flash bods can help me out with this MC problem that I can't get my head around!?
I have a movie that I am working and in theory it should be quite simple. I have a MC(screen) of a display screen that part-rotates on a timeline of 100 frames (24fps) frame 1 shows a 3/4 left side on view of the screen - frame 50 shows a flat front on view - and frame 100 shows a 3/4 right side on view. This movie clip is then put into another timeline on a 750width stage where the MC-Screen starts on the far left hand side of the stage and moves to the exact centre on frame 50 and finishes on the far right of the stage on frame 100 all positions on the stage correspond to the rotation amount in the MC-screen.
What I want to do is have 10 screens placed at intervals across the stage and want the MC-screen to start playing from different frames of the MC-screen ie: the first screen plays from frame 1 of it's timeline then the next screen will always play from frame 10 etc... so it gives the effect of continuous movement by the screens. I have tried to duplicate the MC-screen and then paste the first 10 frames at the end of the timeline for the MC-screen so as frame 10 becomes frame 1 but it seems to eat the memory up.
How do I do it??? someone out there must have some idea......
......please!!!!
Cheers
Diga
{Mod Edit: Moved to General Help- SJT]
View Replies !
View Related
For (i=1; I<17; I++) Troubles
Here is some code I'm writing that I'm having some big problems with. First, for the "text1" variable on line 7, how do I write the "unescape(title1)" part so that it goes: title1, title2, title3, etc.? Second, even bigger problem; all of my variables in this act like they are all 17, not 1,2,3,4,5,6 etc. Finally, how do I handle changing info like "rocksDescription" mindway down the code and, "QS164_Rocks.jpg" at the bottom?
Code:
title1 = "Rocks%99"
title2 = "Eggs%99"
title3 = "Cars%99"
//etc.
for (i=1; i<17; i++) {
_root["Btn"+i].btn.onRollOver = function() {
text1 = unescape(title1);
};
_root["Btn"+i].btn.onRollOut = function() {
text1 = "";
};
_root["Btn"+i].btn.onRelease = function() {
_root.attachMovie("ButtonCoverMC", "ButtonCoverMC", 80);
_root["Btn"+i].gotoAndStop(2);
setProperty("_root.ButtonCoverMC", _x, i*23+209);
setProperty("_root.ButtonCoverMC", _y, 470);
_root.ButtonCoverMC.coverText = i;
_root.Description.copy.attachMovie("rocksDescription", "", 2);
_root.Description.gotoAndPlay(2);
_root.attachMovie("ProductFadeInMC", "ProductFadeInMC", 300);
setProperty("_root.ProductFadeInMC", _x, 202);
setProperty("_root.ProductFadeInMC", _y, 189);
loadMovie("products/QS164_Rocks.jpg", "_root.ProductFadeInMC.productHolder");
};
};
text 1
View Replies !
View Related
XML Troubles, Please Help
Hey all;
I'm having troubles getting my xml data to display correctly, any suggestions?
Here's what I've got so far:
- An MC with a scrollpane on the stage.
-In the library, a MC called contentMC.
-Inside contentMC is an empty MC called imgHolder (for holding the jpgs) and a dynamic text field named infoText.
-An XML file named catalog.xml.
So I've been able to adjust my xml nodes to get to my info, but it wont display right. For one thing, it won't display the jpgs unless there is a dynamic text field in contentMC (which I find wierd). And secondly, I can't figure out how to position the jpgs & text so they don't overlap each other.
Here is the code I've got loading in the xml:
Code:
//create new XML object & load from external source
albumXML = new XML();
xmlDoc = "catalog.xml";
albumXML.ignoreWhite = true;
albumXML.onLoad = checkXMLStatus;
albumXML.load (xmlDoc);
//Checks the success of the loading
function checkXMLStatus(success) {
if (success) {
//Build the catalog
buildMenu();
} else {
trace (" Did not load ");
}
}
stop();
and this is the code I've got manipulating the xml data:
Code:
function buildMenu() {
theDepth = 100;
this.createEmptyMovieClip ("con", 10);
nodeCount=albumXML.firstChild.firstChild.childNodes.length;
for (u = 0; u < nodeCount; u++) {
//Build the content listing
buildContent();
} //Attaches the clip of items, to the Macromedia scrollpane component, which has an instance name of "catalogPane".
albumPane.setScrollContent (con);
}
function buildContent(){
theJpg = albumXML.firstChild.firstChild.childNodes[u].attributes;
theInfo = albumXML.firstChild.firstChild.childNodes[u].childNodes;
theName = "item_" + u;
con.attachMovie("contentMC", theName, theDepth++, {_y :350 * spacing});
con[theName].imgHolder.loadMovie(theJpg);
con[theName].infoText.text = theInfo;
spacing++;
}
stop();
...and this is the XML data:
Code:
<catalog>
<albums directory="albums">
<imageNode jpegURL="alb01_img00.jpg">Description of album 1</imageNode>
<imageNode jpegURL="alb01_img01.jpg">Description of album 2</imageNode>
<imageNode jpegURL="alb01_img00.jpg">Description of album 3</imageNode>
<imageNode jpegURL="alb01_img01.jpg">Description of album 4</imageNode>
</albums>
<singles directory="singles">
</singles>
<videos directory="videos">
</videos>
</catalog>
So how do I get the text to display correctly? Right now I get the word "null" in the text box when I test.
And how do I get it all to line up correctly?
Thanks for any and all help.
View Replies !
View Related
A Few Troubles
1) I want a projector file to open in Full Screen, so it doesn't show the Flash file menu or title bar. How do I do this?
2) I want to have a print function inside the projector so I don't have to use Flash Player's File->Print, and so I have control over what is being printed. Could someone please link me to a relevant tutorial?
3) When I set the Alpha of a movie clip to 0, if the movie clip has other movie clips inside of it then they are not made invisible. Do I have to set all of the inside objects to be invisible, one by one, or is there another way?
Thanks
View Replies !
View Related
XML Troubles. Its A Bit [U]ODD[/U]
Hi Everybody, Im Using Flash to read Questions from an XML file. The trouble Im having is, I am reading questions from an XML file into Flash variables, but the questions only load into the variables if the nodes are odd numbers!!! Ive got it working with the odd numbers, what I was wondering if anybody new why this happens and if possible how to fix it?.
View Replies !
View Related
Troubles With 3D
I am as as
I'm a real newby, as you should be in this forum. I've got this download, Swift 3D, I Think, at least something with 3D. My problem:
How to attach, for example, spinning wheels to a car, wiggly eyes to a face, that sort of thing.
Please answer this one question, I soy to anyone who knows this stuff( or is it only allowed for newbies to answer here? )
If someone reacts, THANK YOU
View Replies !
View Related
Troubles With This
trying to do something fairly simple, just want to have a root function define onRollOver,onRollOut, and onEnterFrame for a bunch of movieclips
PHP Code:
//frame actions in root
function prepare() {
this.onRollOver = function() {
if (this._currentframe<this._totalframes) {
this.go = true;
}
_root.popup("TV", this);
};
this.onRollOut = function() {
this.go = false;
_root["mytext"].removeTextField();
_root.popupmc.removeMovieClip();
_root.pointer.removeMovieClip();
};
this.onEnterFrame = function() {
this.go ? play() : prevFrame();
};
}
PHP Code:
//actions in mc
onClipEvent(load){
_root.prepare(this);
}
View Replies !
View Related
Pop-up Troubles...
i've tried to make a site that has a main page which has a button on it that will launch the actual website, in its own window. I had it working but i accidently deleted the fla file of my working version, and now that i have had to redo it i cant seem to get it to work again! So i was wondering whats wrong with my code? :
on (release) {
getURL ("javascript:NewWindow=window.open('http://www.geocities.com/flashsaga/testsize.html','Welcome To Flashsaga','width=985,height=580,left=15,top=50,to olbar=No,location=No,scrollbars=No,status=No,resiz able=No,fullscreen=No');", "NewWindow.focus(); void(0);");
}
incase you want to see what that code ends up doing you can find it here:
http://www.geocities.com/flashsaga/main.html
View Replies !
View Related
IF Troubles
I have a large if statement being worked through. This is the part that is causing the trouble.
(this is one section of a much longer code)
code:
} else if (variablea == 5 or 6 && variableb == 2002 && variablec == 49 && variabled == 1 or 4 or 5 or 6) {
variablef = blah1;
} else if (variablea == 5 or 6 && variableb == 2002 && variablec == 49 && variabled == 2 or 3) {
variablef = blah2;
}
Now, no matter what I enter for variablec or variabled I always end up with variablef becoming blah1.
variablef should become blah2 if variabled is 3 or 4.
Hope this doesn't sound too confusing.
View Replies !
View Related
Pop Up Troubles
I am having troubles where some of my pop ups have stopped working. Instead of the pic appearing in a new window at the specified size, the new window just says 'untitled' and is regular size. I have this code on the button:
Quote:
on (release) {
getURL("javascript: MM_openBrWindow('brace1.html','loading','width=300 ,height=450')", "_blank");
}
Is there any hidden code in the html file/s that I may have overwritten, or can you think of any other reason why they are all not working?
View Replies !
View Related
Pop-up Troubles
hi everyone. I'm having trouble with some pop-ups. THey work fine on firefox but wont pop in IE6, is there anything else i could add to the code to make it pop in IE?
i used the same code in this tut.
http://www.kirupa.com/developer/flas...pup_window.htm
please help
Im using flash 8
View Replies !
View Related
[F8] Lag Troubles
Hey everyone!
I am almost done with my game, you can view the beta version here http://peejaroni.com/drawman.aspx
As you can see if you play for a while you will experience a bunch of lag. I'm not going to post the .fla in case someone tries to steal it, but I will post the script I think it is lagging at. I believe that the missiles keep duplicating, and the for loops that detect hitTests end up working too hard when they need to calculate over 150 numbers. I tried to clear out the numbers every X amount of shots, but then the hitTests wouldn't work at all.
here is my duplication code...
_root.z --
_root.j++;
duplicateMovieClip("_root.rline", "rline"+_root.j, _root.z);
eval("_root.rline"+_root.j)._x = heroman._x;
eval("_root.rline"+_root.j)._y = heroman._y;
Here is my hitTest code
for (o=1; o<=_root.j; o++) {
if (this.hitTest(eval("_root.rline"+o))) {
if (eval("_root.rline"+o)._currentframe != 1) {
this.gotoAndPlay(2);
if(_root.ten == true){
_root.refy = true}
}
}
}
Thanks for your help.
ps. if you find any other bugs or problems or comments in the game please post them too.
View Replies !
View Related
Swf Troubles
I am making a game, everytime I export the game to an swf the controlls such as enter and arrow keys dont work. But then does work when I use the test movie funtion in my flash animator. Anyone know what to do, or how to make it work.
View Replies !
View Related
XML Troubles
Hello there,
i'm trying to make a photo gallery using kirupa tutorial http://www.kirupa.com/developer/mx2004/thumbnails.htm, but i tried to make this gallery with categories, so i made XML file like this
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<gallery>
<galleryName id = "Schools">
<images>
<pic>
<image>images/1.jpg</image>
<description>Hello</description>
<thumbnail>thumb/1.jpg</thumbnail>
</pic>
<pic>
<image>images/2.jpg</image>
<description>Hi</description>
<thumbnail>thumb/2.jpg</thumbnail>
</pic>
<pic>
<image>images/3.jpg</image>
<description>Hey</description>
<thumbnail>thumb/3.jpg</thumbnail>
</pic>
</images>
</galleryName>
</gallery>
and traced galleryname
Code:
galleryName= xmlNode.childNodes[i].attributes.id;
but when i trace image using this code in flash
Code:
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
it gives me null!!
Can you have a look?
Thanks!
View Replies !
View Related
Xml Troubles
i've been working with xml and i have also problems with it!!! i'm a beginner with this language...
i just don't understand and don't know how to import to flash special characters such as "ç" "á" "ã"... can anyone tell how can i import to flash this characters???
thanks for helping me
jinhos
View Replies !
View Related
Var Troubles
hey guys, so heres the scenerio:
Initially get the y positoion of _root.whiteBox.topTitles.titles.panel and store it in an variable called
titleY.
Then when each button is rolled off it will return to the titleY position. Either the one set at the start of the movie or when one of the buttons is pressed.
When each button is pressed it will set the titleY varible to a new number defined in the on (release) action. e.g: titleY = 140;
This is what I want to do, but what seems to be happening is something...I really don't know, I'm still kinda new and this stuff.
View Replies !
View Related
Mpg Troubles
Why is that when I import an mpg movie and make sure the "import sound" is checked, the audio on the mpg still does not work?? I have tried every import variation and nothing works.
View Replies !
View Related
MC Within An MC Troubles
When the game starts the MC playScreen displays because a variable is at 0. The playScreen MC consists of two other Movieclips, one Graphic background and one play button called playBTN.
Once you hit the playBTN a loop is executed to fill the monOnScreen variable (the one that was at 0 before) to the level*5 (so 5 would be the max at the first level). The monOnScreen represents the number of enemies on the screen. When you hit an enemy it subtracts from the monOnScreen variable.
When the monOnScreen variable reaches 0 what is supposed to happen is that it will turn on the playScreen variable so that you can press play and start a new level. I'm using a movieclip's .onEnterFrame to constantly be checking the monOnScreen variable.
The problem with this is that when it comes up after the first time the play button won't work. The first time it loads, it works perfectly but the second time it doesn't work. I've tried checking the monOnScreen variable every time you hit an enemy but still the same result (the play button not working).
Here's what I've written.
ActionScript Code:
//Play Button
playScreen.playBTN.onRelease = function() {
trace("The Play Button is working");
//It needs to create the monsters
for (a=0; a<=level*5; a++) {
duplicateMovieClip(_root.enemy_mc, "enemy"+a, monDepth);
setProperty("enemy"+a, _x, 580);
setProperty("enemy"+a, _y, Math.round(Math.random()*300)+10);
_root.monOnScreen++;
_root.monDepth++;
playScreen.gotoAndStop("off");
trace("A is "+a);
}
};
//Checking to see if there are any monsters left
thing_mc.onEnterFrame=function(){
if (_root.monOnScreen == 0) {
//There are no monsters so start up a new level
_root.level++;
trace("The new level is "+_root.level);
_root.playScreen.gotoAndStop("active");
} else {
//Do nothing
}
}
Everything is named correctly (I know this because it works when it first comes up) it's just that the play Button doesn't work the second time it pops up.
Anyone have any ideas?
View Replies !
View Related
Xml Troubles
I have created a xml file with a list of images and have the xml playing correctly in flash. The problem I am having is when someone clicks on a navigation menu, I want the xml file to be replaced with another one. Is there any way to do that? I want to keep the new XML file the same name so that my array and load functions are the same.
I have asked around the forums and have searched the forums and I just am not having much luck.
Thanks!
View Replies !
View Related
Troubles..
Hi to all,
this code is pretty code until the line:
this[newnode].enode._xscale=scale;
I know that this code is scaling a MovieClip . What I can't understand is the enode istance.
Any of you could make it clearer?
newnode="node"+String(cnt);
this.attachMovie("target",newnode,cnt);
this[newnode]._x=x;
this[newnode]._y=y;
// scale the nested green node, not the crosshairs
this[newnode].enode._xscale=scale;
this[newnode].enode._yscale=scale;
this[newnode]._rotation=random(90);
// node will never become more than half opaque
this[newnode]._alpha=50;
etc
PS I downloaded this code from http://www.levitated.net/daily/levAttractorSets.html
Thanks
View Replies !
View Related
XML Troubles
I am having troubel with my XML Socket. I need to set it so that I can access XML on a server other than the host. I have looked into the policty files but cannot seem to make them work. Anybody have any experience with this?
View Replies !
View Related
XML/MC Troubles
Hi peoples, I'm having trouble outputting data from xml with movieclips, basically it only ouputs a single movieclip when it should be outputting three. I think its because I'm using attachmovie or something. Any help would be appreciated, heres the code:
Code:
var spacing = 24;
var description_lv = new LoadVars();
description_lv.onData = function(raw_text){
description_txt.text = raw_text;
}
function doit(portfolio_xml){
var portfolioPictures = portfolio_xml.firstChild.childNodes;
for (var i = 0; i < portfolioPictures.length; i++){
var currentPicture = portfolioPictures[i];
if(i == 0){ ix = (i - 1); var currentThumb_mc = _root.port.attachMovie("port_item", "thumbnail_mc"+i,this.getNextHighestDepth());
}else{ var currentThumb_mc = duplicateMovieClip("thumbnail_mc"+ix, "thumbnail_mc"+i,this.getNextHighestDepth());}
currentThumb_mc._y = spacing;
spacing = spacing + 49;
currentThumb_mc.createEmptyMovieClip("thumb_container",0);
currentThumb_mc.thumb_container.loadMovie(currentPicture.attributes.thumb);
currentThumb_mc.thumb_container._x += 27;
currentThumb_mc.num.text = i + 1;
currentThumb_mc.client.text = currentPicture.attributes.client;
currentThumb_mc.description = currentPicture.attributes.description;
}
}
var portfolio_xml = new XML();
portfolio_xml.ignoreWhite = true;
portfolio_xml.onLoad = function(success){
doit(this);
}
portfolio_xml.load("portfolio.xml");
View Replies !
View Related
AIR Troubles Me Again
As senocular had told me yesterday, that AIR is just a runtime and .air file is just a package-up of a group of assets.
so i made a swf and assign it as the root of the air application and then package it directly from Flex Builder 3 without mxml-compiling.
But with only one single swf, I cannot handle the stage.window.startMove and close etc.
I write in Flash CS3 this code:
ab_mc.addEventListener(flash.events.MouseEvent.MOU SE_DOWN, go);
function go()
{
stage.window.startMove();
}
but the Flash CS3 just tell me that there is not a "window" property.
So... If I want to develop some cute, transparent AIR projects, I have to make the swf compiled from MXML but not just Flash CS3 IDE ?
Anyone can give me a more detail instructions?
View Replies !
View Related
E4X Troubles
I originally posted this in the flash cs3 thread but I think it belongs here, sorry for the dupe!
I have an XMLList in the format:
Code:
<node>
<inner>
<item att="blue">
<item att="red">
<item att="green">
</inner>
</node>
<node>
<inner>
<item att="orange">
<item att="blue">
<item att="yellow">
</inner>
</node>
...
and I would like to return all nodes that have an attribute of a given value. For example if given "blue" I would want a return of an XMLList containing both nodes where "orange" would just return the second node. As far as I can figure it would be something like
Code:
myXMLList.(node.inner.*.@* == "blue");
but his does not work. If I name the attributes differently on every 'item' node it does work. I know I'm doing something wrong but can't pinpoint it. Is it possible to do this in a short syntax or does this require looping? Thanks in advance!
View Replies !
View Related
AS3 Troubles
I'm very new to Flash and AS3, but I'm getting by after completing Todd Perkins' training book.
I've come across my first obstacle that I'm not able to solve.
I've created a simple animation.
Here is the basic skeleton:
Main Timeline:nested movieclip:multiple nested movieclips.
I have a button on the main timeline to control one of the movieclips in the 'multiple nested movieclips' branch. The code I have in place is :
stop();
function stopbiomovie(event:MouseEvent):void
{
bio_mov.gotoAndStop(1);
}
function playbiomovie(event:MouseEvent):void
{
bio_mov.gotoAndPlay(1);
}
bio_but.addEventListener(MouseEvent.MOUSE_OVER, stopbiomovie);
bio_but.addEventListener(MouseEvent.MOUSE_OUT, playbiomovie);
where bio_mov is the movieclip I want to control. The first nested movieclip is in a keyframe on frame 1 with just a stop(); code in frame 1. When the movieclip finishes, I have code in place to advance the maintimeline to frame 2 and the movieclip remains, looping on its final frame. Everything runs smoothly ... until I add the above code in frame 2. When I add this code and attempt to play the project, the first nested movieclip just skips through, and keeps doing so. No button control. I get the following error messages:
1120: Access of undefined property bio_mov.
1120: Access of undefined property bio_mov.
1120: Access of undefined property bio_but.
1120: Access of undefined property bio_but.
with the following sources respective:
bio_mov.gotoAndStop(1);
bio_mov.gotoAndPlay(1)
bio_but.addEventListener(MouseEvent.MOUSE_OVER, stopbiomovie);
bio_but.addEventListener(MouseEvent.MOUSE_OUT, playbiomovie);
Okay, I hope this is a thorough enough description of the problem and what I'm trying to accomplish. Any help would be great. Thanks.
View Replies !
View Related
XML Troubles
I am having troubel with my XML Socket. I need to set it so that I can access XML on a server other than the host. I have looked into the policty files but cannot seem to make them work. Anybody have any experience with this?
View Replies !
View Related
XML Troubles
Hi Im new to this site Im ok with flash but my skills are very basic...ok heres my problem hope someone can help.
Basicly I want to use a thumbnail style left right pic scroller as a sort of menu bar for a site, now Ive edited the layers etc to get the look I want but my problem comes when I host the swv file on a server i have it placed in a folder along with the photos folder wich includes the XML file.
Now when I load the thumnail viewer via the server link it runs fine But when I try an place the server link into say another sites flash object container it loads the swv but fails to find the XML.
Now Ive changed the action link in flash cs3 to go to the server XML folder link and still no joy.
So basically what Im saying is can you host the swv gallery on one server and use the server swv link to place the same gallary on another site that just has a flash playing object ?
please help.
p.s sorry If I've placed this in the wrong place.
View Replies !
View Related
Troubles In Paradise
So I made an movieclip with textfields and buttons, the textfields change if a button is clicked by using external txt files. I've set a variable and a button gives the name of the textfile to the varible. then the variable is loaded in the texfields. the external file contains variables only.
If I testit while working in the movieclip and using play scene. it works perfectly, BUT, when i put the movie clip as an instance on the scene. Nothing happens and i get this fualt: "Error opening URL "file:///C|/Documents%20and%20Settings/pjf/My%20Documents/""
can anybody please help me
--------------------------------------------------
an example of the textfile:
&nick=ConanX
&rank=trainee
&level=de_train
&wapen=AK47
&model=SAS
&signature=ConanX here, ConanX there, COnanX will find you everywhere
&warcry=To be or to be or to be
&games=Q3, Project IGI, UT, Anarchy online, Severance blade of darkness
&birth=1982-11-23
&Gender=Male
&email=champ25rsca@yahoo.com
&icq=120359655
&irc=geen voorkeur
&textloaded=OK
frame1 movieclip
loadVariablesNum (/:membertext, 0);
frame2 movieclip
if (/:textloaded="OK") {
gotoAndPlay (4);
}
frame 3 movieclip
gotoAndPlay (2);
frame 4 movieclip
stop ();
action of a button
on (release) {
membertext = "conanX.txt";
gotoAndPlay (1);
}
----------------------------------------------------
View Replies !
View Related
New Window Troubles Please Help Me
I am making a website for my grandmother... she wanted to sell her paintings online. I have it so that whenever someone clicks on a thumbnail of one of her paintings, it loads into a "new" window the enlarged version of the same painting. Everything works perfect in netscape... but explorer causes problems. I does not open the window to the full size of the screen. So every time you view a different painting...you have to maximize the window again. Is there any way to force the new window to open to the full size of the screen?
I'd really appreciate any help you can give. I've put so much time into this and hate running into things like this.
Thanx in advance!
-Ryan
View Replies !
View Related
If Statement Troubles
I have a movie clip which plays when you press a button and then stops midway. When someone presses a different button i want an action script thingy to say something like, if movieclip 1 is at frame 12 goto and play frame 13 then play movieclip2.
Much appreciated!
Jim
View Replies !
View Related
Colour Troubles
ok guys me again can u help me?
what i want is.....well ive got like three buttons all diferent colours and when they are pressed i want them to tell a movieclip to change to the same colour is there any script where you can say like
onmouse down tell target (whatever) to use the RGD of me
if you know what i mean
does anyone know a script for that and can u please tell me it
thanks guys
PHENIA
View Replies !
View Related
Loadmovie Troubles
Hi
I am having trouble with the load movie function. I have a main movie that is loading another movie on top of it. Once the movie is loaded, i want to load other movies to replace the already loaded movie. However when i load subsequent movies, the very first frame of the main movie flashes first, then the the preloader for the subsequent movies appears. Please help. Also my images seem to be pooping and jumping a few pixels, weird!!
Please help!
View Replies !
View Related
Array Troubles
Hi all,
i am completely stuck with a script, i cant get the pesky array to take the mc x positions. i originally thought it was a problem with :
squaresxcoords = this["square"+i]. _x ;
(originally :
squaresxcoords = getProperty(_root["square"+i],_x); )
but no matter what i try i cant get it to work. heres the full script:
FRAME1
setProperty ("square0", _visible, 0 );
squaresxcoords=new Array();
squaresycoords=new Array();
i=0;
// square0 is the mc that will be duplicated and renamed, its invisible to begin with.
//also in frame 1 is a button that has the following actions attached..
on (press) {
duplicateMovieClip ("square0", "square"+i, i);
setProperty ("square"+i, _visible, 1);
setProperty (square0, _visible, 0);
i = i+1;
}
//this duplicates the clip renames and changes visibilities. each time the user clicks another clip is duplicated and renamed. (this all works ok)
FRAME2
nowt
FRAME3
squaresxcoords = this["square"+i]. _x ;
trace(squaresxcoords);
gotoAndPlay (2);
// the plan now is to get the xposition of the newest duplicate movie clip, and store this to an array. this will be done repeatedly until the next clip is duplicated
Thanks in advance
b0b
http://www.sensoriumdesign.net/
View Replies !
View Related
Button Troubles
My movie keeps getting increasingly more complex. Please help.
I have a button that on rollover plays an MC instance on the stage. No problem there. I also have a different MC instance playing on the stage on load. I want that same button to stop this MC on press, and play a new MC instance in its place. Hopefully someone can help me out if I explained myself correctly.
thanks
View Replies !
View Related
TWEEN TROUBLES
you see, i have a problem..
In flash 5 i want to duplicate one movieclip in which i have tweened one letter (A).
Then i want to use this movieclip again (duplicate) but change the letter to (B) but maintain the movement of the tween.
When i do this in the duplicated movieclip, the original movieclip with the original tween changes with it..
So i have two tweening B's instead of same movement for both letters A and B..
you dig??
i now it hasn't got to do with letters 'cauze when i want the exact thing with e.g. a circle and a square i still have the same problem..
the TWEEN is re-used for the duplicated movieclip..
does anyone know how to make this work??
please help.. i don't get it.
View Replies !
View Related
Border Troubles
No matter what alignments I select when I try to publish my full screen flash movie, It always creates a small border to the top and left of the movie. All I want is no border, IS there a way to turn this off?
View Replies !
View Related
#include Troubles
I have created a function foo () in foo.as.
function foo () {
_parent.test = "test";
}
I create and instantiate a MC "functions" and place it on root. I place a #include "foo.as" on the first frame. This clip is preloaded with a few others. After it is loaded, I run:
functions.foo();
as a test, I created a txt field on root with the var name "test" and tried to populate it from foo(). However, nothing happened. I then added this to my "foo.as" file:
_parent.test = "outsideFoo";
function foo () {
_parent.test = "insideFoo";
}
This time test was populated with "outsideFoo." This is puzzling to me; why does Flash allow me to use the var AS and not the function? I suppose I could just take all my actions out of the function, but that pisses me off - why?
Thanks,
Brian Riley
617.693.7030
View Replies !
View Related
Masking Troubles
I'm working in Flash 5 - and I have a rather embarrasing question. I'm attempting to create several buttons for a site, and used the following method:
- I created a symbol/graphic and inserted just a simple box into it, called it "mask button". This serves as a mask in all other buttons, so that they are consistantly the same size.
- I created a symbol/button with a graphic in the back layer, and inserted "mask button" in the top layer.
When I insert the resulting button in the main stage, it looks just like it was designed - but when I test the movie or publish, you can see the whole background of the button and the mask is a solid blue block. Am I doing something wrong?
Thanks for your assistance. ~Chad
View Replies !
View Related
Navigation Troubles
I have a problem. I'm trying to have a draggable bracket around the selection of buttons, while also playing a movie with every button roll-over. The problem I have having is that I can't stop the draggable after I've started it, so the buttons are basically horiztonal across the entire screen, which is stupid because you could click on a button from anywhere on the x axis aslong as you are at the right y co-ordinate. What I am asking here is, without making a giant button behind the selection buttons(About, Portfolio, etc) that makes the brackets draggable, how can I achieve this ability to have a draggable movie underneath the button navigation while also having rollovers.
http://24.100.163.228/to/new/main.html
Take a look and see if you can understand what I am saying
Thanks,
Dennis
View Replies !
View Related
Hittest Troubles........
http://www.geocities.com/canadaherp/test.html. that is my new site i started. the pre-loader is a game. i cant get it to round the precent accuracy down and i cant get it so that when the tounge hits the fly it only adds 1 to the score each hit!....... any ideas?
View Replies !
View Related
Preloader Troubles, Please Help
OK, I'm sure a million people have asked this question. I've read a few of those and none really answer my question. I have one scene with about 115 frames in it, along with other movies. I've tried putting my preloader script in the first frame along with my preloader movie.
My code looks like this:
ifFrameLoaded (115) {
gotoAndPlay (2);
}
To me it seems like it should work, yet it doesn't. I've tried making two different scence, one with the preloader script and the other with the content. I make sure the preloader scene is on top the write this script:
(scene one is the preloader, and scene 2 is the content)
ifFrameLoaded ("scene 2",115) {
gotoAndPlay ("scene 2",2);
}
What happens here is the same thing but my preloader doesn't come up. It seems like it's loading but it still runs very slow. Please, if someone could help me, I would be greatful.
Thanks.........
if looking at my site will help: http://www.visualmindstudios.com
[Edited by osirus on 12-23-2001 at 07:23 PM]
View Replies !
View Related
Array And Other Troubles
Im trying to load an array of web addresses from a .txt file and have diffrent buttons link to them acordingly. I have two types of entries possible in the array, one where the address and the name are the same (ex. The url is "www.flashkit.com", and the button says "www.flashkit.com". The entry in the array is: "www.flashkit.com") and one where the name and address are diffrent (ex. The url is "www.flashkit.com", and the button says "Flashkit". The entry in the array is "Flashkit:www.flashkit.com"). The "http://" is added later.
What Im doing:
In the first frame of my movie I have the loadVariables command load a text file called buttons.txt. In this text file there is an array called buttons.
Load Variables:
loadVariables("buttons.txt","");
The contents of buttons.txt:
buttons = new Array ("www.people.com","Flashkit:www.flashkit.com","www .newgrounds.com");
Now I have an MC named "item0" with a button and a dynamic text field inside it. the MC (item0) has this code:
Code:
onClipEvent (load) {
//if this is the first button duplicate it to make enough for all the options
if (_name == "item0") {
for (n=0;n<_root.buttons.length-1;n++) {
//duplicate the button if n is not 0
if (n != 0) {
this.duplicateMovieClip("item"+n,n);
}
// if the name of the button and address are the same
if (_root.buttons[n].indexOf(":") == -1) {
//set the name to the value in the array
_root["item"+n].name = _root.buttons[n];
} else {
//set b to the index of the :
b = _root.buttons[n].indexOf(":");
//set the name to what comes before the :
_root["item"+n].name = _root.buttons[n].slice(0,b);
//set a variable in the button that says where the afterCol starts
_root["item"+n].afterCol = b+1;
}
}
}
if (_name != "item0") {
//line up with previous buttons
_x = _root.item0._x;
//add to the y based on the itemX value
_y = _root.item0._y - ((_yscale+3) * parseFloat(_name.slice(5)));
}
}
The button inside it has this:
Code:
on (release) {
getURL("http://www." + _name + _root.buttons[parseFloat(_name.slice(5))].slice(_root.buttons.indexOf(".") + 1));
}
I hope this is a good enough explanation, any hepl would be great.
View Replies !
View Related
|