ActionScript 2.0 :: Asigning Values To Button Via XLM?

Jul 13, 2006

i'm building an xml mp3 player with the tutorials in this valuable forum, is all good but i want to have a button that when pushed, downloads the zipped mp3 file of what you are hearing. (the mp3 and zip version are in same directory) the file that this button points to changes according to the new item in the xml that also changes the song you are listening

View 1 Replies


Similar Posts:


ActionScript 2.0 :: Asigning Functions To An Array?

Jul 20, 2004

I have a array of MC that are placed on the stage to make up a logowhat i would like is to fade through the clips. I thought i could creat an array and atach a fade function to it but it dosn't seem to work.here is my code

function init(){
//create an array for my movie clips
euro = new Array ( b1,b2,b3,b4,b5,b6,b7,b8,e1,e2,e3,e4,e5,e6,e7,e8

[code].....

View 12 Replies

ActionScript 2.0 :: Variable Button Values In Loop?

Mar 15, 2010

I have a query regarding assigning values to buttons in a for loop, I will explain:This is a string which I want to assign to a button value via getURL:

var myURL = "http://www.mywebsite.co.uk" + "/?Group=" + mySharedObject.data["destination"+i] + "&" + "SearchType=654&" + "Target=offers&" + "Paging=on&" + "HotelName=" + mySharedObject.data["hotel"+i];

[code].....

View 1 Replies

ActionScript 3.0 :: Accessing Radio Button Values?

Jul 8, 2009

I'm having such trouble accessing the value of the selected radio button in a group.I put 5 radio buttons on the stage and gave them all the groupName of 'Question1' in the component inspector. They each have their own instance names and a value which is also set in the component inspector.When I go to access the group (via Test Movie) and check which value is selected I get this error:
 
'Access of undefined property Question1'Here's the code I'm using:
 
var Radio1:String = new String();Radio1 = Question1.selection.value;
SubmitBtn.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(eventObj:MouseEvent):void {    trace("clicked");    trace(Radio1);}
 
Other problems I'm having with this code is the flash player doesn't believe the value of the radio object is a string...so what is the data type of the value property?

View 5 Replies

ActionScript 3.0 :: Adding Another Set Of Values After Hitting A Button?

Jan 21, 2010

Right now I have a drag and drop exercise that will output a value based on the drop positions of 2 points. What I would like is to be able to add a button that basically has a whole new set of outputs based on the same drop positions. Here is an example. If I place an object on drop target 1 and 3. The output says something like "good job". Now if I click a button and place and object on 1 and 3 the output would say "try again". I hope this makes sense. I would also like the ability to add more than one button.

View 2 Replies

ActionScript 2.0 :: Distribute The Values When Dragging As Well As A Reset Button

Nov 5, 2008

1. How do I back fill in this information visually when dragging the graphs?

Example of my needs...

I am setting up a series of tasks and might not have enough 1st graders so I might ask some 2nd graders to fill in some spots, of course 1st graders can not fill in for 2nd graders so that should not happen. Each color corresponds to a specific task which are linked across the grade levels. So DES1 2nd grade can only cover a DES1 first grade position.

The same thing goes for 3rd graders to cover 2nd grader positions.

So if I take the DES2 position in the 2nd grader column and drag it down it should back fill into the 1st grader position of DES2

Column one knows the info of a 1st grader Column two knows that of a 2nd grader and a 1st grader Column three knows 3rd grade and prior.

set on a 900X500 stage area.

Code:
/* Things to do...
1.
2. Make reset button work right.
3. hierarchial scaling/back filling.

[Code].....

View 10 Replies

ActionScript 3.0 :: Changing Output Values After Clicking A Button?

Jan 21, 2010

i have a drag and drop exercise that will output a value based on the drop positions of 2 points. What I would like is to be able to add a button that basically has a whole new set of outputs based on the same drop positions. Here is an example. If I place an object on drop target 1 and 3. The output says something like "good job". Now if I click a button and place and object on 1 and 3 the output would say "try again".

View 4 Replies

ActionScript 2.0 :: Button Is Not Being Placing In The Correct Position When Set The X And Y Values?

Jan 15, 2011

My buttons are not being placed in the same position as my other buttons are on another page? I copied the same x and y cordinates as the other page..but they are still not being placed in the same position..why is this?

View 2 Replies

ActionScript 2.0 :: 3 Pages Form Values To One Submit Button?

Apr 24, 2006

I have 3 pages of questions and comments. I want to be able to submit all these values on the last page to some php file then to my email.

When I try to do this, I only receive the 3rd page questions and comments to my email but the first 2 pages nothing

How can I carry these values so on the third page I can submit all values thru one php and then to my email.

This is what on my php

[Code]....

View 1 Replies

ActionScript 2.0 :: Getting Values From A Radio Button Into A LoadVars Object?

Oct 17, 2006

I have a survey in Flash with 5 questions. Three questions have input text boxes for the user's answers, and two have sets of radio button options. I want to send the answers to a PHP script and insert them into a MySQL database.The text boxes work fine, but the values for the radio box responses show up as "undefined" in MySQL. I'd like to know how to pass the values from the two radio button groups into the LoadVars object. The code I have is:

Code:
submit.onRelease = function(){
var questionVar:LoadVars = new LoadVars();
questionVar.question1 = question1.text;
questionVar.question2 = radioGroup1.getvalue();

[code]....

View 2 Replies

ActionScript 3.0 :: Flash - Adding Values When Pressing A Button?

Aug 1, 2010

Im making 6 buttons all with different values. When you press one button the number that button holds will show up in 2 dynamic textfields.In the first field the numbers will come upp in a list form, one under another.and in the second textfield the number that the buttons have will add up.I have tried for some days now but cant come up with anything that worked.Haved tried with thisfor one button:

totalsum.text += Number(totalsum.text) + 22;
and this for the next:
totalsum.text += Number(totalsum.text) + 33;

[code]......

View 3 Replies

ActionScript 3 :: Variables - Incrementing Values Every Time Button Clicked

Mar 26, 2012

I am looking for a quick and easy way to store variables in a text file, rather than use amfphp to connect to a database all I need to do is increment values every time a button is clicked. Would be better if all the vars were in the same text file but if I have to have one per var that would be ok.

View 3 Replies

ActionScript 2.0 :: Add Values Of Textfield Variables To Display Specific Button?

Aug 28, 2010

I am building a custom shopping movie for a client. He sells wine and champagne glasses with customizable bracelets. He wants customers to first choose either a 2,4, or 6 pack of glasses, and then individually choose bracelets. My problem is I don't know enough AS to code the functions.

For instance, when a customer first orders 2 glasses, it adds them to the cart, and then sends them to a new frame of the movie, with pictures of the 4 possible bracelets and a text field below for quantity, each with a default value of 0. They can choose 2, and only 2, bracelets by adding a "1" to their desired text fields.

First off, I want nothing to happen until they add a "1" to 2 separate fields. Once they have done that, a specific 'add to cart button' needs to pop up, that will getURL the proper link to add that bracelet combo to the cart.The code, which is wrong, that I am using so far is this:

ActionScript Code:
on (release) {
if (AS2 + B2 + R2 + SL2 < 2)
{

[code]...

View 1 Replies

ActionScript 3.0 :: Making Panels/windows So The User Can Enter Numerical Values Then Submit Them Via A Button?

Apr 25, 2011

I'm currently underway in designing the UI for my game's level editor, I'm not using Flash's build in UI components instead I'm doing it from scratch using OOP.I want to have buttons, drop down menus, panels/windows that contain text fields and buttons.

At the moment I have the buttons down whenever one is created it is added to a static class's static array, and given a unique id number dependent on how many buttons have been created and added to the array so far.I figured this would be good as whenever a button is created I could apply an Event Listener looking for a MouseEvent.CLICK. Then just using the event.currentTarget.getID(), to find out what button has been pressed.

I'm about to start making panels/windows so the user can enter numerical values then submit them via a button, which will also close the window. I was thinking about doing more of the same and having static classes for each input type which lists all instances of that type of object.

View 7 Replies

ActionScript 3.0 :: Slider Input Values - Can't Get The Output Values To Add Up?

Dec 6, 2010

I've gotten these sliders to work but can't get the output values to add up. For instance, depending on the values for slider 1, 2 and 3, I need the total to show up in a separate text box. I keep getting a NaN message in the text box.Here's the code I have so far:

//item 1
sliderOne.width = 600;
sliderOne.value = 0;[code].....

View 3 Replies

Flex :: Set Values In Cookie And Get Values From Cookie Not Using With Shared Object?

May 18, 2010

I need to save email-id in my login form through the cookies. if I use shared object I am able to save but my requirement is need to save in cookies. How can I save? I got sample code from net. Attaching that code `package com {

import flash.external.ExternalInterface;

/**
* The Cookie class provides a simple way to create or access
* cookies in the embedding HTML document of the application.

[Code].....

View 1 Replies

Date :: Comparing Two Date Values In ActionScript - Compare Whole Day Values?

Sep 4, 2011

I need to be able to compare the number of whole days between two dates in ActionScript, is this possible? I'd like to test if one date is 7 days or less after today, and if so is it one day or less (if it's before today this also counts).The workaround I have in place is using the .time part of the date field:

// Get the diffence between the current date and the due date
var dateDiff:Date = new Date();
dateDiff.setTime (dueDate.time - currentDate.time);[code].....

As I say - this is only a workaround, I'd like a permanent solution to allow me to check the number of whole days between 2 dates. Is this possible?

View 1 Replies

Flex :: Pass The Array Values (not The Array Collection Values) To The Bar Charts Or Column Charts?

Sep 7, 2010

Is there anyway where I can pass the Array values (not the array collection values) to the Bar charts or column charts using flex 3.5...

here is the thing i want:::

I have array values like this,,

array1 = [23, 49, 40, 239, 20, 80, 39,49,120, 24, 31,41];

and i want to show these values on the Yaxis and months on Xaxis....

I have two Qns,

1) how can I pass this array to Bar chart or column chart.

2) how do I need to show months on Xaxis. beacuse I'm asking this regarding, I have kept a filters that even if we want to see some months or a particular months or perticalar span of months... there on Xaxis it need to change the months dynamically depending on the filters..... (for ex, on Xaxis the values should be (Jan, Apr, Jun,Oct) if i select the 3 months period filter....)

I have written a logic to collect the values of those particular months into an array, but not understading how to pass this array to Bar chart,, beacuse there I don't know what Xfield and Yfield to be given....

View 1 Replies

ActionScript 2.0 :: Nav Button States - Button To Stay In It's Active State Until Another Button Is Clicked

Dec 17, 2004

I have a menu with five nav buttons (atcually MovieClips). Each has three frame labels: "on", "stay", and "off". The rollover and rollout animations play flawlessly, but I'm at a loss as to how to give each button a sticky "active" state. I'd like the button to stay in it's active state until another button is clicked, then I would like it to play it's "off" animation. Each MC has this code:

[Code]...

View 2 Replies

ActionScript 2.0 :: Take A Static Text Field, Convert It Into A Button, And Use It As A Button,but Button Not Working ?

Mar 7, 2010

I want to take a static text field, convert it into a button, and use it as a button. I need it static, because I changed orientation, and I do not know how to do that otherwise. The problem is, even though I converted it to a Button symbol, it does not work when I test the movie. It works fine with "Enable simple buttons", but when I test it, the button is not there, no change in mouse cursor, no reaction at all.So this is what I did:

Made text. // static, not selectable, Orientation: vertical left to right, / //rotated; Two filters: Drop Shadow and Glow;

Converted text field to Button - Symbol (scrollBT)

Editing the Button,I put the same content (the static text field) in all four frames: No luck, not working. without the Hit frame filled (which I think doesn't really make a difference): No luck, not working.Tried again, converting the static text field in the button into a Graphic Symbol: No luck, not working.Tried again, and put some differences in the frames for "ON" and "OVER" etc.: No luck, not working.Tried again, duplicating a similar, working button, edited it, and: No luck, not working.

To the button itself and the AS: The button will be a scroll-button for a text field, with different scroll speeds on rollover and press, but nothing else. The code for that I have (I think). It's something like (and please excuse my incorrect syntax here, but I'm typing from memory; still, I use the Script-Assistant and my syntax is apparently correct; it's also working with other buttons):

on {rollOver} {
function (scroll) {
textfieldtxt.scroll - = 1;}[code]....

I'm at the end of my wits. The only difference I can tell from other (working) buttons I did the same way, is that the scrollBt does not do anything except scrolling, while all of the others have frame actions (gotoAndplay etc.) associated with them.

View 1 Replies

Can't Put Values Into Array

Sep 8, 2010

I am loading images and am getting their heights via trace but can't put them into an array to save my life.

Code:
var imageResArray:Array = new Array();//used to store image height
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, ImageLoaded);
ldr.load(new URLRequest(menuArray[c].iPath.toString()));

[Code].....

View 1 Replies

ActionScript 3.0 :: How To Get Values From Xml

Aug 11, 2011

<header> <Games>true</Games>  <Signup>true</Signup>  <Support>true</Support>  <Username>true</Username>  <Password>true</Password>  <Login>true</Login>  <Language>true</Language> <Date>true</Date>

[code]........

View 7 Replies

ActionScript 3.0 :: How To Use Values Only Once

Jan 18, 2010

In my code I have two variables I only want to use them one time and after that never again. The vars are newDraggerPos and newHolderPos. How is that done?

Code:
function moveRight(event:MouseEvent):void {
//trace(mcHolder.width);//6759

[code].....

View 4 Replies

Removing Duplicate Values From XML?

Jul 17, 2009

how to remove duplicate values from xml although it successfully done using array but not in xml

here's my xml data looks like (list.xml)

Code:
<?xml version="1.0" ?>
<gallery>
<menu maker="adobe1" software="flash"/>
<menu maker="adobe2" software="photoshop"/>

[Code].....

View 5 Replies

Data Integration :: Get Values From URL?

Apr 3, 2008

I am trying to develop a flash map where i need to show avalue from the current url into the text field in flash. Theproblem is I need only some values from the url to be displayed indifferent text boxes.Say the url is http://ayushjain.in/staticDefault.aspx?northamerica=168&southamerica=1 &europe=10&africa=0I want to display the value of "northamerica", "eurpoe" &"africa" in the text boxes.This should be done as soon as the swf loads in the html

View 1 Replies

ActionScript 3.0 :: Put All Values Into ONE Array?

Jan 28, 2009

I have a for loop that goes through my recieved values from my server. How can I put all those values into ONE array? I have this now, but obviously the array just updates every time the loop returns.

View 3 Replies

ActionScript 3.0 :: Add All Values From Xml.children()

Sep 1, 2010

I have an xml of numbers that I am using to power some dynamic bar charts..
 
I can easily pull out a string of all node values for variable area (SQMI)
 
trace(stsXml.Records.Record.SQMI.children());
 
the trace result looks like this
 
6729014724597803833449707411067084872157776104101113713121757
 
these values do not appear to be seperated but I am hoping they are (there should be 11 unique values here).
 
How can I sum the 11 values as extracted from my XML?

View 2 Replies

As3 :: Flex - Get An Objects Values

Aug 22, 2010

I have a value object, inside are lots of getters/setters. It is not a dynamic class. And I desperately need to search an ArrayCollection filled with them. The search spans all fields, so and there are about 13 different types of VOs I'll be doing this with. I've tried ObjectUtil.toString() and that works fine and all but it's slow as hell. There are 20 properties to return and ObjectUtil.toString() adds a bunch of junk to the output, not to mention the code is slow to begin with.

flash.utils.describeType() is even worse. I'll be pleased to hear I'm missing something obvious. UPDATE: I ended up taking Juan's code along with the filter algorithm I use for searching and created ArrayCollectionX. Which means that every ArrayCollection I use now handles it's own filters. I can search through individual properties of the items in the AC, or with Juan's code it handles full collection search like a champ. There was negligible lag compared to the same solution with external filters.

View 1 Replies

Flex :: Compare Between Values?

Jan 24, 2011

With 5 variables consist of a value, I would need to check if any value between fa to fe has a gap of 6 in integer as in f1=1, f2=0, f3=0, f4=7, f5=10; and between f1 and f4, which has a gap of 6.

var f1:int
var f2:int
var f3:int

[code].....

View 1 Replies

Flash - Passing Values From FLA To AS3

Mar 17, 2011

Can I pass values from fla to AS3. Example I have fla file where the xml faile loaded. Now I want to make button "Button 1" and "Button 2" now if I press the button it sent to AS3 values/variables.
private var xmlURL:String = "xml/Button1.xml";
After buttone 2 is pressed is
private var xmlURL:String = "xml/Button2.xml";

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved