ActionScript 1/2 :: Image Selection Based On Criteria And Filename
May 28, 2009
Here is what I'm trying to do. I have a sunroom product that is available with several different options. I have created images of every possible combination of options, and named the files like this:
DeckFurniture_NoVisor_ClearGlass_View1.jpg
Hot Tub_Visor_TintedGlass_View3.jpg
I want users to be able to choose their options, and have the appropriate picture be displayed. So to get the above image, they'd have to choose "Deck Furniture" "No Visor" "Clear Glass" and "View 1". Or to get the other one they'd choose "Hot Tub" "Yes Visor" "Tinted Glass" and "View 3"
It's not necessary to have it auto-update the image, so I was thinking they could choose their options and then click "Update", and that would in a sense pull up the correct filename from the options they've chosen. I'm not exactly sure how to tell Flash to change this master variable (the filename) whenever one of the sub-variables (pieces in the filename) change. Would I have to put a script on each option button telling it when it gets selected to change the master variable?
View 5 Replies
Similar Posts:
Jun 26, 2010
I try to embed images in a mx:tree:
<mx:Tree labelField="name" id="tree"
folderOpenIcon="@Embed(source='assets/images/test.png')"
folderClosedIcon="@Embed(source='assets/images/test.png')"
defaultLeafIcon="@Embed(source='assets/images/test.png')">
</mx:Tree>
This works fine, but I will embed the images with a String variable.
[Code]...
View 3 Replies
Aug 21, 2010
I'm currently working on a flash app, that enables the user to select a background image and later save that layout.
Things i have done so far[code]...
My Problem is:
1. How can i get the path and filename of the inserted image?
2. how can i copy the selected background image to the folder where the user saves it's layout?
View 1 Replies
Sep 14, 2011
how I would go about to accomplish the following:
There should be 3 dropdown menus with predefined words
1. First menu has 3 predefined options
2. The second dropdown has 5 options.
3. The third dropdown has 3 options
--> Depending on which word is selected in dropdown #2, an img (of a total of 5 possibilities) is being displayed
In addition there is a dynamic textfield, where you can enter a name, which should then be displayed along with the img.
View 1 Replies
Jan 3, 2011
I am in the process of learning AS 3 and Flash on my own and currently using the Actionscript 3.0 Adobe Classroom in a book CS4 version. Having a problem with the Lesson Adendum if anyone has done it. This lession requires you to create two buttons. They both draw shapes on the stage. When one is clicked, it draws Rectangles on the stage following the mouse movement. When the other is clicked, it draws Ellipses instead. The problem I am having is that it just draws rectangles and not ellipses when the 2nd button is clicked. Would be greatful if someone could tell me what i am doirng wrong. Here is the code that I have so far. Apologize for the commented out code, I left it in to show what I have tried:
[Code]...
View 4 Replies
Jun 14, 2010
how do i change the item selected in a combobox selection based on a selection of a datagrid object?
View 2 Replies
Apr 6, 2009
I'm trying to allow users to download a song based on a radio button selection. And I've succeeded in getting the "save as" box to pop up, but for some reason, the file does not actually download and save after you hit the save button.
[Code]...
EDIT: Someone informed me that if the variables weren't defined OUTSIDE of the function then they would be garbage collected. I moved them outside but it is still behaving the same.
View 1 Replies
Oct 22, 2010
I'm trying to make a little program. It works right now by drawing the top shape to the dark gray area, where it then copies itself and changes color. The new shape can be re-dragged as well. What I want to do now is add a dynamic border when I click on the new object, I want the box to adjust to an appropriate size. And on mouse release I want the selection border to disappear on the new shape. I want the selection border to be dashed much like you find in many of Adobe's programs, if at all possible.
Attached is my .fla file
View 1 Replies
Mar 8, 2011
I have a simple TLF text box on stage. i want to be able to click some words in the text and based on the selection clicked got to some other place on a timeline or set a variable (not a link to an external web page).
sounds like it shout be simple but i cannot seem to find any information about it.
i seem to remember having done something similar years ago in as1 or as2.
View 3 Replies
Mar 29, 2012
Is it possible to show or hide a comboBox based off the selection made in another comboBox. I have been looking for documentation on this to no avail.
View 2 Replies
Dec 23, 2009
I have this datagrid which dataProvider is a ArrayCollection of 2 different types of objects (FolderVO and FileVO).I have a size column which in the case of the FolderVO is populated by an attribute called contentSize and in the case of the FileVO it is populated by the size attribute (the difference is handled by a itemrenderer).[code]...
View 1 Replies
Jul 30, 2004
First, here's the movie in question: [URL]
the fla is here: [URL]
The concept is, you have this big picture and when you hover over a label the picture zooms in and you get a detail.
Problem is, say you're hovering over "Operations" then you just move your mouse down to "Customers". The movie sorta stutters over from Operations to Customers. What I would LIKE it to do is act as if I had removed my mouse from the button, THEN hovered over the next item.
Ie:
1. User sees big picture
2. User hovers over "Operations"
3. Movie Zooms In to Operations.
4. User hovers over "Customers"
key -->5. Movie zooms all the way back out, THEN zooms into "Customers"
so on...
So far I've tried to put a switch into the frames where the movie is zoomed all the way out. something saying "ok, we're ready to zoom in" then have the buttons say "if the frame says "we're ok" then we can zoom in". But that didn't work for me.
View 10 Replies
Jul 12, 2010
i.e. to pause the animation only if the animation is playing. and to play the animation again only if the animation is paused..
ActionScript Code:
on(release) {
play();
[code].....
View 2 Replies
Apr 1, 2008
so here's what I'm trying to do:by selecting radiobutton1, image1 appears. And then...When selecting radiobutton2, image2 appears.and since radiobutton1 is no longer selected (cause there in same group) then image1 goes away.and so on.ps. without using imageloader unless I can make the loader window transparent so I can see whats behind it once the image is loaded. I think i would stick with putting the image in a MovieClip. (image is .gif for a reason)
View 1 Replies
Dec 13, 2010
I want to display an image instead of Color in item Selection and Hovering(mouse over) in Flex DataGrid. how i can do it ?
View 2 Replies
Mar 1, 2012
I'm coding this minigame implementation where a sprite traverses tiles on a screen, and when he's done traversing a tile, the tile "disappears" (its alpha decreases and it becomes a "wall" the player can not move onto). Now, simple enough. Make use of a traversing and traversed boolean arrays to store if a tile is currently being traversed, or if it isn't, but it has been traversed. So, if traversing == 0 and traversed == 1, make the tile "disappear". However, and here's the weird part, if I just set the alpha to, say, 0.5 in this if statement, it sets the alpha on just the tile I traversed, whereas if I try to make it part of the wall as well (in the same if), every tile except the one I've traversed to becomes a wall.
Here's part of the code (it happens in the enterFrame game loop):
Code:
const NUM_TILES = 15;
//Add MC for all the tiles
var tiles = new MovieClip();
addChildAt(tiles,5);
[code]....
View 1 Replies
Nov 11, 2010
I never realized that fl.getDocumentDOM().selection doesn't retain the selection order... <sniff>. I was hoping to build relationships based on the order. I guess I took if for granted that tools like Maya and Max store the selection buffer in order of what was selected. I'm trying to avoid: Select Object, <Press 'Parent' Button>, Select Parent, <Press 'Parent' Button>
View 2 Replies
Feb 8, 2011
I have an upload form for an image. The user clicks browse and selects a file. How can I get the image dimensions the moment the user selects the file (before the file is even uploaded to the server). It obviously has to be something client-side with maybe javascript/jquery or flash/flex (prefer js//jquery though), but can either of them do this? This is the code I'm using to tie into zozo's getImgSize() function, but it gives me 0*0 as size.
[Code]...
View 1 Replies
Sep 6, 2007
i am attaching a number of _mc (my_mc) with a for loop. Inside each my_mc is an input textfield (my_txt)I want to click on my_mc.my_txt and select the textfield .the following code allow this and i can enter text from the keyboard however I want to add text from a _mc keybooard on screen (here called myBtn_mc).As soon as I click on myBtn_mc of course I lose focus ... i have tried to use a variable (select) to keep scope&focus
View 6 Replies
Mar 12, 2012
I'm looking for a script which allows the creation of a custom selection on a image online. This step is just after an upload. As a picture is worth a thousand words:
View 1 Replies
Sep 17, 2009
I'm a designer working in tandem with a PHP programmer on a project where we will display a random image via flash from a selection of images stored on a database. Accompanying this image is a tagline and a path for a button and these variables are sent via a php script. The actionscript then picks up these vars via loadVars and displays them on screen - well, almost.
The tagline is displaying in the dynamic text box with no problems, but I'm struggling with how to display the image in the empty MC I've created (called 'pic') and also to attach the path to the button I've created (called 'projectURL_btn'). I'm fairly sure it's something fairly simple but I just can't crack it.
[Code]...
View 0 Replies
Jul 6, 2010
In a simplified version of my issue, I have a ComboBox called "cb". I can set its selectedIndex to 1 (corresponding with selectedItem.label of "Red") easily with:
cb.selectedIndex = 1
However, since "Red" may not always be at a selected index of 1, if another entry is placed before it in the list, I would MUCH rather base my code on selectedItem.label, since it will always be "Red."
How do I do this? I can at least trace the label's corresponding selection index with code like:
var frameSelect:Number = cb.selectedIndex; trace(frameSelect)
Do I need some sort of loop function? Or is there a simpler way? Can I define a variable at the very start of my code that figures out what the corresponding selection index of "Red" is on that particular day? I basically need
var frameSelect:Number = cb.[Index of whatever goes with the label of "Red"]
If it useful to you, what I am doing (on a simplifed scale) is using a combo box to change the color of a movie clip. The user can click on "Blue" or "Yellow" or "Red" in the comb box, and the movie clip changes color. However, I also need a simple button that only has one outcome ("Red") where the user clicks on the button and thus sets the selected index of the combobox directly to "Red." Like I said, I can do this quite easily using the selectedIndex parameter, but this means I would have to manually update my button's code each time a new color option was added. Not remotely ideal, since the actual implementation has hundreds of colors in arrays and there will be lots of buttons creating arrangements from different comboboxes.(Say one combobox is Colors, one is Shapes, and one is Size. The end goal is to let the user experiment as much as they want through dropdowns, OR click a button like "Small green circle" to go directly to a particular outcome.)
View 3 Replies
Apr 29, 2009
I'm trying to figure out if it's possible to display a specific image based on the current date? for example, say I have something for sale 7 seven days, and I want to create an animation of images with numbers, countdown from 7 to 1, and have it stop on the number of days left.
The only place i've seen something like this is here
on the right side, just above the dark grey bar, a little calendar flash loads in and animates.
View 5 Replies
Aug 22, 2009
I want to set a maximum in the database and then for each row as a percentage of the maximum - it would fill the image based on the black volume.
Take the volume in flash of the lightning bolt (pixels), then fill it with a color as rows increase from 0 to the maximum number.
View 1 Replies
Apr 13, 2011
What I'm looking to do is have an image swapped with another depending on the value of a variable, but I'd also like it to choose the image automatically.[code]...
what i want it to do is when a function is called if the var == 01 it will automatically swap that image with pic_01, if the var == 02 it will swap it with pic_02. However is there a way of doing this without having to actually write an if statement for each of the pics as there is going to be around 700 of them.
View 2 Replies
Mar 23, 2009
How would I load external images based on dates? The intent is to automate loading of date-specific clipart to a container. An example would be arrival of Spring (3/20) would load the sun.wmf.
View 1 Replies
Nov 3, 2009
I wonder if any body could help me. I am currently working on a flash presentation which will be running on a 40" Plasma Screen. What's the perfect size to set up my flash file. At the moment my file is 800 x 600 pixels. I only have one .jepg image at the intro and the rest of the presentation is vector based.
View 1 Replies
Feb 8, 2010
I've been looking into trying to develop a flash application that has images that will change based off of the time on the clock. For example, if I had an image of a landscape with the sun in the sky, at 11:59am the image of the sun at the highest point in the sky would display. If it was 9pm, an image would display showing a night time setting of that landscape. I've seen plenty of PHP scripts for this idea but nothing in regards to flash (AS2 or 3 )
View 2 Replies
Dec 17, 2010
Is there any way to animate from a tile based .png image file? I have multiple images in 1 png file having slight changes in each image, which if cropped and put into layers one over the other, will give the feel of animation or a character moving or walking etc.I want to know can we do that kind of animation in flash as we do it in C++ or Java and how can we do it.
View 4 Replies
Jul 25, 2009
I've done my fair bit of HTML coding and work fairly well with CSS but i've never ever done a mouseover in flash.. Now, the website's text, all of it, is simply located on a text.txt file that the flash file reads and incorporates onto the website.. All text and images come from this text file. This is what I want to do.
Click on Enter site, then when it loads, click on the "Selling" tab at the top of the site. On the "My Listings" section is where I want to have the mouseover text and the "Market Analytics" section (which we'll be renaming) is where we'd like the image to actually appear. My question to you is can this be done within this environment and how so?
I can edit JavaScript somewhat, though its been a while.
View 6 Replies