Saving To Array And Pulling Out
Need some help. Trying to learn.
I have sections with questions and answers which I can get.
But, I need to save each section into new array and tally all the final scores.
The screen will show the section score of current section that was just completed
and the final score.
I know the code has lots of problems - attached.
For the total scores the dynamic text boxes var's are totalnumcorrect, totalnumIncorrect, totaluserScore.
For the section score the dynamic text boxes var's are numcorrect, totalnumIncorrect, totaluserScore.
The title changes for each section, so I using that with if statement.
Can someone help please.
Thanks
Attach Code
//final scores
var quizTitleNode=quizNode.firstChild;
title=quizTitleNode.firstChild.nodeValue;
//section scores
section[i] = new Array(numCorrect, numIncorrect, userScore);
// total score
if (quizTitleNode.firstChild.nodeValue = "Section 1: The Mountains") {
section[i] = section1;
}
else if
(quizTitleNode.firstChild.nodeValue = "section 2: The Fields") {
section[i] = section2;
}
else if
(quizTitleNode.firstChild.nodeValue = "section 3: The Rivers") {
section[i] = section3;
}
//section scores as nested arrays
sectionsArray = new Array (section1, section2, section3);
function countFinalScore() {
for(var i=0; i = sectionsArray[0].length; i++);
}
Adobe > ActionScript 1 and 2
Posted on: 09/23/2007 09:22:10 AM
View Complete Forum Thread with Replies
Sponsored Links:
Pulling/saving Swf Out Of Browser On A Mac...
ok, I dont want to rip it or anything, it my swf file that I published for a client about a year ago before my laptop got stolen. Now I don't have the fla anymore & I want to add it to my portfolio. I use IE and the cache does not save seperate files. How can I save it to my hard drive? Do I need a freeware of some kind? I can use a pc if its easier that way. Thx
View Replies !
View Related
Pulling From One Array, Inserting Into Another
I have a loop that sets up a number of arrays:
Code:
//for however many main menu items there are...
for (i=0; i<this.numberItems; i++){
//create empty subMenu arrays
set ("subMenu" + i, new Array);
}
I also have another array called subMenus.
what i want to do is pull an element from the subMenu array and put it into subMenu1.
I cannot for the life of me figure out how to do this.
View Replies !
View Related
Pulling Positions Out Of An Array
Hi I have an array with some postions in it.
for example mypositions:Array = [91,78,67,56,42,30];
What I want to do is pull them out of the array and place them and make them move.Like my_mc is at 91,I want it to move to 78,then to 67,then to 56
etc.
I have done this with a switch/case statement,but need to know how to do it with an array.
Thanks if anyone can help.
View Replies !
View Related
[CS3] Pulling Multiple Images From An Array (XML)
Actionscript 2
I have a fla set up to pull image paths from an XML and store them in an array. I have managed to get images from the array to display one at a time, but what I want to do is to pull all of the images in the array into a movie clip and line them up horizontally. I hit a wall where I don't know why my code doesn't work. Any help on my code, or an alternate solution would be great. Here's the code
Code:
//SETS UP THE LOOP AND LOOPS THROUGH THE ARRAY
for (var i = 0; i<nodeLength; i++) {
//LOADS EACH IMAGE INTO THE MOVIECLIP COVER_MC, WITH A UNIQUE INSTANCE NAME
_mp3Player.cover_mc.loadMovie(imageArray[i], "myImage"+i);
//POSITIONS EACH MOVIECLIP NEXT TO THE LAST
eval(_mp3Player.cover_mc["myImage"+i])._x = eval(_mp3Player.cover_mc["myImage"+(i-1)])._x+eval(_mp3Player.cover_mc["myImage"+i])._width;
}
I'm a little unclear about how brackets and eval work, and if I need them together. When I load the clips, only the last image in the array appears. That makes me think that they aren't getting unique name, and one image is just over writing the next.
Thanks in advance
View Replies !
View Related
Timeline And Pulling Content From Array
Hi,
I'm creating a timeline (see attached image below) from 1996 - 2006 with mile stones through the companies highlights in that year.
Some years have one article in them while others have 2 and some 11.
This timeline needs to be as dynamic as possible so that people can just add content to a text file and it will show up in the timeline.
I have an array with strings like this which sits in the first frame of the root:
PHP Code:
var articleLookup = new Array();
articleLookup["1996"] = "This is James";
articleLookup["1997-1"] = "This was James in 1971";
articleLookup["1997-2"] = "This was James in Jan of 1971";
articleLookup["1997-3"] = "This was James in Feb of 1971";
I have two movie clips; one called timeline_mc with my dates buttons in it
and
Another mc called content_mc with a dynamic textbox called contentText_txt.
In the timeline_mc is another mc called prevNext_mc with two buttons called prev_btn and next_btn
Now I have managed to pull in the content for 1996 when I push the 1996 button but my problem comes with 1997.
It pulls in the variable 1997-1 which is cool but I need to be able to show the content for 1997-2 and 1997-3 when the next_btn is pushed and backwards if I push the prev_btn.
There is another MC in the root called highlights_mc with a text box called highlightYear_txt. I am using this to determine what year has been clicked in an if statement (this is the route I think I should be following?). This IF statement sits in a loop created by the two frames in prevNext_mc.
Here is my code on the first frame of prevNext_mc:
PHP Code:
trace(_root.highlights_mc.highlightYear_txt.text);
if (_root.highlights_mc.highlightYear_txt.text == "1998") {
_root.articleLookup["1998-1"];
_root.articleLookup["1998-2"];
_root.articleLookup["1998-3"];
this.content_mc.prevNext_mc.next_btn = function() {
_root.content_mc.contentText_txt.text = _root.articleLookup["1998-2"];
};
}
There must be a more generic way of doing this?
Thanks in advance...
View Replies !
View Related
Pulling My Hair Out Copying An Array
I've been working on this problem all week and its driving me crazy. I have yet to find any way of making a copy of a multidimensional array that doesn't reference back to the original data. If you modify the original data the copied version changes as well, i've tried using the apply() method, i've used slice, splice, and about 4 other possible solutions from proto.layer51.com and NONE of them work.
Because the movies and data are dynamic the only way i can access the information is through references
_root.resultTree[obj.group][obj.slide]
i'm trying to make a copy from the obj.group level of the array and place it in the top of the array stack...i've yet to succed. why is this too much to ask? =(
View Replies !
View Related
Pulling Info From And Object Array And Using It To AttachMovies?
I have an object array on the root level of my movie:
logoArray = new Array();
logoArray[0] = {blur:"Bloomfield0",clear:"Bloomfield1"};
logoArray[1] = {blur:"CC0",clear:"CC1"};
and I'm tring to access that info from within another movie and use it to attach a movie into another:
dmy.attachMovie(_root.logoArray[x].blur, "Logo", 1);
When I trace the info I get all the correct info back but it is not attaching the movie.
If I put in an absolute name for the 'linkage' name it works fine.
How can I get it to read the array correctly???
View Replies !
View Related
Problems Pulling Variables From An Array Of Objects
Hey..
I'm created a isometric tile engine and I'm having some problems. I have a multidimensional array of "Tile" objects which is declared in a seperate .as file. Each tile object has a "select" movieclip. For some reason.. I cannot retrieve the movieclip from the tile object from my main program. I get undefined not matter what..
Here is the code from the tile object that declares the "select" variable:
Code:
this.select = attachMovie("Select","Select"+j+k,depth+98);
this.select._x = mapWidth - j * 32 + rowx + pushinx;
this.select._y = sety - 3;
this.select._visible = false;
and here is the retrieve code from the main program which returns undefined:
Code:
tilesArray[0][0].tile.select._visible = true;
what am I doing wrong here?
View Replies !
View Related
[Flash 8] Pulling Multiple Variables From An Array
Hello, first time post at KIRUPA.com. Hope somebody here may be able to point me in the correct direction.
I have an array question as the title explains.
Here's what I would like to accomplish:
search my array for the element (say Names) for tom (name from comboBox component)
and place the other fields(i think there called...age, picture) into either dynamic text fields or load the images into a loader component.
Code:
MyArray.Array= new Array
myArr=[name:"tom", age:"32", picture:"tomspicture.jpg"]
myArr=[name:"steve", age:"50", picture:"stevespicture.jpg"]
myArr=[name:"tom", age:"60", picture:"tomspicture.jpg"]
myArr=[name:"mark", age:"32", picture:"markspicture.jpg"]
name_mc.onRelease = function () {
myName= comboBoxName.value; // collect the value stored in the combo box component and sets it to myName
// here's the problem
// I'd like to have other boxes one for imageLoader to load the image variable
// an ageDynamic_txt box that loads the age variable
// and an nameDynamic_txt box that loads all the names variable
}
Plus is there a way to place the text in the field myArr= [ ... ,description:"I like cake"]
from a .txt file? (ie... I have a file named "desc.txt" with variables (des1)(des2) can I
pull it into the field [..., description: (des(myNuM)] so that myNum loads the specific description for that person?
Code:
desDynamicText_txt.text = myDesLV.des(myNum); // this is kinda the idea.
View Replies !
View Related
Saving An Array Then Importing Saved Array?
I am creating a kids activity. At the moment I am working on the stamp tool that allws them to stamp a shape in different colours over the canvas... this is working fine, however I need to track the position and colour (and maybe more later) so that the child can save the activity and go back to it later.
So far I have managed to create an array for each propery (_x position, _y position and colour) in seperate arrays as a new stamp is attached it is given a number (1,2,3,4...) and in each array entry of that number are the position or colour properties. When I save these arrays (using FSCommand in Flash5) I think thay form a string in the text document.
When I loads the array from the text document, that looks like this:
&colourArray=255,255,255,16711680,16711680,1671168 0,16711680,16711680,16711680,16711680&XposArray=23 3,420.95,389,262,556.95,674.95,619.95,481.95,458.9 5,280&YposArray=109,167,313,211,301,158,80,105,174 ,451.95
I cannot pull out the data from the arrays (colourArray[2] traces as undefined) What I want to do is a loop based on the lenght of one the arrays that attaches the stamp MC in the correct position and colour.
Hope someone can shed light on this for me... I think I need to find a way to convert the text file data from a string to an array?!?
Cheers
Oll
View Replies !
View Related
Array Saving
Hello
i have a library editor that generates an array
which i want to use in another swf the world editor
i save the array as as shared object which works fine
for the library editor but since shared objects are
unique to the swf the world editor will not find the array
ok i confused myself too..lol
ok how do i save a generated array ..so it can be used
in another swf (shared object won't work)
like generate a textfile
View Replies !
View Related
Saving Data From An 2-D Array
I'm making tennis a video game in flash where the computer gets better by learning from its mistakes. The mistake data is stored in a 2-d array. But every time I close the projector the computer has to learn all over again (and that takes too much time). Is there a way that I can save the data from the array in a file and then read that data every time I open the projector? Also why does my game slow down after it has been running for a while, is there a way to clear the memory or something?
View Replies !
View Related
Saving Data From A 2-D Array
I'm making tennis a video game in flash where the computer gets better by learning from its mistakes. The mistake data is stored in a 2-d array. But every time I close the projector the computer has to learn all over again (and that takes too much time). Is there a way that I can save the data from the array in a file and then read that data every time I open the projector? Also why does my game slow down after it has been running for a while, is there a way to clear the memory or something?
View Replies !
View Related
Saving Array To A Text File? Help
I've just finished a Flash project that collects data throughout its runtime and stores it all in an array. My question is how I can access that information. I've spent hours today trying to figure out how to save it to a text file, but I don't think it's possible (is it?). I've seen people talking about back ending with PHP (or something like that?). The thing is that I'm pretty far at the beginner stage of programming (started three weeks ago), and I have no idea what that means or how to do it. So would someone mind explaining to me how I can access the text in this array? Thanks!
View Replies !
View Related
Saving/Loading Data In An Array
Hey guys, I have a 2D array that has integer values. It is created by a map-editor of sorts for tiles in a grid. I want to be able to save it to a server and then load it later, so that users can create custom maps. How can I go about doing this?
Thanks!
Supra
View Replies !
View Related
Method Of Saving Array To Later Recall
Hi All
Ive just finished making a pretty good drum machine by making use of arrays and timer functions.
What I now want to consider is a way of storing the arrays which will contain the users drum patterns, as there is no way to record audio or save onto the users computer via flash. After being stored these could be recalled by the user when online.
I have some server space, and was wondering is there a way to send the array information onto the server to be retrieved by the user at a later date thus creating a method of saving. Can anyone give me a push in the right direction please? THX.
View Replies !
View Related
SharedObject - Problem Saving An Array
I want to save x and y position of the mouse every frame in array and copy it to disk with save button, so i could use last movements of mouse when I run program again.
I managed to get position to array, but when save button is clicked, array is saved, and it keep saving it every frame.
Here's example: save_mouse_pos
Here's my script:
Code:
posArr = new Array()
i = 0
function onEnterFrame(){
posArr[i] = [_xmouse,_ymouse]
i++
posArr_txt.text = posArr
data_txt.text = SO.data.filename
}
////////// Save Load //////////////////////////////////////////////////
SO = SharedObject.getLocal("savedFile")
save_btn.onRelease = function(){
SO.data.filename = posArr
trace("data saved")
}
Thanks in advance
View Replies !
View Related
HELP Pulling Url From XML
Hello,
First of all in the attachment is the flash that connects to the XML below.
In the flash AS i have setup the XML connection etc which works but when i put an onRelease function for the image to retrieve an url from the XML, it fails to do so.
Is it at all possible that someone can help me?
Thank you,
Carl
XML----------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>http://www.carltaylor.eu/untitled.JPG</image>
<link>http://www.carltaylor.eu</link>
</pic>
<pic>
<image>http://www.carltaylor.eu/untitled2.JPG</image>
<link>http://www.carltaylor.eu</link>
</pic>
</images>
View Replies !
View Related
HELP Pulling Url From XML
Hello,
First of all in the attachment is the flash that connects to the XML below.
In the flash AS i have setup the XML connection etc which works but when i put an onRelease function for the image to retrieve an url from the XML, it fails to do so.
Is it at all possible that someone can help me?
Thank you,
Carl
XML----------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>http://www.carltaylor.eu/untitled.JPG</image>
<link>http://www.carltaylor.eu</link>
</pic>
<pic>
<image>http://www.carltaylor.eu/untitled2.JPG</image>
<link>http://www.carltaylor.eu</link>
</pic>
</images>
View Replies !
View Related
HELP Pulling Url From XML
Hello,
First of all in the attachment is the flash that connects to the XML below.
In the flash AS i have setup the XML connection etc which works but when i put an onRelease function for the image to retrieve an url from the XML, it fails to do so.
Is it at all possible that someone can help me?
Thank you,
Carl
XML----------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>http://www.carltaylor.eu/untitled.JPG</image>
<link>http://www.carltaylor.eu</link>
</pic>
<pic>
<image>http://www.carltaylor.eu/untitled2.JPG</image>
<link>http://www.carltaylor.eu</link>
</pic>
</images>
View Replies !
View Related
Pulling Rgb Hex
HI,
I am using the tutorial on:
http://www.kirupa.com/developer/actionscript/color.htm and I am wondering if it is possible to put a dynamic text box on that page, and when you initally load the page, it will give the hex value, and when you rollover the "new color" that dynamic text box will change real time.
thanks
fyl
View Replies !
View Related
Pulling Variables From A URL:
Is this possible? Example:
someone goes to
http://www.server.com/flashmovie.html?variable=value
The .swf examines that URL, and parses it (is parse the right word?) such that the variable and value are extracted and used in the movie.
Maybe this is what generator is for, but I'm just looking for a way to get dynamic text into a movie..
View Replies !
View Related
Help Help Help, I'm Pulling My Hair Out
just to quickly outline the problem
need two buttons (next and previous) which can control a tweened timeline by playing the playhead backwards and forwards but will also stop at certain keframes to allow the user to read the content.
i don't want to use the old 'reverse frames' trick.
can anyone help?
ste
//////////below_ is the actual problem i have
lets say my movie clip is called 'myMC'
myMC has 40 frames and two layers
layer one has the text context i want to scroll. it will scroll top to bottom. the text content has four 'sections' these are;
text one
text two
text three
text four
layer one (still inside "myMC') has 4 keyframes, the text content is a symbol which is tweened between 4 keyframes (over the 40 frames of the timeline) to make it look like it is scrolling, when masked.
layer two is a mask
this masks off all the text content, so the viewer can only see one section at a time.
where do the buttons need to go? On the _root timeline or can they be inside "myMC' i only want two buttons controlling the text content, next and previous.
i need the buttons to be intellegent enough to know where the user is on the (myMC)time line so they can scroll the text content up and down.
the scrolling is simulated because all i want to do is make the buttons play the tween forwards or backwards and stop at the right place.
can you help?
i would be very very grateful if anyone could offer a solution to this problem, i've been tearing my hair out for four days on this one!
ste
View Replies !
View Related
Pulling Info Out Of URL
is there a way to get the _url property and strip off everything after a particular character and the file suffix?
So that all of the following would = "people"
people.asp
people_nameone.asp
people_nametwo.asp
so that no matter what the url is i just get the first word?
would appreciate the help.
Phatius
View Replies !
View Related
Pulling Out Hair
I have this damn code at home and I thought I remembered how to do it but it isn't working. I am trying to create and empty movieclip with actionscipt and then fill it with a graphic from my library. So I made the graphic ready for export for actionscript and gave it the name border. Then I wrote this code on the first frame of my movie:
Border.createEmptyMovieClip("newBorder",1);
newBorder.attatchMovieClip("border","newB",1);
I know I am really close but the damn thing won't work. I have it right at home but I don't want to go there to figure it out. Thanks
View Replies !
View Related
Pulling My Hair Out
ok, i know this has a simple solution but i just am unaware of it.
my problem is with loading movies. if i load them on to a seperate layer (exam: the main is on layer 0 and the rest are on 1) then the main page on layer zero flashes up in between loads.
i am now trying to use a holder but am having probs with it. do i want to load to different levels or use a holder in some way?
if i want to use the unloadmovie then how do i factor that in?
please please help!!!!!!
thanks,
lawrence
View Replies !
View Related
Help Pulling Lines From A Cgi Doc
Hi. I'm making a screensaver for a chat-centric website. I would like to build one that pulls random lines from our "quotes" page. The quotes are sitting on a document on the save server. How can I pull a random line every few seconds to display somewhere in the screensaver? I would also like this to reflect any changes made to the original quote doc in real time.
Thank You.
View Replies !
View Related
Pulling My Hair Out
http://www.itclimate.com/test/index.htm
I really don't know what's going on here and I'm starting to think I've bitten off more than I can chew!
This site works perfectly when I test it locally (using Flash 5) but when I upload it, the buttons just point to any old page in no particular order. "Downloads" is the main problem. If you click this button it always seems to take you into the case studies and then the case study buttons won't work. Once the user has clicked a few times it seems to rectify itself but initially, it's a real mess. Every time I upload it, the worse it gets!
I'm quite new to Flash, so I've tried to keep the site as simple as possible. Each section is a new 5-frame scene (with the exception of the case studies - these are much longer but also broken up into scenes). The only Actionscripting I have used is to tell buttons to point to a specific scene. Once they're in that scene they will always start at Frame 1.
I've also noticed in the How It Works section that when the user clicks the last button (Security) it closes the window. This button is meant to work as the rest do and go to the section on Security. I have tried deleting the button and uploading the site without it but then the same thing happens to the next button (i.e. Time).
Has anyone experienced this type of thing before? Can anyone help me??? Pleeeeease?
P.S. The login button takes you out of the website into another one, so don't click it.
View Replies !
View Related
Hairless From Pulling.
You guys said there are no dumb questions...well here is one.
In the "Swish" application there is an effect you can apply to text called "Transform". I have seen this used in many flash presentations. the letters appear as if hovering above the page for a second and then fall to the final position in rapid succession as if someone where dealing them out like a deck of cards.
I have spent a painful amount of time trying to duplicate this effect in MX, by trying breaking appart the letters and putting them on layers and then transform the size and use motion tweening. I have tried different lengths of the tween.. i have changed the fps setting. I have tried different amounts of overlap... nothing seems to work. It never plays fast enough and I cant get the fade-in effect to look correct. I am using a font called Black Adder II.
If anyone knows the secret to this, simple, I am assuming, Technique, can you please post. or email me at mr65mike@comcast.net before i need a toupe`
View Replies !
View Related
Pulling My Hair Out
i have a question about loading movies and how their timelines work.
i have am almost finished this movie and have taken my self and AS to a new personal.
my movie is quite smart (my opinion) but has a little bug.
is anyone here on im ...i just dont know if i can ask my question right here.
i have two actually. one i dont think i can explain here.
and the other is this.
can i dynamically load a dir of images. i am pulling in a lot of jpgs dynamicall and want to know if i can load them witha preloader movie clip.
thanks
my icq is #34491500
View Replies !
View Related
Pulling In Variables...
I'm using a piece of code in a banner ad I'm working on that would normally look like this:
Code:
http://********found.com/bin/gethtml...p?affid=405&mt=<%=term%>
Notice the .asp call to pull a search term using the variable "term" on an .asp page. The problem is that I have been having a hard time making flash clickable. I can create an alpha 0% button but then I need to pass the the varible "term" into the actionscript using the getURL function. Can this be done? I'm assuming actionscript has escape characters just like the
Code:
<% %>
tags in .asp but I can't find them.
Any Takers???
View Replies !
View Related
Pulling My Hair Out
I'm completely lost.
I'm trying to create a simple email form from this tute.
http://www.actionscript.org/tutorials/intermediate/php_send_mail/index.shtml
From what I gather all need to do is change the email addy in the php file to my own and upload both the swf and php files to my server.
But I've done this on 2 different servers and changed the email addy to 3 different ones and it wont work.
I cant get it to work.
I've tried for days before I decided to throw myself at the mercy of the board.
I'd be eternally greatfull for any help I could get.
View Replies !
View Related
Pulling My Hair Out
I am trying to do some (what I thought) was easy error checking on a form.
Here is my code:
code:
if (_root.hello.helloForm.name.cName=="") {
_root.txtStatus="please enter your name";
}
//_root.txtStatus=_root.hello.helloForm.name.cName;
//selection.setFocus("_root.hello.helloForm.name.cNa me");
the commented out lines work just fine. But the if statement does nothing. There is something SIMPLE that I am overlooking here. I just can't seem to see it. Thank you for your time and help!
View Replies !
View Related
Pulling My Hair Out
Hello, I hope there is somebody out there with enough knowledge to help sort out the problem I am having with this movie.
Attached is a movie and on it's own in flash player or even in a browser it works great. If I introduce the movie into my site www.gtgrafix.com and view it again then a certain part of the actionscript fails to work. The bit I am talking about is the number (101) will no longer change with the loading of the images. Like I say, viewed on it's own in flash player it works fine.
The images are externally loaded so they will not appear. Can somebody please help.
Cheers
Gary
View Replies !
View Related
Pulling My Hair Out
Hello all,
I want to make a song player/m3player on my flash site.
the details:
All i want is a play, stop, next, and previous button while you can view the song being loaded/played. Thats all!!!! I dont' want a song list, i just want it to just skip to the next song i have. No volume button.
I can't find a tutorial anywhere.
I am trying to accomplish the player similar to the one below (please click). Notice: where it says "Audio".
http://www.bimarkinc.com/website/index.htm
PLEASE HELP ME SAVE MY HAIR!!!! Thank you all
View Replies !
View Related
Pulling My Hair Out
So glad you're here!!!
Here's the problem:
I have five buttons - each has the same audio "bleep" sound on the over state.
My problem is that when I click on my button, the over sound plays again.
My Over keyframe contains the little one second audio file. My Down keyframe is blank. So is the hit. So I can't figure out why it would play twice.
any ideas? I've been troubleshooting this glitch for 2 hours
cheers
jen
View Replies !
View Related
Still Pulling Hair Out
I have attached a preloader (5kb) that needs fixed! I cannot figure it out! It is in MX format. Right now the preloader sits in the first frame and runs untill all frames have loaded. Not all the content! So basically the preloader says its done loading the site, and then you sit there waiting for the site to actually load!
Very easy for someone here so please take a look see. Basically I want the preloader to load 100% of the movie.
My grads go out to all that are here and helping!
View Replies !
View Related
Im Pulling Out My Hair.......
ok i have an xml file loading images....works great....it also makes thumbnails....also works great. But when i mouse over the thumbnails....i want a fade transition....this is where i blow it.....it works some of the times....what is wrong with this code? im i retarded? or what?
PHP Code:
thumbHolder.onRollOver = function() {
inte.loader2.loadMovie(this.main);
pic = this.main;
alpha = 10;
inte.loader2._alpha = 0;
onEnterFrame = function () {
_root.inte.loader2._alpha +=10;
if (_root.inte.loader2._alpha>=99) {
inte.loader.loadMovie(pic);
onEnterFrame = null;
}
};
};
View Replies !
View Related
Pulling Text
Hi. I'm new to both the forums and actionscripting.
I'm creating a Menu that I need to perform the following actions.
1. Open a submenu.
2. Have links on that sub menu pull from a txt file so that I (or others) can update them easily.
3. Set the menu at a certain width and height in pixels and then have it expand over the page to the length of the Menu + The Submenu without pushing down the rest of the page. To overlap it so to speak.
Anyway. I have looked through the tutorial and found what appears to be a good one with regards to Number 2.
http://www.flashkit.com/tutorials/Dy...-988/index.php
I've tried to replicate the tutorial but am encountering an error.
I create a text file called textfile.txt with the following text.
Code:
"myText="This is a test. <a href="test.asp">Test Link</a>&
I create a new flash document using Flash MX Pro 2k4 and call it test.fla.
I save it to the desktop where the text file is located.
I add a dynamic text box and name it textbox, and then on the first frame I add the following action script.
Code:
System.useCodepage=true;
textbox.html=true;
myLoadVar = new LoadVars ();
myLoadVar.load("textfile.txt");
myLoadVar.onLoad = function (success) {
if (success == true) {
textbox.htmlText=myLoadVar.myText;
}
}
When I save and view the .swf all i see is the word undefined.
The first and third problem I can probably resolve at a later date, but i mentioned them just incase anyone reading this can point me to a good tutorial for that. My real concern is getting it to pull text from a txt file. As soon as I figure this out I can start fiddling with it to, so that it will format properly. Also as a side note will I have to create a different text file for each submenu? Or just a different variables for each submenu heading within the same file.
Edit. Here is an example of the menu I'm working on. http://www.geocities.com/bebarce/menuflash.html
View Replies !
View Related
[MX] Help Please I Am Pulling Out My Hair Here.....
I have more than one .swf and I have set it up to where you click and it opens to the next .swf but the problem is i need the 2nd .swf file to open with the navigation buttons and logo still on the top. right now it is just blank on top because it is opening but all by it's self? So, basically...I am trying to figure out how to have the navigation buttons and logo at the top?
View Replies !
View Related
[F8] Pushing/Pulling.
Well... I wasn't sure if I should post this in newbie section because I am a noob or in the regular flash help section, I decided to play it safe and go with the former, obviously.
Anyways I've searched for about an hour and a half, I thought I found a few helpful things but not enough to satisfy my question. Search has failed me ):
I am making a side scrolling-platform sort of story. I have some questions. I hope nobody minds.
1) All right -- Uh, first -- I am curious to a "push" and "pull" sort of command. But it's kind of complex. Think Valkyrie Profile for those who have ever played it. Let's say the key to start is "Z". When pressing Z, I want it to check if there is an object that the character can grab onto. If not it just does nothing.
Now say there is an object. Character presses Z. This will make the Character have the "GrabWait" graphic.
Code:
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.getCode() == 90) {
// GRABBING ON
this.characterMC.gotoAndStop("grabWait");
}
};
Key.addListener(keyListener);
The above is only checking if person pressed Z and the character is grabbing on despite checking if an object is in front of him -- so how to do that?
2) Ok so he's grabbed onto something. I want the Left and Right arrow keys to make him either push or pull. But -- He has to be holding "Z" key all the while, while he holds down left or right arrow to push or pull. If he lets go of Left or right arrow, he will return to "grabWait" graphic. If he lets go of "Z", he will return to regular standing position.
3) Yeah, and the last bit is -- so if he's pushing/pulling, how do you make the object he is pushing/pulling move?
Is this too much to ask? Thanks in advance. I am a freaking noob.
Edit: yeah... and that code is probably wrong |: I don't know how to use that stupid keylistener thing.
View Replies !
View Related
Add A Swf To Actionscript Pulling In Xml
I followed the kirupa portfolio tutorial to have scrolling thumbnails that when you click on them brings up the large image. I also wanted to add a description, but in the form of a scrolling swf.
I tried to add it but just can't get it to work. If anyone can help me I would deeply appreciate it, I've been working on this forever!
The flash:http://64.85.1.68/richmondhistorycen...-scrolling.fla
XML: http://64.85.1.68/richmondhistorycen...udioscroll.xml
SWF: (two examples)
http://64.85.1.68/richmondhistorycenter/studiotext1.swf
http://64.85.1.68/richmondhistorycenter/studiotext2.swf
View Replies !
View Related
Pulling Text Into An FLA
Does anyone know of a tutorial of how to pull text (for webpage content) into a swf from a txt file?
I want to make a flash site that will be easy to update by saving .txt files and reuploading.
Any help would be appreciated.
View Replies !
View Related
Pulling HTML From XML
extraInfo is a textField, and I want to assign it text that might have html formatting:
ActionScript Code:
extraInfo.htmlText=info.info[0];
This is the entry in my XML:
ActionScript Code:
<info>Testing the <i>italics</i> in html.</info>
But what the textField ends up displaying is:
Quote:
Testing the
italics
in html.
What should I do to avoid those extra lines?
View Replies !
View Related
|