ActionScript 3.0 :: Populating Database From Contents Of Multiple MovieClips Within Main

Sep 16, 2011

In my main .fla file I have a movie clip onstage called "square". The movieclip is empty. Below that are five buttons (black, red, blue, green, remove) which, depending on the color button clicked, would load into the empty "square" clip either a movie called "black_square.swf", "red_square.swf", "blue_square.swf" or "green_square.swf". Only one such movie at a time is loaded into the clip. Clicking the "remove" button empties the clip. I've also got a "submit" button, which, when I click it, I'd want to submit the name of whatever .swf file happens to be loaded to a database. If nothing is loaded I want the record created to show the "square" movieclip was empty.

I've been able to make an application that has a central movie clip containing 20-something other clips. The application lets people create their own design of a particular item, choosing the colors of every component to this item (each of which is loaded into its own component-specific movie clip). One of the movie clips can be populated by a .jpg or .png file a user himself uploads. Once finished, people can print or save this design by choosing the appropriate button on this app. What I'm trying to do is find a way to also pass this design, created from multiple movie clips into a central clip, into a database as well.

The movie clips are "driven" by 21 color chip buttons each which has an instance name of a color, i.e. "black", "brown", "dark_green", etc. By a series of switch/case statements, when one clicks a "component" button (there are approximately 13-15 components) they load into the clips a movie named "(model)_(view)_(component)_(color (event.target.name)).swf". There are many "models" to choose from but within the stage only one "model" is selected at a time, so that wouldn't change here.

The design can be viewed from front, back, left or right, so that's what the "view" is - the colored components that are the same save for the view (i.e., an object which can be seen from either the front or left view) are loaded into movie clips that are either visible or invisible depending on which view one selects. Is there a way I can attach a variable name to a movie clip which is selected (bearing in mind that the application viewer can change the color of each component (and therefore the clip loaded) at will) to be read by the database? Or would the name of whatever movie clip itself that happens to be loaded be sufficient? "populating a database from contents of a movie clip".

View 3 Replies


Similar Posts:


ActionScript 2.0 :: Main Contents Change Size And The Menu Position According To The Size Of Main Contents?

Nov 10, 2003

i want to know how did the creator of otradesign accomplish the effect in his site like the menu and the main contents change size and the menu position according to the size of main contents.

View 5 Replies

ActionScript 3.0 :: Using Database To Send Multiple Movieclips To Different Frame Labels

Jul 22, 2011

I have code to send a movieclip to a frame label which works just fine, but I want to pull the frame labels from a database for multiple movieclips and send them to different frames.. the following works :-
 
tab1.gotoAndStop('Roleplay');
 
but once in a loop, I'm having problems... is it down to the syntax ?
 
for (i = 1; i <= 4; i++) {
var currentTab:String = "tab" + i;        var currentTag:String = event.target.data["tag" + i];
[currentTab]gotoAndStop(currentTag);
}

View 1 Replies

ActionScript 3.0 :: Starting And Stopping Multiple Movieclips On Different Keyframes Of Main Movie

Jun 17, 2009

I have multiple movie clips on 4 labeled frames of my movie. The keyframes are as follows : People, Place, Portfolio, Possibilities

The buttons to go to each of these keyframes work, although because I have a movie (different for each keyframe) I cannot get the previous movie's audio to stop when I click to another keyframe.

Also, I cannot get the other movie to work once I am on the next page.

The movieclips are named- Btn2 -which is the movieclip that plays once clicked on the homepage. Btn3- which is the movieclip that is supposed to play once clicked (on the people page).

To see what I'm talking about- visit: [URL]

give it some time to load- then click the doorbell- let the movie play for a little bit then click on people...the door closes, but the sound continues.

Here's the actionscript.

ActionScript Code:
stop();
import flash.events.MouseEvent;
//---people button timeline change---//

[Code].....

View 1 Replies

ActionScript 3.0 :: Programmatically Populating Movieclips?

Jan 23, 2010

While it's clearly possible to create MovieClips, I want to know: Is it possible to make multi-frame movieclip animations programatically? That is, is it possible to decide how many frames there are in the MovieClip, and specify the contents of each frame?I was intending to programatically generate a small MovieClip containing three frames, each with the text "Loading." "Loading.." and "Loading..." respectively, so that I wouldn't have to set up a timing event to change them manually. When I tried to figure out how to do this, however, I found that I couldn't set the number of frames in a MovieClip object, and there didn't seem to be any way to alter them directly.

View 3 Replies

ActionScript 3.0 :: Randomly Populating Shapes With MovieClips

Jul 23, 2009

I can place the movieclips randomly on the stage but I am trying to randomly populate shapes with movieclips.
Code:
ball_mc.x = Math.random() * stage.stageWidth;
I tried just replacing stage.stageWidth with box_mc.width but that didnt work. Also, I wanted to create more complicated shapes for their bounding area then just a movieclip's rectangle.

View 6 Replies

ActionScript 2.0 :: Database Contents - Dynamic Variables Not Shown

Dec 28, 2003

My cfm script pulls the contents of database fine. (a cfoutput reveals variables). In flash however I cannot see my dynamic variables.

// In the flash mainframe I have.
loadVariables("LoadVars.cfm",0,"GET");
// I've also tried this:
myLoadVars = new LoadVars();
myLoadVars.load("LoadVars.cfm");
// In the LoadVars.cfm I have.
<CFQUERY NAME="ElfVars" DATASOURCE="ElfQuest">
SELECT * FROM Stats
</CFQUERY>

I have a dynamic text field named "Name". Why doesn't it display the Name in the database. I can see my variable hardcoding cfoutput in the page. SQL is working. Why can't I see them in Flash?

View 14 Replies

ActionScript 2.0 :: Storing Tree Component Contents In Database

Aug 4, 2006

I've got a tree component on the stage that the user can add folders and questions to. I need to write the data from the tree into a database as the user adds items and then re-build the tree from the database when the user re-opens the program. This works fine except the client wants the user to be able to delete and move items within the tree.

I'm not sure how I can track the position of items within the tree so that it re-builds the tree (from the database values) in the same order as it was when the user closed the program?

At first, I thought I would just add the getDisplayIndex of the selectedNode, but that changes when you expand or collapse a folder, and it would also mean that I would have to update a number in each database entry any time the user moves a folder or item...

I'm thinking the only way I can get around this and ensure the db tracks the latest treeview is to provide a "Save" button and make the user hit that (instead of hitting the "Accept Changes" button which currently exists for each item & folder and just updates the database on each new entry). With the "Save" button, I could just copy a new database on top of the old one (removing all the unique id indexes) and then write to the new db. Not the end of the world, but it seems more ponderous and less intuitive. Plus, if the user enters hundreds of items, it could take time to write the entire db each time...

View 1 Replies

ActionScript 1/2 :: Start Duplicating And Populating MovieClips Inside 'contentMC'?

Oct 21, 2009

I have a movieClip(contentMC) that contains numerous movieClips for my site. I have set the color matrix of contentMC to be black & white. This works fine by itself but once I start duplicating and populating movieClips inside 'contentMC' the color matrix settings are lost.

[Code]...
 
I've even tried to populate the content and THEN turn it B/W thinking that it would be better to convert the contentMC to BW after it was done building itself. This didn't work either. So I started to comment out code until the color matrix settings would stick and this line of code is the killer but unfortunately is essential to rendering the site. contentSC.samplesMC.sample._y = contentSC.samplesMC.sample._y+621; (this line offsets a duplicated movieClip)

View 1 Replies

Php :: Populating Multiple Flex 4.5 ComboBoxes?

Oct 7, 2011

What is the best way to populate a multiple Comboboxes when using Flex 4.5 and PHP 5?

I am developing a Flex app that displays about 20 Comboboxes on the screen - each combo showing different data. I would like all of the comboboxes to be populated at once when the app starts. I used the default "Data/Service" wizard in Flex that automatically creates the PHP that returns an ArrayCollection to Flex. For example, below is the current PHP function I use that populates each ComboBox:

public function getListsByCODE($code) {
$stmt = mysqli_prepare($this->connection, "SELECT a.IDCODE, a.CODE, a.DESCR, a.NOTES FROM DROPDOWN_VW a WHERE (a.CODE = ?)");
$this->throwExceptionOnError();

[Code]....

View 1 Replies

ActionScript 3.0 :: Populating Multiple Text Boxes From Xml

Jun 28, 2010

I'm stuck on a xml/dynamic text box issue... I can get a single dynamic text box to populate using this actionscript:

[Code]....

View 2 Replies

ActionScript 2.0 :: Populating Multiple Text Variables By Array?

Apr 11, 2007

I have 25 dynamic text fields. If I could, I'd just assign their text by calling the array in the text property var, but that doesn't work.My text field variables are simply B1, B2, B3, B4, B5, I1, I2, I3, I4. . . (I'm populating a bingo card)I'm using 5 Arrays to get the 25 numbers. bArray, iArray. . . and so on.Now, obviously I can fill in my text fields by assigning each variable separately, however, I'd like a shorter solution.Instead of coding B1=bArray[0], B2 =bArray[1] I was looking for a way to assign all the variables in a for loop... or something...

View 7 Replies

ActionScript 3.0 :: Populating Multiple MCs With Instances Of Same Symbol From Library?

Aug 21, 2010

Say I've got something like this:

Code:
var parcher0:_parcher0 = new _parcher0();
_parcher0 is a Symbol in the Library with the Class definition _parcher0

I want to addChild this Symbol to an MC on the stage like this:

Code:
this.pccard0.sprite_.addChild(parcher0)

All good! Except I want to do the same thing, the same way, with this.pccard1.sprite_, and several more. When I do so, parcher0 only shows up on the final, most recently assigned addChild().

Is it forbidden to add a Symbol in this way in more than one place, and if so how do I get around it without creating a raft of arbitrary duplicates?

View 1 Replies

Xml - Populating A Cell In A DataGrid With Multiple Values Separated By Commas - Flex?

Jun 28, 2011

I have an XML file with this data.

<resultSet>
<MerchandiseAssortmentCategory>
<merchandiseAssortmentCategoryId>275</merchandiseAssortmentCategoryId>
<merchandiseAssortmentCategoryName>D21 Plywood</merchandiseAssortmentCategoryName>
<merchandiseSubordinateClass>

[Code]...

When i run this, only the category name is filled. the subordinateclass number is just blank.

View 2 Replies

ActionScript 3.0 :: Mysql Database Design = Multiple Students + Multiple Results

Feb 9, 2011

This is more of a database design issue but almost everybody here uses database integration with their apps so I feel it is important. I am integrating AS3 + mysql + php and need to clear up the database design for multiple students results in various activities. Developing an online e-learning course with a "dashboard" or teacher control panel with all kids results in each activity. I have read the database design rules by Codd etc... understand the need for parent and child tables so information is relational and not duplicated etc... BUT I am not sure how to design the results part. Various students do various lessons with 10 activities which each give a mark out of ten. The table would be updating every few seconds as 10,000 users would be online at the same time

1. Would I create a results table with all the students results going in the same table ie: Tom would be the first row

[Code]....

View 5 Replies

ActionScript 3.0 :: Different MovieClips In One Movie With Scrolling Contents?

Jul 26, 2009

I am new to ActionScript and Flash, and I am getting this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at jessicaclucas_fla::MainTimeline/stopResumescroll()
I have several different clips in one movie that have scrolling content. When I click a button to move to a different clip that doesn't have a certain scroll, it gives me this error. You can see the site I am working on: [URL].

Here is the code:
//Import TweenMax and the plugin for the blur filter
import gs.TweenMax;
import gs.plugins.BlurFilterPlugin;
//Save the contents and masks height.
//Assign your own content height here!!
[Code] .....

View 0 Replies

ActionScript 2.0 :: AutoSize For MovieClips - Loading Contents From XML

Jul 13, 2007

I know that the autoSize works fine for textfields (loading contents from a XML, for example), but and for movieclips? There's a way to set this?

View 6 Replies

ActionScript 3.0 :: Create Several Movieclips For Each Page And Then Add The Contents Into Pages Separately?

Jul 26, 2011

how does pagination work? Is that I just need to create several Movieclips for each page and then add the contents into pages seperately?? Or is there any available tutorials??

View 2 Replies

ActionScript 3.0 :: Evaluate Multiple Textbox Contents?

Feb 8, 2011

I have 25 textboxes on stage named sw1 through to sw25. I want to evaluate the contents of each box using a for loop.

for(var i = 1; i<26;i++)
{
var t = "sw"+i
trace (t.text)
}

I get this error message when I run my program:

Property text not found on Number and there is no default value.at Mastercalendar_fla::MainTimeline/frame1()

View 1 Replies

ActionScript 3.0 :: Evaluating Contents Of Multiple Textbox Objects?

Feb 8, 2011

I have 25 textboxes on stage named sw1 through to sw25. I want to evaluate the contents of each box using a for loop. How can I do this. Note the following code does not work for me.

for(var i = 1; i<26;i++)
{
var t = "sw"+i
trace (t.text)
}

I get this error message when I run my program:

Property text not found on Number and there is no default value. at Mastercalendar_fla::MainTimeline/frame1(E)

View 1 Replies

ActionScript 3.0 :: Flash For Loop Loading Multiple Images Into Multiple Movieclips

Feb 5, 2012

[Code].....

I have a group of 16 images that I would like to load 1 of each into each movieclip. I want image1 to be inside of visual1, image 2 inside of visual2, and so on. the images are named like, 1960s_(1).png where the 1960 (year) part is coming from the rangeNum variable. The above gives me this error: 1061: Call to a possibly undefined method addChild through a reference with static type int.

View 4 Replies

ActionScript 3.0 :: Copy Contents Of Multiple Text Input Fields To Clipboard?

May 17, 2010

I'm working in Flash Builder and Catalyst CS5 building a project that will aid technicians in finding policies and tools easily. One area that I want to focus on is the note taking section. I want the user to beable to input text and then have a "Copy Notes to Clipboard" button that  will gather all the data from those input fields and store them in theclipboard. This way all the agent has to do is paste into the note section on their service ticket.The following is an example of the fields that it would require.Name:Phone Number:Issue:Symptoms:Troubleshooting Notes: also want the label for the  text field to be included within the notes. So when someone pastes the  notes it won't be just the contents, but will include the name of the  text area as well. "Phone Number: 555-123-4567" instead of just  "555-123-4567."

View 3 Replies

ActionScript 3.0 :: Multiple Buttons Share Single Loader For Loading Each Of Their Target Contents?

Jun 26, 2009

I am trying to have one single loader for different buttons to load their specific target. lets say I have btnOne and btnTwo, each of them have their page to link to, btnOne to pageOne, btnTwo to pageTwo, page one and two are external swfs. so can I load them into stage by sharing one single loader?

this is simply my script:

ActionScript Code:
var swfURL:String = ("external.swf");
btnOne.addEventListener (MouseEvent.CLICK, startLoad);
btnTwo.addEventListener (MouseEvent.CLICK, startLoad);

[code]....

View 2 Replies

ActionScript 3.0 :: Multiple Buttons Share Single Loader For Loading Each Of Their Target Contents

Jun 26, 2009

I am trying to have one single loader for different buttons to load their specific target.lets say I have btnOne and btnTwo, each of them have their page to link to, btnOne to pageOne, btnTwo to pageTwo, page one and two are external swfs. so can I load them into stage by sharing one single loader? this is simply my script:

[Code]...

View 2 Replies

ActionScript 3.0 :: Loading Multiple Images On To Multiple Movieclips?

Sep 16, 2009

I have 50 images that need to be on stage, which will be embedded into 50 different movie clips. I named the movie clips image1-image50 and the images are in an external folder named 1-50. Every freaking article or tutorial I have found clearly explains how to upload one image, or just one at a time. I can do that, and spend 2 days renaming all the functions, but I do not want to do that. Is there a better way to just load all 50 images, place them accordingly?

View 3 Replies

ActionScript 3.0 :: Load Multiple Images Into Multiple MovieClips?

Oct 26, 2009

I have 24 movie clips on the stage: my_menu.image_holder_mc1 thru my_menu.image_holder_mc24. I want to load an image in each one. How do I identify the holder which to add a child.

The Code I have so far is....

Code:
for (var i:Number=1; i<=24;i++){
var myLoader:Loader = new Loader();
myLoader.name = "image_"+i;

[Code].....

View 2 Replies

Php :: Database Sending Multiple Rows X Cols To Flash

Feb 22, 2011

I have a Mysql database and I am trying to import multiple records with multiple columns into Flash AS3 using PHP. My problem is I am able to make it work with a single column and multiple records but for multiple columns I am not being able to format it correctly. What i wish to have is an array(of records) of associative arrays(of columns) i.e. I want to be able to partition the output (from php) based on '|' and store it in a flash array and then be able to access name,id for each of them (see below the code).[code]the problem is I get an array of names,id but the myArray ForFlash is empty (which is kind of expected).

View 1 Replies

Database :: Flex - Creating Multiple Tables In Adobe Air

Nov 30, 2011

I want to create 2 tables in a single adobe air database. I am using Adobe flash builder with the import flash.data.*;
I tried initializing the statement below. it give me the error on creating the second table. Do I have to use other API so that

private function db_opened(e:SQLEvent):void {
sqls.sqlConnection = sqlc;
sqls.text = "CREATE TABLE IF NOT EXISTS test_table ( id INTEGER PRIMARY KEY AUTOINCREMENT, first_name TEXT, last_name TEXT);";
sqls.execute();
[Code] .....

ERROR
Error: Error #3106: Property cannot be changed while SQLStatement.executing is true.
at Error$/throwError()
at flash.data::SQLStatement/set text()

View 1 Replies

Actionscript 3.0 :: Send HTML Form Contents And Flat-file Contents To Flash?

Oct 20, 2010

I have built a simple Flash application that will be presented using a projector, the application will show messages in the form of questions that will come from a simple flat-file text file or XML file.

In addition to this I would also like to be able to add my own messages using a simple HTML form.

I've been looking around the web for some resources, but have been struggling to find what I am looking for. The basic idea is that the flash application will loop through these different messages from the XML, but then when a user types in a message that will also appear within these messages. Think of it as a sort of dynamic tag cloud.

View 2 Replies

Flex :: Oracle - Remoteobject Multiple Records In Database Of Same Info?

Feb 11, 2012

Case1: When a client makes a remoteObject request ie to save some Info... A call is made to Java SAVE_INFO method. If request failed ie came back to FaultHandler ( we save the info in an arrayCollection).Later we call SAVE_INFO again for each item in arrayCollection ie( if arrayCollection has 10 items.. We call 10 times the same method.. I know that's kind of stupid but we have no control over java to write a overloading method). Some times we see there are multiple records of same info in DB. I am not sure if this happens when looping over arraycollection and making calls or during normal one time call. We could not find a pattern to reproduce. Java LOG level is at Error level in production. can't set to INFO in production to monitor all calls. We dont know if this multiple times saved record is, the one in arrayCollection or normal one.

Flex3 RemoteObject --> WAS 6.1 , lCDS 3.0, Java1.5 --> Webservice -- > Java (hibernate) --> Oracle 10gCase2: When application is left open and user leaves for the day and submits info the following morning, we see duplicate records in DB of that info.(No arrayCollection here. Simple straight one call)Flex3 RemoteObject --> OC4J Blazeds Java1.5 (JDBC) --> Oracle 10g.Recently one of our Testers testing case 2 application found this pattern and I am starting to think that may be in the case 1 also.. users might be leaving for lunch/break and resubmitted the arrayCollection after coming back. During lunch java might have killed the sessions for the client and after resubmitting 10 at same time.

View 1 Replies







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