FORUMS: list search recent posts

Flash Application

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Isaac Gray
Flash Application
on Jan 20, 2015 at 3:03:05 pm

I have a customer who needs an application that is similar to one that you find on Car Manufacturer websites. The application shows you a base model and price of the vehicle, and then the model and price updates in real time as you select your options such as color, trim package, etc. Can anyone point me in the right direction so I can get a start? I haven't used Flash since around 2004/2005, but if anyone can give me some hints, I would greatly appreciate it.

Return to posts index

Sam Mattern
Re: Flash Application
on Jan 21, 2015 at 1:57:35 pm

You may want to create a custom class for each car make/model. For instance, a Ford Focus is going to have different trim/engine/color/package options than a Honda Accord.

Then I would set all the variables in the class. Something like:
private var trimAOn:Boolean = false;
private var trimBOn:Boolean = false;
private var trimCOn:Boolean = false;

private var base:Number = "10000";
private var total:Number = base; // sets the total to "10000"
private var trimA:Number = "779";
private var trimB:Number = "999";
private var trimC:Number = "1204";

Then you could set functions to set the option and return the value:
public function getBase():Number{
return base;
public function setTrimA():Number{
if( !trimAOn ){//if trimAOn is false
total += 779; //update the total
trimAOn = true; //set trimAOn to true
return total;
public function clearTrimA():Number{
if( trimAOn ){//if trimAOn is true
total -= 779; //update the total
trimAOn = false; //set trimAOn to false
return total;

Then you can reference everything like this:
var car:fordFocus = new fordFocus();

totalAmount.txt = car.getBase(); //will write base amount to totalAmount text field
totalAmount.txt = car.setTrimA(); //will write base amount plus trimA to text field

Hope that helps.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved