Flash :: Add Multiple Categories To ActionScript Variables?
Dec 12, 2011
I am a designer trying to modify some ActionScript for a web project. When defining the variables, I would like for some of them to have multiple parameters/categories[code]...
I'm using a combination of the Photo Gallery using XML and Flash (with thumbnails and a simple PHP gallery script called Gallery Thingie. So far,I've got the XML file's image data working with the Flash movie. However, Gallery Thingie also has a feature allowing the creation (and deletion) of image categories. How can I use this feature with the flash gallery? So far I've added some buttons that would switch between categories, but they don't do much yet since I'm not sure how to say "when this category variable is present, display only thumbnails with that variable." Download the flash file (and others) from the link below.
ActionScript Code: /*Code for loading XML file. */ function loadXML(loaded) {[code].............
This may be a weird question, but I'm wondering if there's any way to efficiently (perhaps using namespaces?) have different default variables in a class per developer in an actionscript project. I ask because we're currently working on a series of Flash games: 24 in total. Each is loaded by a shell container. The shell receives a flash var for which game to load. In our development environment (Flash/FlashDevelop), there are no flashvars, so a constant in the AS defines which game to load when there's no flashvar:
I'm rebuilding this embedable player for a client of mine, the video file URL and a couple of other variables are in the HTML as Flashvars. I suspect something is wrong with the code that looks for the flashvars.
The top part showing the green box is where the player didn't load because it was unable to obtain the Flashvars form the HTML. The player below has the Flashvars string hardcoded into the player so it works.
I believe the problem lies somewhere below Perhaps something wrong with the way I'm trying to pull in the Flashvars?
// LIVE Embedded //vidURL = stage.loaderInfo.parameters.fvar; vidURL = this.loaderInfo.parameters.fvar;
I am trying to make a form in Flash that has multiple variables, i then want to use a PHP form to send them in an email but can't get it to work. I think that I'm not properly setting up the PHP file for multiple variables:
When I pass a single variable (telephone) from Flash using the below it works fine
var xmlSaveLoader:URLLoader = new URLLoader(); xmlSaveLoader.load(new URLRequest("customer_insert.php?telephone="+teleph one));
I can read the variable in PHP using $key_telephone = $HTTP_GET_VARS[telephone];
and then run sql command to insert into table customers mysql_query("INSERT into customers (telephone) values ($key_telephone) ");
However, I have a problem and don't know how to pass multiple variables to PHP. I tried the following to pass a second variable (first_name)but it doesn't seem to work... xmlSaveLoader.load(new URLRequest("customer_insert.php?telephone="+teleph one+"&first_name="+first_name));
I've made a gallery slideshow before but wasn't as intuitive looking back at it now and I want to start fresh on this new project. I would like to convert a jQuery lightbox style gallery into a flash XML based AS3 image gallery with categories. I don't want to code the FLA, I want separate AS files.
This is a school project for my website. I would use jQuery and I have more experience with it but this project needs a flash component. I'm just not sure where to start and looking for some advice on how and where I could find resources. I want it to be minimal as I can make it;
- 8 thumbnails to a "page/section" with more flowed into page 2 or 3 etc. (or a srcoller)
- a few buttons for categories
- images fading in full size with a description when hovered over and a close button
- preloader (simple bar)
Esentially something like this > http:[url].........works which is using http:[url].... for the thumbnails. That might be ambitious but I'd suffice with a simple fade effect.I've downloaded some galleries out there but most of the code is messy or outdated.http:[url]... this is alright, but all the code is done in the FLA. I might break it into AS files but it depends.
I was wondering if there is a way to jump to a specific frame name when loading a new .swf file? For example, I have my Main.swf which holds the navigation. Then I created 5 other .swfs to hold the content.Depending what button is pushed, I will load the correct movie into a placeholder MC on the main screen.However, I want to jump to a specific point within the new movie, can I do that? I am loading by levels in which I am using the level 0 each time so the new page takes over and the previous page is not transparent seeing through. So, on the buttons, I am using the basic:
on (release) { loadMovieNum ("content1.swf", 0); }[code]....
I tried that, but could not get it to work. Also, since I am loading by level, does that sort of over ride my loading into placehold or what is the major difference?
I found a multiple drag to a single drop example here on the forums that works wonderful for the dragging and dropping part of my project. I am now trying to add in a sort of category detection. I have 45 movieclips located on the stage. They get set up with a loop, giving them a drag/drop functionality. The movieclips belong to one of 7 categories. The user can drag only 5 movieclips to a designated area. Once the 5 have been selected, I need to then figure out which category had the most selected. What would be the best way to set this up? Here is what I'm working with so far
I'm trying to populate a sub menu with categories from an xml file. There are many items each with different categories but some with the same, what im trying to do is get all the categories in the menu but not duplicate them.
I still have problem understanding how the collision category works. I'm only able to make it work by experimenting which is not good.
[Code]...
this works the way I wanted but only because I experimented around and found the right values (or at least values that work). I would prefer to know how the whole system works
are there any good examples on how to create a menu which gets the menu points from an external source? i'm not a native english speaker - hope you understand what i mean.preferably with submenu points... (drop down or hierarchial)
I have created an xml navigation and there are some differen categories in it.But now I want that the button will have a color that is his categorie.I used this code:
Code: if( menuItem[i].attributes.cat == "Vector work"){ var myColor:Color = new Color(); this.myColor.setRGB(0xff0000); } But that won't do nothing.
are there any good examples on how to create a menu which gets the menu points from an external source? i'm not a native english speaker - hope you understand what i mean.
I have created an xml navigation and there are some differen categories in it. But now I want that the button will have a color that is his categorie. I used this code:
I have xml video player. In the xml playlists i can different categories. Which video category i want to play i chose that from the drop down menu. Is there a way to somehow get the code so instead of dropdown menu in playlist for the playlist categories i would like to have two separate buttons for categories insted of drop down menu?
I have an xml that's looks like this: Code: <?xml version="1.0" encoding="utf-8"?> <pics><category name="categoria1"> <image NAME="1" PATH="images/1.jpg" DESCRIPTION="SALAM"/> <image NAME="2" PATH="images/2.jpg" DESCRIPTION="SALAM2"/> <image NAME="9" PATH="images/3.jpg" DESCRIPTION="SALAM3"/> [Code] .....
As you can see i have categories and inside the categories I have the pictures. What I want to do is every category to be displayed with a lower y position than the previous category. And in every category the picture to be arrange in the way presented in the picture below (x position for images = 0, the picture is just to make an idea).[URL]
My as3 code looks like this: import fl.transitions.Tween; import fl.transitions.easing.*; var _total:int = 0; var _categories:XMLList = null; var _subCategories:XMLList = null; [Code] .....
I've been working on Todd's Image grid viewer that can be seen here viewtopic.php?f=9&t=16158&p=82039
I wanted to add some category buttons so far its going well with the new xml.
Only I can't figure out the switch between the category button.
When i click on cat 1 Btn everything loads fine then when i click on cat btn 2 instead of reloading and "throwing" cat1 content away cat 2 content loads behind cat1 content...I hope that made sense.....
I have added the files, it's basically the same just a different XML and some tweaking on the XML load function. I didn't add the images since the file was to big, you can get the images from Todd's post. viewtopic.php?f=9&t=16158&p=82039
Basically i want to have Album categories the same way the thumbnails work so their is a mask limiting 4 categories on screen and when you click < or > arrows next to the categories it shows the next 4 categories that you would be able to choose from.
Then I would want it to load whatever category you selected into the thumbnails and the larger pic.
Does anyone know how to do this ? Or if their is another tutorial that would show me how to add categories into something like a gallery with thumbnails?
Apologies for being stupid and the poor grammar I've been searching everywhere to find out how i can add in some categories and still have it linked to the thumbnail scroller and larger images, but i haven't found any luck at all I just want it so you could add in as many thumbs and categories as you wanted and have those masked and scrollable rather then a dropdown.
I paid for some silly pdfs to explain it better to me but they did it in a way that I didn't like and turned out just to be a waste of money. Learnt my lesson and signed up here to ask the pros! I want to create something that can be updated from just an xml file.
I'm trying to declare a few variables in a for statement using the variable in the for statement. In older flash versions I would use something like this.
Code: for(a=0;a<10;a++) { _root["variable"+a] = "Some text "+a;
I want to declare on multiple numerated variables like this:
var myVar1; var myVar2;
But I don't want to do this manually for every variable instance but automatically, so I need a way to instruct the compiler to declare by himself on every variable and to numerate them automatically.
So hopefully I explained myself well, I wanted to know if there is such way to do this?
Currently I have a simple setup which sends some data to PHP and then PHP returns a variable to flash. I have no problem tracing out the returned variable in Flash, however i'm strugling to send back more than one variable.[code]If I remove the trace and echo for fromPHP2, it's all good, however with with my second echo for fromPHP2 it just gives me back undefined:[code]It seems that fromPHP1 is basically returning both echo's.
i can trace out 'levelNum' and it traces out fine. i can trace out 'questionNum[currentQuestionNum]' and it traces out fine.basically without any variables my object array would look like this:
lvl(1 or 2)Questions[(a # here)].correctAnswer.
But my trace is not working and i'm not sure how to group that all together.