Data Retrieval Is Succesfull Check
I have a database driven textfields site.
Three fields are fed with data from the mySQL database. However one is not. Because it takes some time to receive the data from the database (0.5 seconds it seems) the textblocks are cleared by a button like this:
textfield1="" textfield2="" textfield3="" then I request the new data through a php.
The problem is that the one textfield that doesn't change looks odd. What I want to do is to hide it untill the other textfields are full en then show it again. So is there a code that states weither the data retrieval from a database is succesful? Like a loop of somekind?
FlashKit > Flash Help > Flash ActionScript
Posted on: 08-10-2004, 10:15 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
XML Data Retrieval Help
hi,
i'm new to the forum but have a fair amount of experience in actionscript - not with XML though. looked around extensively and thought i had the answer but am now hoping that someone can help me out...
I have an XML file starting;
Quote:
<?xml version="1.0" ?>
<Database>
<WatchWarnAreas zone="Z" county="C"/>
<LsdDiff DayLightSavings="0" >
0
</LsdDiff>
<CurrentConditions>
<City>
Peel
</City>
I simply want to retrieve the text "Peel". So far the actionscript used boils down to;
Quote:
_root.city.text = GetWeather.firstChild.childNodes[2].firstChild.nodeValue;
= traces NULL
Quote:
_root.city.text = GetWeather.firstChild.childNodes[2].firstChild.nodeName;
= traces City (so i'm in the right place)
I totally lost and can't seem to find info that fixes the problem. I think it might be a whitespace problem, but
Quote:
GetWeather.ignoreWhite = true;
, or Flash viewing the node as a type 1 node - can this be overridden?
Data Storage/retrieval?
I'm trying to setup a log that will let you input data, save it to a file per month (or week) and have it retrieved and displayed with in the log. Any help or guidance is highly appreciated.
Datagrid & Data Retrieval
I am using Flash CS3 and I am currently working on redesigning an order form which uses some buttons to set variables and a few input text boxes. There is a confirm button that takes the strings set in the variable and what the user has typed in the input boxes and adds each item to a datagrid in seperate columns. What I'm trying to find out is if there is a way, once the user has finished adding items to his order, taking the information from the datagrid and extracting/retrieving it so I can put it into a long string and email it. Alternatively if there is a better way of displaying the ordered items, I would happily not use a datagrid. I have searched the web and maybe I didn't search for the right thing, but I can't seem to find any answers about the possibility of extracting data from datagrids. Any help would be greatly appreciated.
Data Retrieval From MS SQLwith ASP.NET 2.0
Can somebody provide a simple example that gets data from MS SQL /MysQL with ASP.NET 2.0 and displays it in Flash without using Flash Remoting. Where you have a previous and next button to scroll through the data and displays it in a textbox. I currently have the Foundation ASP.NET for Flash book and find the examples not useful for me as they use webservices are bit too comprehensive for me. On the Web most examples are for PHP/Flash or ASP/Flash and the only ASP.NET example i found is for verifying a login.
Please help!
All-flash Blog...suggestions On Data Storage/retrieval
I am going to set up a blog on my fiance's website. The site 100% flash. Sending and receiving data in and out of xml isn't a problem, but that data will have to be dynamically updated when she adds a new entry.
What I want is an onRelease function that displays the list of headings and dates. Each heading is clickable and then displays the specific heading's message. I have the code for that already working with a static xml page. I need to create an interface for her to enter her new messages and subsequently update the data source that is fueling the display in flash.
I'm looking for suggestions about how to store her entries on the server for retrieval/display on her website. I don't have ColdFusion, so that's not going to be an option.
Any help would be greatly appreciated.
Data Store / Retrieval Efficiency, And The Singelton Design Pattern
Hi there,
Whilst not strictly an AS3 question, I thought this the best place to ask, as posters here generally seem to work to higher-level best-practices.
I'm building a site for a photographers' agent, and I'm managing about 10 (rising to 20) photographers, each with about 10 collections, picked from any of 150 or so images. The bottom line is there will be at least 1500 images to display (each with filename, credits, id, etc), and a boat-load of data to load in.
Therefore, I've taken great pains to ensure the data is kept lean. For example, the path to a photographer is stored once, an image-size sub-folder is stored only one, and each of the 1500 images only stores it's filename once.
This is opposed to storing the full/path/to/each/filename for each image.
Now, upon completion of loading the data, it's available to my classes, and upon viewing each photographer I'll need to create the 150 or so class instances that will represent the image data (id, name, url, credits, etc) for that particular photographer.
So... getting to the point now:
When I create the image classes, I still need that full/path/to/image, so would it be best toassign the whole url of the image as an instance property in the constructor ie server/photographers/photographer/size/filename.jpg (thus duplicating a lot of data over the 150 images)
or, build the url manually each time I request the url property, using an implicit getter function
If I go the latter route (which is probably best) I'll need a reference to the server, photographer and size variables. These will change as the application changes, so I need some global point of access to them, and here lies my ultimate question:
Should I employ a Singleton to do the overall management of the application? So that the getter function might look like this:
ActionScript Code:
public function get url():String{
var manager = Manager.instance;
var path = manager.getPath();
var folder = manager.getFolder();
var size = manager.getSize();
return path + folder + size + '/' + this.filename;
}
image.url // "photographers/william_lingwood/thumbs/green_apples.jpg"
Or should pass in a reference to the Manager class in the constructor, so I could omit the repetitive static Manager.instance call, and just refer to this.manager?
I guess my question is "in order to keep duplication to a minimum, is it inefficient to constantly be calling a class method to get a simple variable?".
And "is a Singleton the best approach here? If not, what is?"
Sorry I had to ramble through all that. I felt I needed to explain the whole situation as I'm new to design patterns, so I hope it makes sense!
Many thanks,
Dave
Is It Possible To Continuously Check For New Data?
Hi,
I have a question I thought I'd ask before I start trying to do something that might not be possible. What I want to achieve is this:
I want my flash webpage to continuously check a database every 3 seconds if there is new information in the database. If there is new information the flash webpage will then change in some way.
I was hoping that this work against the database could be hidden from the user so that the whole webpage isn't reloaded every time a check is made against the server.
Thanks,
Anders
How To Check For Loaded Data
I have a movie that loads both swf files and variables in difftent spots. I set up a basic loader_mc that plays a lil animation telling the user that it is loading.
But I dont know how to activate it when something is loading.
I am using both "loadMovie" and "LoadVars" at diffrent frames in the timeline.
How do i tell it to play the loader_mc "_root.loader_mc.gotoAndPlay(2)" when it is loading. Then "_root.loader_mc.gotoAndPlay(1)" once it is loaded.
help Please
SharedObject Data Check?
Hi i am currently designing a game where when the user starts the game they enter thier name and press continue, thier name is then stored in a ShredObject by this command "localInfo.data.user = name;", and if the player wins or loses they get the chance to play again. basicaly i want to check at the start of the game if a value exists within the "localInfo.data.user" and if it does i dont want to display the box for the user to enter thier name as it already exists. But i dont know how to do this i tried the below statement but it didnt work i would really appreciate any help:
if(localInfo.data.user == false)
{
}
Check An Input Menu For Data Type
Does anybody know an easy way to check if the an input is a number?
The way i was thinking of doing it was, beaking the input apart and chcking every character if it is equal to 1,2,3 .. 0 . (In an Array, obviously)
COLOR Retrieval
Hey, everyone
i'm trying to retrieve the color of a movie clip ("car")
and i need the RGB value be displayed in a text box "code"
i was trying the following:
code=(_root.car.getRGB()).toString(16);
but this is not working --seems like the result of a getRGB function is not a string...
Has anyone got a clue?
appreciate
Xml Attribute Retrieval
im lost here, i would like to ask you guys if you have any idea on how will i be able to retrive an attribute in my xml file everytime i would press a button.
example xml:
<menu>
<label name="hello" id="1"/>
</menu>
---- i want to just display the attribute "id" in a dynamic textbox everytime i press a button in my flash movie.
thanks for the tips in advance.
Xml Attribute Retrieval
im lost here, i would like to ask you guys if you have any idea on how will i be able to retrive an attribute in my xml file everytime i would press a button. example:
xml:
<menu>
<label name="hello" id="1"/>
</menu>
---- i want to just display the attribute "id" in a dynamic textbox everytime i press a button in my flash movie.
thanks for the tips in advance.
Image Retrieval From A Database
I have crerated a working version of a Flash PHP project. Every SELECT queries are executig just fine. All that's left is to include a image read from the database. I need this image to appear in Flash when the SELECT Query is ran.
I'm unable to determine where to insert the image url to retrieve the image files which are located in teh same root at... images/imagefileshere.jpg
I assigned and Initialize the PHP SvImageUrl variable to the same name as my Flash MovieClip vImageUrl where I want the image to appear.
I've used the code below quite successfully for other projects but can't seem to determine how it could be modified to retrieve a image from the database.
// 4 SELECT Query Begin--------------
$query = "SELECT author, imageurl FROM sb_table WHERE sb_id = '$sb_id' LIMIT 1";
$result = mysql_query($query);
if(mysql_num_rows($result)) {
// initialize vars
$vAuthor = "";
$vImageUrl = "";
// from each news item returned db to var equivilant
while($row = mysql_fetch_array($result)) {
$vAuthor.=stripslashes($row['author']);
$vImageUrl.=stripslashes($row['imageurl']); // i tried inserting it here with no results 'images/imageurl'
}
//output back to Flash
print "&vAuthor=" . urlencode($vAuthor);
print "&vImageUrl=" .urlencode($vImageUrl);//new 3.4.03
//close connection
mysql_close($vLink);
How To Create An Image For Later Retrieval?
I'm trying to create a tool that allows you to build an image, that uses the same techniques as www.modernpostcard.com.
I have the Flash application built, allowing you to place text and images on an image (like the postcards you make at modernpostcard.com.)
But what they do, and I really want to figure out, is at the end of the creation process you can review your creation. They produce an uneditable image replica of what you created. What concept or aspect of Flash are they using to create the image file (I can study up on it and figure it out, if I at least know what it's called.)
The source code for the HTML page that then calls up the image that gets created is below. Since it's using embeded object to call it up and not just an img tag, Flash must still be involved somehow, but I don't know how.
All I'm looking for is what to look for to learn how to a) create a 1-layer, non-editable (ie: jpg or gif) image based on the creation in Flash, and b) How to use Flash to call that image back up for display.
Like I said, if I just know what to look for, I'll figure it out. Like MovieClip.SendVisualToCreateImage =)
Thanks!!
Liam
druid -at- celticbear -dot- com
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#5,0,0,0"
width="800"
height="400">
<param name="movie" value="/cgi-bin/WebObjects/MPBuildOnline.woa/2/wa/MPRTPReviewPanel$Load?res=%2FWebObjects%2FFramewor ks%2FMPRTPreview.framework%2FWebServerResources%2F EditUploadView.swf&wosid=RDc1XOexoIgP690hadpdtw">
<param name="loop" value="false">
<param name="bgcolor" value="#FFFFFF">
<param name="quality" value="best">
<embed src="/cgi-bin/WebObjects/MPBuildOnline.woa/2/wa/MPRTPReviewPanel$Load?res=%2FWebObjects%2FFramewor ks%2FMPRTPreview.framework%2FWebServerResources%2F EditUploadView.swf&wosid=RDc1XOexoIgP690hadpdtw"
loop="false" bgcolor="#FFFFFF" quality="best" width="800"
height="400"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</embed>
</object>
How To Create An Image For Later Retrieval?
I'm trying to create a tool that allows you to build an image, that uses the same techniques as www.modernpostcard.com.
I have the Flash application built, allowing you to place text and images on an image (like the postcards you make at modernpostcard.com.)
But what they do, and I really want to figure out, is at the end of the creation process you can review your creation. They produce an uneditable image replica of what you created. What concept or aspect of Flash are they using to create the image file (I can study up on it and figure it out, if I at least know what it's called.)
The source code for the HTML page that then calls up the image that gets created is below. Since it's using embeded object to call it up and not just an img tag, Flash must still be involved somehow, but I don't know how.
All I'm looking for is what to look for to learn how to a) create a 1-layer, non-editable (ie: jpg or gif) image based on the creation in Flash, and b) How to use Flash to call that image back up for display.
Like I said, if I just know what to look for, I'll figure it out. Like MovieClip.SendVisualToCreateImage =)
Thanks!!
Liam
druid -at- celticbear -dot- com
object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#5,0,0,0"
width="800"
height="400">
param name="movie" value="/cgi-bin/WebObjects/MPBuildOnline.woa/2/wa/MPRTPReviewPanel$Load?res=%2FWebObjects%2FFramewor ks%2FMPRTPreview.framework%2FWebServerResources%2F EditUploadView.swf&wosid=RDc1XOexoIgP690hadpdtw">
param name="loop" value="false">
param name="bgcolor" value="#FFFFFF">
param name="quality" value="best">
embed src="/cgi-bin/WebObjects/MPBuildOnline.woa/2/wa/MPRTPReviewPanel$Load?res=%2FWebObjects%2FFramewor ks%2FMPRTPreview.framework%2FWebServerResources%2F EditUploadView.swf&wosid=RDc1XOexoIgP690hadpdtw"
loop="false" bgcolor="#FFFFFF" quality="best" width="800"
height="400"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
/embed>
/object>
How To Create An Image For Later Retrieval?
I'm trying to create a tool that allows you to build an image, that uses the same techniques as www.modernpostcard.com.
I have the Flash application built, allowing you to place text and images on an image (like the postcards you make at modernpostcard.com.)
But what they do, and I really want to figure out, is at the end of the creation process you can review your creation. They produce an uneditable image replica of what you created. What concept or aspect of Flash are they using to create the image file (I can study up on it and figure it out, if I at least know what it's called.)
The source code for the HTML page that then calls up the image that gets created is below. Since it's using embeded object to call it up and not just an img tag, Flash must still be involved somehow, but I don't know how.
All I'm looking for is what to look for to learn how to a) create a 1-layer, non-editable (ie: jpg or gif) image based on the creation in Flash, and b) How to use Flash to call that image back up for display.
Like I said, if I just know what to look for, I'll figure it out. Like MovieClip.SendVisualToCreateImage =)
Thanks!!
Liam
druid -at- celticbear -dot- com
object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#5,0,0,0"
width="800"
height="400">
param name="movie" value="/cgi-bin/WebObjects/MPBuildOnline.woa/2/wa/MPRTPReviewPanel$Load?res=%2FWebObjects%2FFramewor ks%2FMPRTPreview.framework%2FWebServerResources%2F EditUploadView.swf&wosid=RDc1XOexoIgP690hadpdtw">
param name="loop" value="false">
param name="bgcolor" value="#FFFFFF">
param name="quality" value="best">
embed src="/cgi-bin/WebObjects/MPBuildOnline.woa/2/wa/MPRTPReviewPanel$Load?res=%2FWebObjects%2FFramewor ks%2FMPRTPreview.framework%2FWebServerResources%2F EditUploadView.swf&wosid=RDc1XOexoIgP690hadpdtw"
loop="false" bgcolor="#FFFFFF" quality="best" width="800"
height="400"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
/embed>
/object>
How To Create An Image For Later Retrieval?
I'm trying to create a tool that allows you to build an image, that uses the same techniques as www.modernpostcard.com.
I have the Flash application built, allowing you to place text and images on an image (like the postcards you make at modernpostcard.com.)
But what they do, and I really want to figure out, is at the end of the creation process you can review your creation. They produce an uneditable image replica of what you created. What concept or aspect of Flash are they using to create the image file (I can study up on it and figure it out, if I at least know what it's called.)
The source code for the HTML page that then calls up the image that gets created is below. Since it's using embeded object to call it up and not just an img tag, Flash must still be involved somehow, but I don't know how.
All I'm looking for is what to look for to learn how to a) create a 1-layer, non-editable (ie: jpg or gif) image based on the creation in Flash, and b) How to use Flash to call that image back up for display.
Like I said, if I just know what to look for, I'll figure it out. Like MovieClip.SendVisualToCreateImage =)
Thanks!!
Liam
druid -at- celticbear -dot- com
object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#5,0,0,0"
width="800"
height="400">
param name="movie" value="/cgi-bin/WebObjects/MPBuildOnline.woa/2/wa/MPRTPReviewPanel$Load?res=%2FWebObjects%2FFramewor ks%2FMPRTPreview.framework%2FWebServerResources%2F EditUploadView.swf&wosid=RDc1XOexoIgP690hadpdtw">
param name="loop" value="false">
param name="bgcolor" value="#FFFFFF">
param name="quality" value="best">
embed src="/cgi-bin/WebObjects/MPBuildOnline.woa/2/wa/MPRTPReviewPanel$Load?res=%2FWebObjects%2FFramewor ks%2FMPRTPreview.framework%2FWebServerResources%2F EditUploadView.swf&wosid=RDc1XOexoIgP690hadpdtw"
loop="false" bgcolor="#FFFFFF" quality="best" width="800"
height="400"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
/embed>
/object>
Color Retrieval Challenge
hey guys i am not sure if any of you guys want to take the time to try and help me figure this out but i am creating a color palette for fun and i have this selector, or should i say partial selector, and i was wondering if there was a way to return a color based upon where the mouse is. Here is the fla and i have the gradient drawn in dynamically which i think would be helpful, so here it is:
Selected Text Retrieval
First of all: I'm a Flash 5 user...
My problem:
I can't retrieve selected text and send it from one text field to another.
How it should work:
The user should select a word (at least one letter) in the main text field (called theText). As soon as the word is selected, the 'Lav keyword' (means 'Create keyword') button should be activated. I usually achieve this by putting the button into a movieclip, and by using tellTarget to make the movie jump to another frame. Now, when the user clicks the newly activated button, the selected word should be copied and pasted into the keyword field (called key_field), and the button should become deactivated again.
I've tried to dig up several solutions, but nothing seems to work for me. Someone please take a look at my .fla, and tell me what to to. text_ex.zip (17k)
JPEG Retrieval And Display
Hi, I'm designing a website aiming to provide visual coverage of surfing locations across the UK through the use of webcam images. Each of the images themselves will be retrieved externally, with permission, from various hotels over-looking these locations.
I have spoken to someone who has completed a similar project, a widget which retrieves and displays webcam images, which can be viewed here:
Widget
I would like to use the same method. Explained in his own words:
'The feeds you see in the widget are simply JPEG images hosted on the originating website, so none of the feeds are handled by myself. The widget sends a HTTP request for the JPEG and displays what it gets in the widget.'
As you can tell from the link url, he's used PHP, which I have been learning.
I have lost contact with him recently and not sure the steps I should take to integrate such a feature into my website. Please help.
SharedObject Local Object Retrieval ?
Hi all,
i am using the sharedObject to create a local data object. I can create a .sol file on my machine which contains a username and password variables and the values are "giles" and "pass" respectively.
//================code========================
localObject = SharedObject.getLocal("myFile");
un="giles";
pw="pass";
localObject.data.userName=un;
localObject.data.passWord=pw;
localObject.flush(10000);
//================code========================
No problem i have created the .sol file and i can retreive the data by accessing the Shared Object's data method. I can therefore call the information and write it to the screen
//================code========================
display=localObject.data.passWord + " : " + localObject.data.userName;
//================code========================
this gives me "pass : giles"
however, if i then go into my local folder structure and change the .sol file password value to "past" say, and then, within my swf file, comment out the creation of the .sol file "myFile" but leave in the display box, i get nothing back
i just get " : ".
So does this mean that you cant create or ammend a .sol file unless you create it through the flash player ?
It looks easy enough to create ?
many thanks in advance
gilesb
2q's ; Directory Retrieval , And FS Command Prob.
i got two questions;
the first one is that i want to retrieve the directory in which my exe player wil be run from. i need that inoredr to have my autorun exe player (on a cd) open up certain folders and files... i can open it via the FS command but i cant get the right directory..
the second problem is that i use the FS command to make the menus dissapear but then i cant creat a stand-alone player. how can i have both ? (to create a stand alone player you need ot click on a menu and select that option).
thank you very much.
-bendor.
Html Source Code Retrieval
is there a way to retrieve the html source code of a website within flash. For example i would create an input text box and when i input a url like "http://www.flashkit.com" it would be able to return the actual source code of the website, as if i had gone there myself and hit VIEW>>SOURCE.
is there a function/meathod that can do such a thing?
any hint to help would be greatly appreciated.
-jimmyobob.
Flash Movie Database Storage/Retrieval
I hope this is the correct forum for this question. If not, please redirect me. I have been working with an Adobe Flash developer on ASP.NET/Adobe Flash integration, specifically using the web application framework open source product DotNetNuke. I know a little Flash but I am still a novice. I have recently been experimenting with the storage and retrieval of various files (.doc, .xls, .pdf, .gif, .jpg, .png, etc.) directly in SQL Server 2005 using the column type of varbinary(max). I can store all of these in SQL Server 2005, retrieve them, and then display them via a web page. There are of course pros and cons to this approach but for certain situations it works reasonably well. I was going to try the DB storage/retrieval with a Flash movie (swf file). I can store Flash movies and retrieve them however the display is a problem. I use the Swfobject JavaScript for all the Flash movies I display on web pages. Swfobject expects a file path and all other examples I have seen for Flash implementation do the same. It seems as if you would have to feed the Adobe Flash reader/player a binary stream directly but the mechanics of how to do this elude me. Does anyone know if it is possible?
Thanks,
G. M.
Dynamic Retrieval Of Array-nested Object Attributes?
Here's the basic setup:
array contains multiple objects
each object has the same properties, though different values stored in their various properties.
Thus array[0].color could return something like "blue".
array[0].radius might return 50.
Now, I want to vary how I'm asking for the property... sometimes I might want radius, sometimes color.
I thought it would be something like
attrib="color";
trace(array[0][attrib]);
That doesn't seem to work. What am I doing wrong? If my logic is sound, I'll post some code to follow up... It's mighty convoluted so hopefuly you can answer me purely on a conceptual level using the above example to guide the syntax.
Thanks!
Reality Check: Flash CS3/AS3 Check Syntax
I need a quick reality check. I've finally started playing around in CS3/AS3 on my Mac. Whenever I click "check syntax" I get a very limited error response: specifically, I get actual syntactical errors (e.g., a missing brace or paren), but I get NO COMPILER ERRORS (e.g., use of an undefined method or property). These compiler errors trigger at runtime, but not having them during authoring makes coding and debugging unnecessarily difficult.
Is this really how it's supposed to work?
In Flash8/AS2, we had compile-checking right in the AS file. If I attempted to access an undefined method or property, the error-checker would catch that right away. No time-consuming compile was necessary to catch these obvious errors (see example below). But AS3 doesn't seem to be as clever.
Am I missing something?
Thanks much!
-------------EXAMPLE---------------
Attach Code
import flash.display.BitmapData;
class myClass{
var _bmp:BitmapData;
function myClass(){
_bmp = new BitmapData(500,300);
_bmp.methodNotDefined();//unknown method of BitmapData triggers an error
myVar = 5;//unknown property of myClass triggers an error
}
}
Mx.data.components - Unable To Declare Data Component Types In External Class Files
Hi all,
FlashMX 2004, v7.2:
I am trying to declare instances of data-components (DataSet and DataHolder) in external classfiles, but Flash can't find the sourcefiles for any of the data component classes in the classpath.
According to the help-files, the classname for the DataHolder component is:
Code:
mx.data.components.DataHolder
Similarly, the classname for the ComboBox component is:
mx.controls.ComboBox
Code:
mx.data.components.DataHolder
In the following, the ComboBox gets declared, and the DataHolder generates a "Class can't be loaded" error:
Code:
class my_class extends MovieClip {
var my_cbox:mx.controls.ComboBox;
var my_data:mx.data.components.DataHolder;
function my_class() {
// constructor function
}
}
Sure, it fails because there is no "components" folder in the mx.data folder (at least on my system), and I have been unable to find any DataHolder.as file anywhere either, even though the documentation gives examples that reference the mx.data.components-folder for various data components. I even tried re-installing to make sure I had not accidentally deleted any classfiles, but still no luck.
Am I missing something really obvious here? Does anyone know how to successfully import, declare or otherwise make use of data-components in external class files? Any help greatly appreciated.
Send Form Data To A Php Script Which Writes The Data To A .txt File
Hi!
Ok, this might be very easy but I´m new to both AS and PHP so I´m struggling here and I havent found any useful tutorials to use only small bits here and there.
What I want to do: I have a form which send data to a php script which then writes the data to a .txt. This .txt file is then used by a .swf file to display certain values.
I also have 1 field that I want to use as a validation field as a simple(but yes, not very safe) way to make sure only the right persons submit information.
I have got the .swf file to read the .txt file so thats no problem.
Has anyone got any suggestions about how I do this?
I have an idea of letting the validation field be checked against a .txt file and if one of the lines in the .txt file matches the validation field the rest of the information is submitted and sent to the php script.
Difficult?
Many thx in advance!
Is There Anyway To Read Data In From A Text File And Populate An Array With The Data?
hello,
i'm new to flash, and i'm trying to create a photo gallery. however, the photos may not always be the same, and i need to have a way to easily change the pictures without having to go back into flash to change the code everytime. i thought a good way to do this would be to read the names of the pictures in from a text file and then use those names to populate an array, similar to the tutorial on creating a photo gallery on kirupa.com. the problem is, i have no idea how to do this. anyone have any ideas?
thanks
Converting Internal Array Data Into External XML Data [renamed]
I have this code inside my flash to name my navigation menu. Now I want to put this outside flash and load it via XML. How do save my different arrays into a variable for later use in my code?
In my nav fla (what i want to load from XML):
Code:
// MAIN MENU ARRAY
var mm_array:Array = ["MAIN1", "MAIN2", "MAIN3", "MAIN4"];
// SUB MENU ARRAY
var sm1_array:Array = ["sub1", "sub2"];
var sm2_array:Array = ["sub1", "sub2", "sub3"];
var sm3_array:Array = ["sub1", "sub2", "sub3"];
var sm4_array:Array = ["sub1", "sub2", "sub3", "sub4"];
var submenu_array:Array = [];
XML loading code
Code:
// LOAD MY XML
var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function (success:Boolean):Void {
if (success) {
// what goes here to define: mm_array, sm1_array, sm2_array etc
myXML.load("myXML.xml")
XML file something like this:
PHP Code:
<navigation>
<menu>
<mm_array>main1</mm_array>
<sm_array>sub1</sm_array>
<sm_array>sub2</sm_array>
</menu>
<menu>
<mm_array>main2</mm_array>
<sm_array>sub1</sm_array>
<sm_array>sub2</sm_array>
<sm_array>sub2</sm_array>
</menu>
</navigation>
XML Data Displayer, Help Adding Multiple Data Fields Relating To XML
I recently used the Displaying XML Data tutorial, but cant seem to figure out how to add more dynamic text fields and populate them with more <person> and <comment> attributes.
Here is my code:
function loadXML(loaded) {
if (loaded) {
_root.inventor = this.firstChild.childNodes[2].childNodes[0].firstChild.nodeValue;
_root.comments = this.firstChild.childNodes[2].childNodes[1].firstChild.nodeValue;
name_txt.text = _root.inventor;
comment_txt.text = _root.comments;
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("inventors.xml");
and xml:
<?xml version="1.0"?>
<inventors>
<person>
<name>Thomas Edison</name>
<comment>Inventor of many things such as the incandescent lightbulb.</comment>
</person>
<person>
<name>Doug Engelbart</name>
<comment>Invented the mouse at the Stanford Research Institute</comment>
</person>
<name>Patrick</name>
<comment>did this xml file</comment>
</person>
</inventors>
I am trying to display Patrick - and did this xml file.
Could you please help me figure out what I am doing wrong here?
Is There Anyway To Read Data In From A Text File And Populate An Array With The Data?
hello,
i'm new to flash, and i'm trying to create a photo gallery. however, the photos may not always be the same, and i need to have a way to easily change the pictures without having to go back into flash to change the code everytime. i thought a good way to do this would be to read the names of the pictures in from a text file and then use those names to populate an array, similar to the tutorial on creating a photo gallery on kirupa.com. the problem is, i have no idea how to do this. anyone have any ideas?
thanks
Help Me Define My Search.. ( Sound Data To Graphic Data)
I don't know what the actual terminology is so my searches are tanking. What I want to do is to take an audio file and based on the tones and whatnot generate graphics that move with the music. The visualizations in Windows Media Player do exactly what I want but I don't know what it is actually called.
Any help to point me in the right direction is much appreciated.
Thanks
Scroll Bar Works For External Data But Not Internal Data
Howdy,
I have a dynamic text box named 'outputbox'. This is set for multiline. I have an associated scroll bar.
I make a lot of these kind of calls:
PHP Code:
history.onPress = function() {
outputbox._visible = true;
loader = new LoadVars();
loader.load("history.txt");
loader.onLoad = function() {
outputbox.text = this.history;
};
This works great, the scrollbar becomes active when the text goes beyond the outputboxes boarders.
In addition, this 'outputbox' also has a variable (Var) associated with it named 'myTally'. At some particular frames I am generating content for this variable thusly:
PHP Code:
for (receipt = 0; receipt<23; receipt++) {
description = _root["config"+receipt][1];
price = _root["config"+receipt][2];
if (description != 0) {
mytally = (mytally+"
" +description+" "+ price); }
}
Indeed, the outputbox certainly gets populated but the scrollbar does not work. When I select-and-drag the text it definitely goes beyond the boarders of the outputbox. If I change the font size of this outputbox (8pt to 16pt) then the scrollbar *does* work.
Why does the scrollbar react to an external file and not my dynamically generated variable? Is something not scoped or in focus? I really have no idea. Anyhow, any suggestions of where to look for resolution would be greatly appreciated.
Thanks,
Cheez
Flash Data Intergratino Useing Xml Data Bases
im not huge newbee to this , iv overcome the majority of the studid little qustions but i ask you this , how do you create adatebasse of say mp3s thru flash using a xml database. first, how do you embeed say mp3 files into a xml document and so on and so on
How To Drag Column Data From One Data Grid To The Anther?
How to drag column data from one Data Grid to the anther?
Hi,
I build an application in mx2004 and I have 2 dataGrid instants containing data.
I am looking for a way to let the user drag a row of data from a data grid and drop it in anther data grid.
I have an “EventListener” on “myListener.cellPress” caching the data, but I could not find a way to determine where to drop the data and how to insert it to the destination dataGrid.
Thank
Nimrod
Flash Sends Data To PHP, Browser Waiting For Data
Hi,
I have the following problem. I'm implementing a flash form mailer using PHP to send out the mail. I'm doing this in the actionscript to sed out the data:
_root.mcDataField.loadVariables("form.php", "POST");
Then my PHP script looks like this:
$sendTo = "xyz@server.com";
$subject = "Some title here";
$headers = "From: " . $_POST["Name"]. "<" . $_POST["Email"] . ">
";
$headers .= "Reply-To: " . $_POST["Email"] . "
";
$headers .= "Return-Path: " . $_POST["Email"];
$message = $_POST["Message"];
$retVal = mail($sendTo, $subject, $message, $headers);
When I sendthe data, it gets emailed, but the browser shows (in the bottom left corner): "Waiting for xyz.com", where xyz.com is the server I have my files on.
Any idea would be greatly appreciated! Thank you!
How To Drag Column Data From One Data Grid To The Anther?
How to drag column data from one Data Grid to the anther?
Hi,
I build an application in mx2004 and I have 2 dataGrid instants containing data.
I am looking for a way to let the user drag a row of data from a data grid and drop it in anther data grid.
I have an “EventListener” on “myListener.cellPress” caching the data, but I could not find a way to determine where to drop the data and how to insert it to the destination dataGrid.
Thank
Nimrod
HELP Check Box W/ DYNAMIC Check Value?
I was wondering if you can make the Check Box component have a dynamically-loaded check value.
I would like to have it read the "&price1" variable from a text file.
If you know how to do this, please help.
thanx!
MyComboBox.addItem(label [,data]) How To Add Data?
The Flash help says to add an item to a ComboBox using myComboBox.addItem(label [,data]). I have no problem adding the label but my data is two items: unit and value. How do I add these two pieces of data?
An example of a comboBox listing might be:
Label: Rope
Unit: Feet
Value: 2.00
So if a user selects Rope, they will see it's $2.00 a foot.
Thanks for any help.
Data Connection/Data Holder Comps
I do a lot of developing with SQL->PHP->XML->FLASH, and end up having to deal with a LOT of data that I both recieve and send. I really just noticed the Data Connection/Data Holder comps like...today and I dont really see how they are all that much better than just using my own array's and objects. Perhaps my limited understanding of them prohibits my appreciation. Anyone care to enlighten?
AS2: Data Bind SQL Query Data To ComboBox
Can anyone point me in the right direction - I'm using Flash remoting with CFCs and I'm trying to pull query data from SQL and populate a ComboBox with AS2 components.
I have a CFC called "states.cfm" and Flash Remoting is set up and connecting properly (AS2 components). It's pulling 2 columns from the states table, "state" and "stateValue". In the flash movie there's a dropdown with an instance name "dd_states". I've searched all over (Using Flash,macromedia,google,flashkit) and I can't find a clear example using the AS2 databinding components using data from a SQL Query....
ThxInAdv
Data Grid Versus Data Connection Kit
can anybody explain me an advantage of data connection kit
over data grid, is it realy better? there is no test version of firefly so u can not test it.
i mean does anybody used the data grid and than chaned to
firefly?is this connector-resolver stuff that usefull? is it worth 299$
thanks nermin
AS2: Data Bind SQL Query Data To ComboBox
Can anyone point me in the right direction - I'm using Flash remoting with CFCs and I'm trying to pull query data from SQL and populate a ComboBox with AS2 components.
I have a CFC called "states.cfm" and Flash Remoting is set up and connecting properly (AS2 components). It's pulling 2 columns from the states table, "state" and "stateValue". In the flash movie there's a dropdown with an instance name "dd_states". I've searched all over (Using Flash,macromedia,google,flashkit) and I can't find a clear example using the AS2 databinding components using data from a SQL Query....
ThxInAdv
Saving Data And Loading Data From A .txt File...
Hi,
I know there's a way to do it but i just couldn't get the right tutorial around..
I have read through Shared Objects but i couldn't get it work...
I just have to save my data, maybe array into .txt file and later on
retrieve from the same .txt file...
Anyone here have an example or some source code so i can have reference on it?
Thanks for the help provided....
Regards,
Lacus
AS2: Data Bind SQL Query Data To ComboBox
Can anyone point me in the right direction - I'm using Flash remoting with CFCs and I'm trying to pull query data from SQL and populate a ComboBox with AS2 components.
I have a CFC called "states.cfm" and Flash Remoting is set up and connecting properly (AS2 components). It's pulling 2 columns from the states table, "state" and "stateValue". In the flash movie there's a dropdown with an instance name "dd_states". I've searched all over (Using Flash,macromedia,google,flashkit) and I can't find a clear example using the AS2 databinding components using data from a SQL Query....
ThxInAdv
|