Actionscript 3 :: How To Update Children

Aug 15, 2010

For starters let me just say that I am very new to action script and also that I'm not using adobe creative suite, I am using notepad with flex as a compiler. I have two classes, a main class and a class called OBJECT_square.

Here is the MAIN class:

package
{
import flash.display.*; import mx.core.*;
import flash.events.*; import mx.collections.*;
import flash.geom.*; import mx.controls.*;

[code]...

Now my problem is this. Simply put I would like the square that OBJECT_square draws to move right when I press the right arrow key. Right now I can only get it to be drawn once (though I am actually creating two separate squares in two different spots). Now the thing I need to know is if I have used the keyboard event correctly in OBJECT_square. I used keyboard event in the main class as well to display the last key I pressed but I'm not sure how to use it in a class other than the main one. Also I'm not sure how to 'update' the square so that it is redrawn when it moves, that is remove its old self from the display list and reinsert its new self. The whole kinda point to the code is that the square be 'self-sufficient', ie contains all the code needed to draw it and move it rather than relying on any other class. I basically want it so that once another class has made a square the square is capable of doing everything else on its own.

View 1 Replies


Similar Posts:


Flex :: Changing ScaleX/scaleY On Parent Scales The Children But Doesn't Update Height/width Property?

Nov 23, 2010

I have created a custom component - MyImage - that has two children including a Bitmap as well as a Sprite.My display object hierarchy is as follows -

mx:Canvas
view:MyImage
mx:Bitmap

[code].....

View 1 Replies

ActionScript 3.0 :: Xml.children() Returns Grand-children And Gr8-gran-children?

Nov 18, 2009

I'm making a OSX-finder-type file browser in CS4.The Structure for the folder and files is being generated by a PHP in a XML, heres an example:(sorry the xml is not sorted, but the command i'm using in php doesn't sort it)

Code:
<root>
<dir name="images">

[code]....

View 2 Replies

Flash :: Professional - Update Via SCUP - The Client Is Not Supposed To Be Interfered With The Update Progress

Nov 17, 2011

I am deploying Updates via SCUP and SCCM to hundreds of Computers. Fortunately Adobe provides an SCCM Update Catalog for both Adobe Flash ActiveX and Adobe Flash Plugin. But now my Problem: After publishing the Update via SCCM, the client is not supposed to be interfered with the Update Progress (which is working) I figured the Updater works like this: First SCCM checks if a Update needs to be deployed, if this is the case, The Flash Updater begins. First the old Flash Version is beeing uninstalled. But now: if the Client has a Browser Window (IE, or Firefox) open, the Updater is not able to install the new Flash Version and quits with an Error. This leaves the Client PC without any Flash (because its being uninstalled before) How can I prevent Flash being uninstalled due to the Update progress not working while a Browser window is open?

View 1 Replies

Actionscript 3 :: Movieclip Using A Timer To Update Dynamic Text. No Update?

Dec 12, 2011

I've got a movieclip, which has got a dynamic text element.The movieclip uses a package for its codeThe package if obviously derived from the MovieClip classI've got a timer, that updates the dynamic text field every second.When debugging the code, I see that the timer works well. Its updates the value of the dynamic text field.

View 2 Replies

ActionScript 3.0 :: Multiple Children Spawned With Timer Makes Old Children Inactive?

Mar 24, 2009

In this game attached I need the old Children (rats) to hurt the character when he walks into them, however only the most recently added Child is active in that way... also the rats seem to appear above the character instead of below, is there any way to resolve these issues??

View 4 Replies

ActionScript 3.0 :: [CS4] Children Inside Children - 1119: Access Of Possibly Undefined Property NumChildren

Jan 12, 2011

I have a Sprite called pageContent. Inside pageContent are 12 more Sprites with unique names, a couple of Buttons, and some TextFields. Inside each of the 12 Sprites I have either one or two TextFields and one TextInput. My question is, since they are children inside a child of pageContent, how can I access them? Here is how I am trying to do it:

[Code]...

In my mind, this should totally work. But surprise, surprise, it doesn't. I have debugged it and it works fine for the first two lines, but when it tries to get numChildren of a Child of pageContent (line 3), I get this error: PHP Code: 1119: Access of possibly undefined property numChildren through a reference with static type flash.display:DisplayObject.

View 4 Replies

ActionScript 2.0 :: RollOver & RollOut In Children's Children's Movieclip?

Jan 11, 2010

I want to have a rollover effect of a movieclip (mo1) inside a movieclip (mo) of another movieclip (popup1).Is it possible to do that? I try calling it using this code in the frame 1 of my flash, am i doing wrongly?

Code:
popup1.mo.mo1.onRollOver = function() {
popup1.mo.mo1.gotoAndStop(2);

[code]......

View 9 Replies

Data Integration :: Pulling In Children Of Children In XML

Sep 23, 2006

Newbie to XML here and I have what I *hope* is an easy problem, but I just don't know the answer. And as I have to try and show this by Monday, I'm sort of stuck. I am trying to pull in information about houses via an xml file. Each house has 1 address, 1 owner, 1 description, and about 6 photos. I have no problem accessing the address, owner, etc, and I can always access the first photo, but whenever I cycle through the photos, I seem to cycle through the first photo for every house, not every photo for each house.

Basically, I need the children <images> to go up by one, without the the parent going up by 1. I am hoping I am describing this well. My code looks like this:

[Code]...

View 4 Replies

Flex - Access Children Of Children Recursively?

Mar 10, 2010

I have a Canvas which has many components inside it and those again, have many components inside them.

getChildren() returns only the top level children. What is the best way to retrieve all the children (children of children of children and so on).

Well, I sorta know how to do this by iterating through the children, but the code is really messy. I'd prefer to use a nice recursive function. Has anyone written this before? Or is there a Util class to do this?

View 3 Replies

Data Integration :: Pulling In Children Of Children In XML?

Jul 24, 2010

I am trying to pull in information about houses via an xmlfile. Each house has 1 address, 1 owner, 1 description, and about 6photos. I have no problem accessing the address, owner, etc, and Ican always access the first photo, but whenever I cycle through thephotos, I seem to cycle through the first photo for every house,not every photo for each house.Basically, I need the children <images> to go up byone, without the the parent going up by 1. I am hoping I amdescribing this well.My code looks like this:

total = xmlNode.childNodes.length;
totalb =
xmlNode.childNodes[0].childNodes[5].childNodes.length;

[code].....

View 1 Replies

Actionscript :: Add Children To Accordion Children In Flex 4?

Oct 28, 2011

I have an ArrayCollection that is read to generate containers in an accordion programmatically:

<s:ArrayCollection id="_ac_ps">
<fx:Object label="Block and lot" data="_blocklot" searchType="districtblocklot"
info="" />

[code].......

View 1 Replies

ActionScript 3.0 :: Accessing Children Of Children

Jan 11, 2011

for some reason STORAGE[0].getChildAt(0) works whereas liner.getChildAt(0).getChildAt(0) does not. STORAGE is a movieclip and a child of liner. the error is something about not being able to use getChildAt on a display object. what's wrong? is there any other approach i could use? PS: liner.getChildAt(0) works and does indeed seem to refer to STORAGE[0]

View 2 Replies

Can't Update To 11.0.1

Jul 1, 2010

I recently download the Flash CS5 Update 11.0.1 and start the AdobePatchInstaler.exe, the percentage bar and label just dont reach 100%, stay on 0% an then the updater just say that flash is updated so now, I open flash, go to Help > About ... and still saying version 11.0.0.485. I tryed the Adobe Updater and do not show up that update.

View 11 Replies

Way To Update A Slideshow

Mar 16, 2010

Anyone know of a way to update this slideshow? [url]...

I want to make it cycle through new images.

View 6 Replies

Lost .fla And Need To Update .swf?

Jun 5, 2011

I created a FLASH header for a website. My client wants me to remove a small line of text from it, but I no longer have the original .fla file. The text is over a simple gradient background, and I could probably just cover the text with a color rectangle.

View 5 Replies

ActionScript 3.0 :: Update A SQL DB With It?

Feb 10, 2009

Can I have Flash run Actionscript that will update a SQL DB?

If not, can I get Actionscript to trigger a ColdFusion page that will update the DB?

If not, can I pass a session variable out of Flash and to a CF page?

View 5 Replies

CS4 :: Crashes After Update On Win XP

Aug 5, 2009

I just updated CS4 with the latest patches and it started to crash when I try to publish one of my flashfiles.

The file uses actionscript 2 and worked just fine before the upgrade.

View 4 Replies

How To Update Image Via URL SWF

Aug 9, 2009

I want to make a sort of slideshow of the players in my game (In game when you change clothes/weapons the image auto updates to show your current character) How would I insert images into CS4 and when the image updates for it to update in CS4? PS. This is when the project is exported and uploaded to my website. Example image that auto updates: [URL] = [URL]. Where CharacterName is that's where I put each individual character I want to add in...

View 3 Replies

Flash :: Can't Update It On My Mac

Apr 21, 2011

I can't update flash player on my mac os x 10.4. As a result, I can't watch youtube videos because youtube is using the new flash plugin.

View 5 Replies

CS3 Imported Image Update?

Jul 27, 2009

Is there a way to have imported images automatically update if the original file is changed?

View 1 Replies

Flash Banner Will Not Update?

Dec 30, 2009

We are moving to a new platform and will have a flash banner on the home page that will be changing frequently with new promos, etc. You can find the flash banner at http:[url].....I need to be able to update the swf file and have it immediately reflect on this new home page, but it only seems to be updating on the non-secure URL in Firefox and not at all in IE.

View 3 Replies

ActionScript 2.0 :: Update MP3 Player Bar?

Jan 19, 2011

I am trying to update the player bar as the mp3 plays.The bar should represent the length of the song and update to show how much of the song has played so far.

View 1 Replies

Professional :: Get An Update Which Will Allow It To Create?

Jun 8, 2010

Will flash CS5 get an update which will allow it to create .APK files for the android platform, like it was supposed to be able to do for iPhone?(before apple denied that kind ofdevelopment)
 
That would be a dream come true and would be a really good reason to upgrade to a CS5 license after the trialperiod is over.

View 4 Replies

ActionScript 1/2 :: Update Two At The Same Time?

Aug 15, 2010

How can I update two mysql databases (on two servers) at the same time. DO I need to give permission to send data? E.g. The swf is in server A and I want to post data to 2 databases in server A and server B. But when I do it only updates in server A. Nothing goes to server B. How can I do this? Is this got to do with php?
 
<?php
//SERVER A
$link = mysql_connect("localhost","abc","abc1");
mysql_select_db("my_db1"); 
$query = "INSERT INTO abc_db(subject, links) VALUES('$hsubjects','$link')";
$result = mysql_query($query);

[Code]...

View 7 Replies

Login Fails After Update

Oct 1, 2010

Just updated from FMS 3.5.2 to 3.5.4. After this I'm not able to login onto the server.I've tired to check the fms.ini file without any luck. I've tried to login using both localhost and domain/url. I've tried to use a backup of the conf-folder but all responses from the installation is: "login attemt to the server below failed".It worked PERFECT before the update. There has been no changes in firewall etc. during updateinstallation.

View 7 Replies

Professional :: How To Update NPSWF32.dll

Nov 7, 2010

As I understand the file c:WINDOWSsystem32MacromedFlashNPSWF32.dll is part of the Flash?When updating flash I expect this file to be updated as well as the Flash10*.ocx file? (my current version is that latest Flash10l.ocx)For some reason this is not happening.Question: How can I update my NPSWF32.dll file to the newest version? (My current version is 10.1.85.3 which is reported bto be insecure)

View 2 Replies

How To Update A MySql DB Using Flex

Aug 10, 2009

i've done some simple apps to get the felling of it, nothing involving updating a file or a database.I wanted help, how to do a query to a MySql DB from a Flex application (thats gonna be running in a web server).I didn't saw any duplicated questions, sorry if any exists, just point me to it.

View 5 Replies

Flash :: Update SIFR To AS3?

Jan 10, 2010

In my experience, the text rendering is better in flash 9/10 AS3. Are there any plans to get sIFR working with AS3?

View 2 Replies

Flash :: XML Value Update From Actionscript?

Mar 7, 2011

var ldr:URLLoader = new URLLoader();
ldr.addEventListener(Event.COMPLETE, onLoaad);
ldr.load(new URLRequest("oman.xml"));//or any script that returns xml[code]......

But no update is happening here.. is there any alternative methods to it?

View 2 Replies







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