ActionScript 2.0 :: ComboBox Controlling Multiple Elements
Jun 22, 2009
I am working on a booking/appointment program for a friend. The desired end result is this;A date picker is used to select the day.
A combo box is used to pick a service.Based on the service selected, a MC will load in various options/additions to that service.Another MC displays a schedule showing business hours (8:00 to 5:00) in 15 minute increments - based on both the date picker and the service selected and the option(s) selected (which determines length of time needed), available time slots are unshaded, requested but not yet approved time slots are shaded color 'a' (let's say medium gray), and booked time slots (after being approved) are shaded color 'b' (let's say red).I have the date picker working. I started a combobox which works, and controls the timeline of the options MC - where I am currently hard coding options as radio buttons and/or check boxes. I would much rather have this dynamically generated instead of picking a frame of a MC with hard coded choices. I haven't started on the scheduler yet.
View 1 Replies
Similar Posts:
Mar 20, 2011
I'm using a spark combobox (which I really like). What I'd like to do is to allow users to delete elements from the cb list. To do this, I thought I'd add a delete button next to each cb element, by using a custom (and extremely simple) itemRenderer.
[Code]...
View 1 Replies
Dec 1, 2006
Is there a way to contol specific objects/movie clips in your swf file based on the size of user's browser window?
View 1 Replies
Apr 30, 2009
I have 4 buttons in a mc (go to frames and then call up individual swfs (one, two etc)) and play within mc eg.
[Code]...
A person can start any swf by clicking a button and then change the swf by clicking another button.
Is there a way to check if a .swf is running and only work when none are running?
View 4 Replies
Jun 21, 2009
I'm trying to detect multiple elements in an array. My countTicks:Array contains mostly numbers and below you can see I'm using "logical AND" to try and find them.
The problem is, once I have more than 2 "logical ANDs" (&&) the trace gets called. Which it shouldn't because the array wouldn't yet hold those numbers.
PHP Code:
countTicks = function(){
for (var i = 0; i < tickCount.length; i++){
if (tickCount[i] == 1&&2&&4&&5){
[Code].....
View 5 Replies
Dec 6, 2010
I'm working on a project that has multiple movie clips and I want to have three buttons, you press button1 and it displays mc1, then you press button2 and it displays mc2 and also hides mc1. same with others so if mc1 is on and you press button3 it will turn mc1 off and turn mc3 on. so any combination only turns on its respective mc.
how to do this without an extraneous amount of code. It will eventually have over 20 buttons, so I want to keep code clean if possible.
View 4 Replies
Nov 19, 2011
I have a tile-based platformer game under work, and I'm stuck on a problem with hitTesting:
//check all character collisions with levelHolder
for(var i:int = 0; i < levelHolder.numChildren; i++)
{
[Code].....
The problem here is that hitBlock only hitTests one block at a time, and when I test this: If you lean on a wall (press right arrow key) and go downwards you can go through the floor.
I need to make it so that I can test on multiple blocks at a time.
And I did try to replace hitBlock with levelHolder[i], but it gave an error saying:
ReferenceError: Error #1069: Property 0 not found on flash.display.Sprite and there is no default value. at Main/enterFrame()
I'm guessing that comes from the level array where 0 = blank block / empty space.
View 7 Replies
Oct 1, 2009
I am building a website that uses different skinned combobox components on certain pages.The issue is my holder file seems to only use one of the skins and I can't think of a way to call the separate skins
View 6 Replies
Jun 20, 2011
My aim is to copy multiple row content from Flex datagrid, to a clipboard enabling users to take pieces of information and pasting them were they are necessary. I bumped into a problem that in Flex (as far as I know) its not possible to paste whole array of information in the clipboard. At the moment, I pass selected datagrid items to a textfield, and then run "System.setClipboard(text_area.text);" I was wonderng if there is a way to pass it to multiple Clipboard directories, without overwriting previous entry, similar as when you can copy multiple items from different location into a clipboard, pile them up and then paste all at once?
View 1 Replies
Nov 2, 2011
I'm trying to apply a Move-Effect on multiple elements. They are moving all together but I prefer it in seqeunce.
<s:Move id="thumbMover" target="{thumb}"/>
private function addItemThumbs ( ) : void {
for each ( var item : ItemVO in _items ) {
thumb = new Thumb;
[Code]....
View 1 Replies
Oct 8, 2009
I have several text fields (with different numbers written on them) each inside their own movie clip. There is a background underneath all of them. What I want to achieve is to cut the shape of each of the numbers into the background. They should still be able to behave as separate movie clips.
View 3 Replies
Feb 23, 2010
I am trying to control my main Scene 1 via a navigation bar within a movie clip.
I am using the following code for each button:
btn_2.addEventListener(MouseEvent.CLICK,btnClickHa ndler);
function btnClickHandler(event:MouseEvent):void{
MovieClip(root).gotoAndPlay("frametwo","Scene 1");
}
If I just put that code in for one button, that one button will work, but once I add another line of code for my next button, the only one that works is the first one, then the rest of them don't do anything.
View 4 Replies
Jul 12, 2009
ttest to work. I tried to do a for loop that went through each of the pellets by number i.e.pellet[i] in a for loop with each pellet being number pellet1 pellet2 pellet3 so on... I tried putting it in the first frame of the fla both in an enter frame function and just by itself.
Code:
with (_root) { for (i=0; i>=3; i++) { if (pacman.hitTest(ball[i])) { ball[i]._x =
[code]....
View 8 Replies
Feb 25, 2009
I'm drawing a blank on this one and can't think of any keywords for a search. I have multiple instances of a movie clip on the main timeline along with a button. When I click on the button I want to go to frame 1 of the _mc. Kind of a "reset". I've tried -
on(release){
_root.box.gotoAndStop(1);
}
but this only "resets" one of the instances.
View 3 Replies
Mar 21, 2010
wonered if someone could help me wih this one. Currently making a facebook game all in flash, it uses multiple swfs to make up the game and its elements for optimisation.
My question really is down to flash cache issue so we can make updates to various swfs that are going to be, site wide for users so the game doesnt break. Currently some users get older versions which breaks things if other swfs have chnaged how they communicate as an example.
I am aware of adding a query string onto the end to force to get the latest version.....however doesnt this make the use of a cache redudant as its being simply overriden? Would jsut like it to work as it should:) If theres a new version of a swf use it..if not use current one.
View 5 Replies
Oct 28, 2009
Does one normally use some sort of wrapper object to do so?
For example, if I have an array with 10 elements (for example, images that are gonna be linked), I can loop through the array and add them to stage with:
myArray[i].x = i * myArrayElement.width;
What if I wanted to position all of the elements yet keep them in the same positions relative to each other.
Can you do so with an array, I gather the answer is no. So if that's right, do people throw an Array into another object and the use that objects x property?
View 1 Replies
Feb 5, 2009
I want to tween multiple mc with ONE line of code like this one (know its not right but youll get the idea):
var move:Tween = new Tween ( (one_mc, two_mc, three_mc), "x",
Back.easeOut, 0, 100, 1, true);
I tried this when my mcs are on the stage using instance names:
new ensemble:Array = new Array (one_mc, two_mc, three_mc);
then
var move:Tween = new Tween (ensemble, "x", Back.easeOut, 0,
100, 1, true);
I then tried this using linkage (LK) name:
new ensemble:Array = new Array (oneLK, twoLK, threeLK);
then
var move:Tween = new Tween (ensemble, "x", Back.easeOut, 0,
100, 1, true);
None of those worked.
View 3 Replies
Feb 22, 2010
Instead of a scroll bar just controlling one movieclip..How could we get it to control multiple movieclips?
public class MainScroll extends Sprite
{
//private var mc_content:Sprite;
[Code].....
View 3 Replies
Sep 25, 2009
I need to dynamically attach a movieclip from a library and then make it move across the screen.This is quite easy for one movieclip instance, but what I need is to have movieclips spawn at regular intervals then move accross the screen.[code]My question is, how do I continuously attach movieclips without making so many variables? Is my method of attaching even alright for this purpose?
View 2 Replies
Jul 15, 2010
I'm working on a picture of cell phone, which I want users to be able to click on the number pad and have the numbers appear on the screen. Seems simple enough but I'm having trouble making the numbers appear in order just like phones in real life do. For instance, the screen starts with four *'s until "1" is clicked, then when the next number is clicked(let's say 3) I want the screen to display "13**" and so on.What I have is a movieclip with 11 frames (* and numbers 0 to 9), and 4 copies of them are each named p1,p2,p3,p4. They would be on the cell phone "screen" and display numbers clicked by the user. Then I have buttons acting as number pad with actionscript as follows:
ActionScript Code:
//for button "1"
on (release) {
[code].....
View 3 Replies
Jan 31, 2011
Background: Written a basic flash animation where a number of buttons control 8 signs, and each sign can have 3 different 'faces' There isn't one button per face, as each button can affect multiple faces. (i.e. button a changes signs 1 and 5 to faces x and y, button b changes signs 2 and 6 to faces q and z, etc)Each 'face' is made up of multiple 'sections', a bit like the rotating advertising boards or motorway signs, like this:(can't post links, don't have enough posts. Go to google images and search for this:rotapanel the_southit should be the first resultThis part isn't the problem, it works by having each 'section' as a separate symbol, and face symbols made of of either 4 or 5 of these section symbols. As the buttons are pressed, I hide and make visible the appropriate faces, and everything is good. The idea is that I can easily customise it later by switching out the underlying section symbols to update the whole thing, or create new 'faces' by combining the sections in different combinations. All nice and modular.
Now the problem: In order to try and make the thing look more realistic, I decided to animate the transition between faces by rotating the sections as vertical prisms (think of 4 or 5 toblerones stood on their ends, placed together to make a single surface. If you rotate them all about their centre points at the same time, you can create up 3 different 'faces').The animation is done and works fine, but the problem is controlling it. At the moment, each 'face transition' structure is this:
Face Trans. - Section Name(1) : Spin out animation: Static Graphic
________________________________Spin in animation: Static Graphic
____________- Section Name(2) : Spin out animation: Static Graphic
[code]......
View 1 Replies
Apr 10, 2003
I need a little advice. I've got a set of swfs that are all part of one training, and within these movies are a few sound effects attached to button instances. I want the user to be able to click a button to turn the sound on or off at any time during the training.
My first idea was to create a variable called wantSound, which each sound instance checks before deciding to play. This is working perfectly. There's a toggle switch on the main timeline that sets sound to on or off, and when a sound is supposed to play, it checks to see if wantSound=true, and plays, or if it is false, it does not.
This works fine on each individual .swf, but when a new .swf loads in, the sound defaults back to true, and the user has to turn it off again. I imagine this could be fixed by loading each movie into different levels instead of loading them into level0 or root, but as this is not how I originally created the file, that will take a lot of work to handle aligning the loaded movies and parking them (making sure none of the buttons are active on the level below). I'm lazy, what can I say? :-)
I've been looking around at similar questions, and found a decent tutorial on Macromedia's site about using javascript to pass a variable from flash to HTML. I went through that, and managed to get Flash to send my wantSound variable to HTML with no problem. Check here for the tutorial.
The only problem is that in macromedia's example for sending data from HTML back to Flash, they use a text field for getting the variable. I just want to take the variable sent from Flash to HTML and send it back to Flash when requested (at the beginning of the next SWF.)
View 1 Replies
Nov 15, 2011
So I'm working on a Flash version of the old "Robots!" game. In case you're not familiar: the game lays out a number of robots on a grid (number varies by level), and drops the player in the middle. As the player moves around the grid, the robots all move towards the player one grid space per player move. The object is to destroy all the robots by making them run into each other (or the rubble left from previous collisions) without letting a robot run into you.
Anyway, my robot hordes are being created on the stage through a "for" loop, and each icon is a child of variable "evilBot" which references a library item with the class name "enemy."
ActionScript Code:
function placeBots():void{
for (var c = 0; c < numBots; c++){
evilBot = new enemy;
[Code]....
I've run a trace on "evilBot.name" and verified that the children are being given instance names of "evilBot0, evilBot1 ..." and so on. But no matter what I try, I can't issue instructions (regarding movement, orientation, etc) to individual children.
Using a for loop and "this["evilBot" + x]" returns a "term is undefined" error.
If I store the instance names in an array (named "botName") and use "evilBot.name[botName[x]]", I get the error "Property evilBot0 not found on String and there is no default value."
View 9 Replies
Jan 6, 2004
I am having problems controlling my sound objects. When the user clicks on a mc on the stage a sound (voice over) starts to play. But if she decides to listen to another sound, she can click on another movie clip...Problem is that when the user clicks on the second movie clip the first sound is still playing while sound number two starts playing as well. I would like the second sound object to replace the first...shouldn't this be possible by using the mySound.stop(); before initiating the new sound object.
Here is part of my code:
Movie Clip one:
on (press) {
mySound=new Sound(this)
mySound.attachSound("voice_one")
mySound.start(0,1);
[code]....
View 3 Replies
Sep 28, 2007
I have a spreadsheet represented with three bitmaps within mcs. I'm using an mc with four directional buttons to allow scrolling (x and Y). The complication comes when I want the header to move on the x axis, but not the y axis. Also, I've got an mc with the row title column and I want that to move on the y axis, but not the x axis. This should be easy, but it is not for me. I've tried using an array, but with my onEnterFrame/incremental movement, how to break out of the onEnterFrame. I've also tried a function call as seen below. I can get things to move, but not quite right, tweaking only makes things worse. This one will move both of my mc's on the y axis, but only after clicking three times. The on the reverse trip, the mc moves jumps up and then increments correctly, only with that initial jump offset.
Let me show you my code (these variables are supplied by the loaded MC):
Code:
_level0.maxDown = -271;
_level0.stepY = 140.334;
_level0.maxUp = 150;
_level0.maxRight = -323;
_level0.maxLeft = 0;
[Code] .....
View 1 Replies
Jul 8, 2009
click once on the screen with your mouse and then you can control the man with arrow keys on your keyboard.i can't figure out why the man turns back to the right if he is facing left if you press the up or down arrow. this is one of my first scripts,it's not set up right here is the code:
Code:
function rightKey(yourEvent:KeyboardEvent):void {
if (yourEvent.keyCode==Keyboard.RIGHT) {
[code].....
View 2 Replies
Jul 19, 2011
So I have been trying to figure out a way to control multiple clips using the same "on press" & "on release" statements located on 1st frame of main timeline. A variable is being set to a value that correlates to the name of each movie clip as an interaction occurs.Ex: user clicks from a selection of buttons & depending on the button clicked it sets clipNum = "1" through "21".What I want is to have something like the following code that will give the user the ability to click and drag the clip with code on the main timeline similar to the following:
_root["drag_" + clipNum].onPress = function () {
startDrag (_root["drag_" + clipNum]);
};
[code].....
View 2 Replies
Sep 20, 2007
I need to write a function which should fix the location of the movie clip on the stage.
public function setCoOrdinates(xpos:Number,ypos:Number,movieName:S tring):Void
{
eval(movieName)._x=xpos;
eval(movieName)._y=ypos;
}
My function is as above. While I use this function in flash I only see the last movieclip on the stage which was passed. Movieclips passed earlier seem to have disappeared from the screen.
setCoOrdinates(20,200,"bButton_mc");
setCoOrdinates(530,100,"fButton_mc");
I see only "fButton_mc" on the stage. Even though I set different xpos and yposs for the movie clip.
View 1 Replies
Oct 5, 2011
I am using Flash CS5 on an iMAC, running OSX 10.6. I created a file that uses a Combobox on the first frame, and I would like to connect the buttons to go to and stop/play on multiple labels.
View 2 Replies
Jan 26, 2010
Is it generally to position elements relative to other elements or in absolute values?
View 2 Replies