ActionScript 2.0 :: Passing Data Into A Button That Is Generated On The Fly
May 9, 2007
I have a function that generates a series of mcs from XML. These mcs contain buttons. I need to pass the ID of the movie that the button is attached to into the button events, but I can't figure it out. See the code below. How do I pass something into the button event? Or do I need to rethink?
Code:
for (var i=0; i <= 15; i++) {
identID = "ident" + i;
var tempgrid = grid_mc.attachMovie("ident_proto", identID,
[Code].....
View 7 Replies
Similar Posts:
Feb 1, 2007
I've used the XML connector to use an xml file to populate amenu>submenu> thumbnail image flash application. Everythingworks except that I'd like the last step to be that the user clickson the dynamically generated thumbnail image to open acorresponding pdf. I'm using the Loader component to generate thethumbnail. Essentially, I want to turn that image into a buttonthat launches a pdf.
View 3 Replies
Sep 9, 2009
I have a normal XML file which i chucked together that works fine with the code i have below - this is obviously saved as an xml file as well. What I'm trying to do is generate an XML page using PHP. I have done so, works fine and reads as it should correctly when simply viewing the page in a browser, but when i try and read out the data in flash (loading in a php file instead of an xml file, everything is undefined!! Below is the flash code, which works when the load() link is changed to a straightforward xml file...
Code:
newsPageContent_txt.html = true;
var test_xml = new XML();
test_xml.ignoreWhite = true;
[code]....
the header at the top of this PHP is generating the page as xml, so it should all be valid.
View 2 Replies
Oct 26, 2006
My company has a database-driven system of web forms, each ofwhich consists of many questions in various layouts (2-columnradio, 1 column checkbox, etc). The forms are never hard-coded.Each HTTP request causes Java code to perform DB queries todynamically generate the various questions and answers.Thosequestions are then rendered through JSP and Struts tiles into HTML.The HTML also contains JavaScript functions to hide/showconditional questions on the web page based on answers to earlierquestions. Now we're trying to figure out the best way to adapt thissystem to use a Flash front-end instead of HTML/JavaScript.My preliminary research suggests at least two possibleapproaches:
1. A pre-compiled SWF could send a request with certainparameters, and the server could respond with an XML description ofthe form to build. Then the SWF could parse that XML andynamically generate the form using attachMovie for each formelement (with a lot of math to determine relative positions ofelements with variable sizes, like text labels). 2. Flex might reduce the code for placing elements, by usingMXML to describe the form structure as well as visual arrangement.I haven't used this yet, and I'm wary of Flex 2 simply because itrequires Flash Player 9 which is only at 50% browser penetration
View 1 Replies
Mar 10, 2010
Any workarround to avoid the new line generated while sending data using SendAndLoad(); in AS2? I send "00:00:12:36"
But php output:
00
:00
:12:36
View 2 Replies
May 7, 2010
Im trying to use dynamic SQL tables on my PHP server so I need to pass the table name to the PHP script. I don't understand why the Data Management system that sets up CRUD won't allow this extra parameter. It says it can only have one input: item. I can get all records, but when I try to create, update, or delete I get an error.
Or is there another way I can pass the tablename variable to the php file before I call any functions?
View 3 Replies
Sep 26, 2006
I created an multilanguage application with the "strings "panel. My customer need to put some words in italic inside the dynamic textfield. So I used <i> tag or cdata tag insied the xml, but nothing works, even if I put the textfield in "html" format. So How can I do. Do we need to change the "locale.as" class?
View 3 Replies
Mar 7, 2012
I have created an item-renderer (IListItemRenderer) to customize the display of a datagrid, and I override the data getter/setter to pass in the relevant variable.
In the item-renderer I have a button, which, when clicked, should display a form populated with various fields of the aforementioned variable. To do this, Button is overridden so that it displays whatever IFactory implementation it is passed.
private function instantiateDropdown():void
{
_dropdownFactory = new ClassFactory(MyPanel);
_dropdownFactory.properties = {boundData: _myVariable};
[Code]....
My IFactory implementation is a panel containing my form, and it is displayed when the button is clicked, as desired. However, the variable is not set. It seems that in order to instantiate my IFactory before the overridden button needs to access it, my new ClassFactory() statement needs to be in the preinitialize event handler, but the variable has not been set at that time. Setting the properties of my IFactory instance after it has been created (e.g. in the click event) does not appear to work.
How should I pass my variable to my ClassFactory-generated instance so that it populates the form correctly?
View 1 Replies
Sep 5, 2006
We have implemented a Flash photo slideshow on our site and it works just fine for most of our users. Whenever the xml.load(success) returns false I have the Flash email me a debug report. For the life of me I can not find a common thread between all of these people having problems with the Flash. I don't think it's a cross-domain issue because it works for most people, and I have the crossdomain.xml files where they should be.
[Code]...
View 1 Replies
Sep 26, 2011
I would like to get the content of a shared object (flash cookie) generated by a player, or more precisely by quizzes generated by Articulate Quizmaker.I know where is generated that cookie, I just would like to get the content of a variable inside. But impossible to access it :sI tryed :
var user_so:SharedObject = SharedObject.getLocal("nameOfTheCookie");
if(! user_so.flush()) // sends a boolean, true if the cookie exists
{
[code]....
View 6 Replies
Apr 20, 2004
I've been using Flash for a while now but have just started using Flash Combined with XML. I'm trying to make a poll system in flash which grabs data from a PHP generated xml file. This is the contents of the xml file at the moment.
[Code]....
View 1 Replies
Apr 11, 2010
I'm trying to make an interactive graphic that is randomly generated at the press of an other button. To put this in context, I will have a button to roll dice. the dice numbers with then appear in 6 places on a board. you will then be able to select the dice.
View 5 Replies
Jun 19, 2006
i changed moivie cilp to button. but unable to assign a text to it.[code]
View 4 Replies
Apr 16, 2007
Ive been using Flash since version 4, mainly just to draw and create Frame by Frame Animations. Only recently have found a need for dynamic applications.Ive been following the tutorial for the simple photo gallery/portfolio here.URL...Ive noticed that the way the buttons/thumbnails created in this example doesnt give me control over the way the buttons themselves behave on the individual level. Such as things like different colors/sounds/ on events, or whatever. Can anyone help me to understand how to make a button class or something that may already have these properties set, and then dynamically assign it to the thumbnails?
View 8 Replies
Feb 28, 2011
I am trying to create a code such that everytime a button is pressed a random number is generated between 0-14. With each of the 15 numbers (0-14) only being hit 10 times. I know how to create buttons and all that, its the random number thing thats stopping me.I created it using arrays in another programing language and tried to translate it to flash but I was unsuccessful. this is generally what i got
ActionScript Code:
var events:Array = new Array();
var order:Array = new Array();
var used:Array = new Array();
[code]...
View 9 Replies
Jul 8, 2011
I would like to pass my SWF file an amount of data (textual).Is there some limit? I am talking about thousands of characters longI know the simple way of file.swf?data="mydata" but I know that you can pass data via "flash vars", when you embed the file in html(<object> How do I pass data in that way? Is it better to just read from a text file?
View 3 Replies
Oct 26, 2009
I've been researching for days on the issude but till now I still haven found a solution yet. I have 0 knowledge on ASP. And I just want to able to pass and get var/text from ASP.
ActionScript Code:
private function loadASP():void {
var aspSend:URLRequest=new URLRequest("testASP.asp");
var aspLoader:URLLoader = new URLLoader();
[Code].....
View 0 Replies
Aug 23, 2010
I have a swf (swf#1) with links to another swf (swf #2). I would like use GET to pass data out of swf #1 to a PHP page that will be holding swf #2. I want swf #2 to start at a specific frame based on the data passed from swf #1.
View 1 Replies
Aug 5, 2010
So I'm trying to make a project with multiple rss feeds on one page. All the rss feeds are in one xml file. this works fine but now I need to retrieve rssdata from each rsslink.
To do that I want a variable to be filled up with the rssData that I retrieve via an external actionscript file.
So in my main actionscript I would have something like this:
ActionScript Code:
var rssLoader:RssLoader = new RssLoader;
var rssData = /* THIS IS WHERE I WANT MY RSS DATA TO COME */
[Code].....
View 9 Replies
Dec 11, 2010
I'm trying to pass a string of text out to a html web form. Something I've never done before.
Tadster suggested I use something like this:
ActionScript Code:
var outDataToJavaScript:XML =
<script>
<![CDATA[
[Code].....
The movie runs fine and shows no errors, but when my browser opens forms.html the data is not there. I assume this is because I'm using navigateToURL(new URLRequest("form.html) and therefore opening a new instance of form.html rather than the one I've already loaded into flash. Am I right? and if so how do I open the pre-loaded version? Or....am I way off and have failed to understand something quite basic?
View 2 Replies
Dec 1, 2006
A map of the US comes up and users will select where they work, before getting to the next page, which is a form where they fill out the rest of their contact information. The Submit button sends the form variables to a php file on a different server which then stores their info in a database and will take the "location" variable from the map (in the previous .swf) to send the user the correct demo map.
My vars from the form post to the PHP and a confirmation e-mail is sent to the user etc. etc. this works fine...i'm just confused as to how to send the location variable that was pre-selected to send along with the form.
View 3 Replies
Jan 12, 2009
Goal: To build an Internet Mapping Site (IMS) using FlashScenario: Using Manifold GIS for the backend. It is a full scale GIS software which easily outputs data (geometry and tabular) into xml. It has built in IMS capabilities, but theWould like to build an IMS using Flash as the front end, and Manifold as backend. How would I set up something where the GUI and display were Flash, the user interacts with the Flash (Pan, Zoom, Selection, Query(SQL)), have Flash fetch that from Manifold via xml, and display the new extent, query results, etc.?
So there would need to be geometry data retrieval and display as well as tabular. For example the user should be able to use a "Zoom by Extent" feature where they draw a rectangle on the map, it returns the coordinates of the box to Manifold, Manifold returns it, etc. On the other hand they need to be able to query the datasets (simple sql queries).I hope this makes some sense. I'm a noob in many aspects to backend so I'm just trying to get a handle on whether this is possible, and what backend needs to be implemented in order to make this happen? Would you know of a possilble better method? Silverlight, etc?
View 1 Replies
Apr 28, 2010
This problem is a lot more complex than title implies.I am trying to pass public var "quote" from player class document to movieclip function and on to a 2nd gigyaSocial.as method. I can trace the var in player.as but, it disapears when I try to access it in the MovieClip.
Code:
import fl.controls.Button;
import com.player;
import com.gigyaSocial;[code]....
View 3 Replies
Nov 14, 2009
I want a comboBox that will allow the user to select what colour palette they want the application to have.I am using a comboBox to do this and want to have a function with arguments as the data in the comboBox item.I've managed to do it and pass arguments but these are running when the comboBox is set up. I only want the function to run when the user presses the submit button. How can I prevent the function from running on set up?Here is my code:
Code:
package
{
[code].....
View 14 Replies
Jun 12, 2009
I am trying to pass an xmlList from this class, and am having some issues. The thing is, how can I call a method that listens for a result, then calls another method..
package com.ryancanulla.utils
{
import mx.rpc.events.ResultEvent;
[code].....
View 3 Replies
Jan 2, 2011
I found this example of a lobby in my flash media server book. But there's a little
var nc:NetConnection;
var rtmpNow:String;
var userName:String;
[code].....
View 1 Replies
Apr 20, 2011
I'm very new to flex and to flash in general. I walked trough one of the exercises in "flex in a week", specifically the MVC exercise which talks about how to seperate the view to a different component and later on send him the data as one of his fields.
I had no problems in the exercise and everything worked BUT, when I tried to do it on my own code it doesn't work.here is my relevant parts of the code:
[Code]...
View 1 Replies
Aug 18, 2011
I'm working on an interactive quiz where the user's responses will be incremented to a poll in a CMS. I have a url that automatically increments the answer choice in a poll, so I would like to use sendToURL to call the url without actually passing any data or variables. It seems to work with navigateToURL, but that opens a blank window in the browser (a complete nuisance every time you answer a quiz question).
[Code]...
View 5 Replies
Oct 28, 2009
I am using an accordian in which has three childs. Each child has some textInput elements.Now,i want to send data written in currently selected accordian's child's textInputs.I have created a function "configure" which is called when someone clicks a button. That function checks as to which child of accordian is selected. Whichever is selected, the textInputs' text of that child are stored in locally defined variables.how to pass these variable to the HTTPService i am sending at the end of function configure.
Codes:
private function configure():void
{
var selectedAlgos:Array = algosList.selectedItems;[code].....
View 1 Replies
Dec 27, 2010
So i a building a categorized menu of different foods. I have a class for "categories" (buttons) which essentially will return a string "salads", "drinks", etc. I now have another class "menuItems" for items within categories and this handles sizes such as "small", "med", "large", etc. My problem now is that when i return "salads", i want to invoke an array which contains all the elements of salads, send it to menuItems which will populate the menu. So far i have both the category objects and the menu object setup. I just cant seem to be able to send the data that the category object is returning and pass it to the menu object. Both of which are added to the stage as shown below:
If there was a way that i could say add all these classes to one class so that they can talk to each other that would be great but i dont know how to do this.
View 1 Replies