ActionScript 3.0 :: Scrolling Through Array Entries With Keystrokes?
Feb 20, 2012
I'm learning Flash to make a website for one of the companies I work forI have a decent portfolio page that loads content information from an .xml document. I'm just thrilled that it works, but my boss wants a little more.He wants to be able to scroll through the entries with left and right keystrokes. In the glow of my recent array-building triumph, I told him, 'sure, I can do that!' ...but I can't. I can't figure out how to make the left and right keys go to previous or next entries. With previous problems I've been able to find an answer by searching google, but I'm stuck on this one.
Here's my code:
var titleArray:Array = new Array();
var descriptionArray:Array = new Array();
[code]....
View 3 Replies
Similar Posts:
Mar 17, 2009
I am making a webTV player, and I have a combobox displaying the entries. When scrolling the combobox, the scrolling jumps between the entries. I would like to have it scroll though the entries smoothly and not jump.
View 1 Replies
May 4, 2010
I have the following XML
[Code]...
What I want to be able to do is to extract all of the items listed in the categories and put them into an array as individual items. So would like have an array that contained Cosmetics, Pharmaceuticals, Food, Sportswear, Football, Rugby and Tennis as individual items within the array.
View 6 Replies
Jul 28, 2011
I want to delete the duplicate entries in an array. So I have tried the code I atach to this post. I have proved all the posible combinations but no one seems to work.This is the code I have writen:
Code:
package
{
[code].....
View 5 Replies
May 30, 2009
How might I go about creating an array, and then use AS to input a range of entries dynamically.
For example, imagine I wanted to create an array with 9 null entries.[code]....
View 1 Replies
Feb 22, 2011
I'm doing a little weather web app in flash.So i read an xml feed and copose an array of data from it.[code]Now what i would like to do is to find and trace the entry in mydate array which have a a value that approach the most to "currenthour" variable (which is my current time i'm getting upper).For exemple if currenthour = 11.In the case that i have myhour array equal to 5 , 10 , 14 , 20.The best match will be myhour[1].
View 2 Replies
May 17, 2010
Have an array which contains items in a comma delimited list such as below:
Code:
men,women,kids
outdoor,adventure
holidays,adventure
Am trying to use toString().split to further seperate them into individual entries in the array and it ain't working.
[Code]...
View 2 Replies
Apr 11, 2011
I am making a password protected site. I have made the site function that the proper password is required and once submitted the user gets linked to the next page.I want the password text box to not accept anything from the keyboard except for the ctrl+paste function. how to disable certain keystrokes using AS3? I want the letters A-Z disabled with the exception of the letter V.
View 2 Replies
Sep 26, 2009
Is it possible to handle keystrokes WHILE dragging? I found this to be impossible, because hitting a key always fires an "onRelease" or "onReleaseOutside" event on the dragged movieclip when releasing the key - intterupting the drag operation. What I want to do is something like this: Drag and Drop a Movieclip and while dragging it I want to be able to flip it with a keystroke.
[Code]...
View 2 Replies
Sep 25, 2006
I have a little application running and I want the Page Up and Down Buttons to do something when pressed. For some reason though, when I am testing the movie and I press the buttons nothing will happen. I can't even trace anything.It seems to be the case with all of the "Document Keys" (Home, End, Delete, PgUp, PgDown), but not with any of the others.
View 4 Replies
Dec 11, 2011
Can keylisteners be used to record keystrokes for later playback? If not, what can? The goal is to develop a way for individuals to make their own music via keypresses. For example: The R key is pressed to start the recording of the user's keyboard, with each keystroke assigned to play a different movieclip/audio, etc. The S key is then pressed to stop the recording. Lastly, the P key is pressed to play those movieclips/audio,etc. in their recorded sequence at the enjoyment of the individiual user.
[Code]...
View 8 Replies
Apr 4, 2007
I have a movie with a blank mc on the stage. I have it set up so that when you press the RIGHT keyboard key it loads another movie in that mc. Here's the code for that:
Code:
stop();
this.onKeyDown = function() {
if (Key.getCode() == Key.RIGHT) {
[Code]....
If I have more than one movie, how do I code it so that when I press the RIGHT key again it loads another movie as well as goes back when I press the LEFT?
View 2 Replies
Jan 23, 2010
when I test my project in flash CS4, both the flash player and the authoring tool detect my keystrokes. Is there a way to make the authoring tool ignore key input while testing a movie, since I really only intend the key presses for the movie?
has anyone else found trace() to be much, much slower in CS4?
View 1 Replies
Jan 11, 2011
I am accessing some games that my company built using a AIR browser (allowing us to sell an installable product on a CD, but keeping the content online for ease of maintenance). I can get the games to load, but i cant get them to accept keystrokes, ie: we have a tetris-like game that isnt getting any of the arrow key inputs. I'm fairly certain this has something to do with a focus issue, but I have no idea how to fix it.
View 2 Replies
Jul 26, 2010
As the title suggests, is it possible to capture system-level keystrokes?
View 3 Replies
Sep 15, 2010
Some of my Flash application components require to intercept Ctrl + F4 keyboard events. Unfortunately, the KeyboardEvent is not caught when running the app under IE since it is conflicting with the IE native shortcut (closing the active tab). Is there a way (ideally relying on Flash principles) to intercept such keystrokes?
View 2 Replies
Jan 1, 2010
I've written a little video game in Flex that runs in a browser. The player moves by pushing the arrow buttons on the keyboard, so I need to capture those keystrokes. In fact, the game action starts when the player presses one of those keys.In order to capture the keystrokes, the Flash/Flex application, not just the browser, needs to have the focus.How can I ensure that the application has the focus? I've implemented a bit of a hack: A "Begin" button you must click to start the game. The only point of this button is to ensure that the app has the focus.
View 2 Replies
Jun 27, 2011
I deal with arrays a lot in flash and I usually find myself doing:
f1 = row[6];
f2 = row[7];
f3 = row[8];
f4 = row[9];
f5 = row[10]
And imagine sometimes I have 50 array elements.. and i have to declare them to a variable 1 by 1. I wish there was a function to enumerate through an array 1 by 1, that moves the pointer next or back.. like in PHP, to make our lives easier.
Something like:
f1 = NextArrayElement(row);
f2 = NextArrayElement(row);
f3 = NextArrayElement(row);
f4 = NextArrayElement(row);
f5 = NextArrayElement(row);
Looked thru the docs and I cant find anything.. I tried doing:
a_i=0; //array index
cid2 = row[0];
sid_pri = row[a_i++];
sid_sec = row[a_i++];
bid = row[a_i++];
model = row[a_i++];
but that didn't quite work.
View 11 Replies
Jul 30, 2010
I want to display RSS newsfeed entries (headline, date, description) and animate in the first 5 entries automatically.[code]...
View 9 Replies
Aug 11, 2009
a problem I'm having with passing some validation in a form im creating.For the sake of getting to the point, I have two Textfields in my form lets say email_txt and friendsEmail_txt. What I would like to do is validate the two fields to make sure the user does not put the same email address in both fields.Im sure I need to do this via a function but I'm lost as to how to go about it. I googled for about an hour and perhaps im not qeurying it properly as I could not find any answers - Im sure there is one.
View 4 Replies
Aug 12, 2010
My AS3 class has some quirks. It's sort of a guestbook, so someone can add a 'question'under a certain category. When I publish the results in a dynamic textfield or when I trace the results I get the existing XML values and some undefined ones.This is my AS3 script:
Code:
//Class name is AddQuestionMenu
public function AddQuestionMenu()
[code].....
View 6 Replies
Jun 30, 2011
For a number of reasons (which I wont bore you with) we may have to interface our FMS servers over an NFS mesh to share disks. For example we have 6 core sites around the world and we want all core sites to see each others primary content store. Whilst we sort out the commercials for Aspera or similar to handle file replication properly, I had the idea to use <streams> to remotely mount each others disks (The disk systems here present themselves as NAS via NFS)So before you say No, don't do it im not sure I have a lot of choice at present.Its a large global core/edge deployment and the edges are implicitly configured to their origin.If i DID want to do it how many <streams> can I define before the server ignores them?
View 1 Replies
Jan 4, 2010
i have a flash file that has a MovieClip, instance name "entry", on the stage.this movieclip has 2 dynamic textfield inside of it. i have and XML file with 5 entries that contain "title" and "description" each, how could i use one MovieClip to display all of the entries at once.do i have to duplicate "entry" MovieClip or do i have to create a different class for the movieclip?
View 6 Replies
May 1, 2009
Essentially i have a 5 section image gallery that pulls its' caption and image file from an XML file. 1 xml file for each section. Within each section I also have x number of buttons allowing you to click through the images....
button1 is for image 1
button2 is for image 2 .... so on and son....
My ISSUE: As it is right now -- each section has a set number of images. BUT.....(always a but)
To add more images, I have to:
1. Add the xml tags in (not a big deal)
2. Open up flash, and manually add a button (which is a movieClip)
3. Open up the actions and add another function..... Which consists of this code:
Code: Select allfunction threeClick_1(e:Event):void
{
// FIRST WE HAVE TO LOAD THE IMAGES VIA THE XML FILE
var imageLoader:Loader;
[Code]....
Is there a way for flash to scroll through the xml file and if there are more image tags ---- add a button to the stage --- and associate it with the next image?
View 1 Replies
Dec 16, 2006
I have a detailed results page to which I want to post all the questions, answers, and whether the user answered correctly or incorrectly. All this information is stored in a multidimensional array and its successfully showing the results via the trace method.
My question is, what is the syntax for populating a dynamic text field with these results? Do I just write out one long line of AS with the newline command to separate the data? How would I go about applying bold to certain parts of the stored data that I will be showing?
Here is current code for my detailed results page:
function showResults(){
trace("Now showing results");
for(var i:Number = 0; i < NumberOfChallenges; i++){ //This calls the length of the original array (not the spliced copy)
[Code]....
View 1 Replies
Feb 7, 2010
I have this flash game. In it there is one movie clip called address_group. In address_group I have another MC called address. In address I have many text fields. Their info is being loaded from a xml file called database.xml. In the timeline where my address_group MC is located I have placed this code to load the XML data to flash:
var planet_title = new Array();
var planet_subtitle = new Array();
var chevron1_txt = new Array();
var chevron2_txt = new Array();
var chevron3_txt = new Array();
[Code] .....
My problem is that when there is a second <planet title_planet="Name"....> the new info from the second input which should be a new entry which means that I want when there is a second input this address_group to duplicate and in it to be placed the info from the second entry. But it doesn't do that it loads the second info over the first one in the flash. So my question is how to make flash to detect if there is something written as second entry or third or forth and so on... and than when it detects to duplicate this address_group Movie Clip and in it to put the info from the second entry if they are 3 to make 3 copies of the MC and put in each the different information....
View 22 Replies
Jan 22, 2011
I'm dynamically creating an IList to use as a dataprovider for a DropDownList in Flex.
The code is creating the IList correctly, and I can access the data inside just fine.
However, when I set the dataprovider for my DropDownList, it only shows blank entries for each item in the list.[code]...
View 1 Replies
Feb 12, 2010
I have a font in the library. I use this font for all the menu entries and other things.
how can i set this font for the entire stage within specifying it for every menu entries?
View 1 Replies
Nov 19, 2010
I just did Kirupa's (excellent) XML/AS3 tutorial, and I still have one important question. How can I set up and search for an XML node with multiple entries?
for example:
Code:
<Movie>
<MovieTitle>Nine Months</MovieTitle>
<Actors>Hugh Grant, Julianne Moore, Tom Arnold</Actors>
<Movie>
That way, I can use a "for" loop or something (?) to search for actor Hugh Grant, and it'll return all of his (excellent) movies.
View 2 Replies
Feb 15, 2011
And if they do does the uninstall remove them? Sorry I am such a noob!
View 2 Replies