ActionScript 3.0 :: XML Append Child 's Equivalent Method?
Mar 14, 2009XML append Child 's equivalent method?
View 2 RepliesXML append Child 's equivalent method?
View 2 RepliesI recently had to tell a client that I didn't want to work on their project because I was unclear about something. When you append a recording from a stream does the metadata get updated correctly after the append? I've worked with metadata before and from my recolection anytime a .flv was changed I had to manually update the metadata.
View 1 RepliesI use the HTTPService() method to post a variable value to a SQL Server database. The suggestion came from someone with some past experience in Flash but nothing specifically related to posting variables to a database.
This person sent me the following code snippet that he found in a Flex forum (and changed a bit), with a suggestion that maybe it will work with a bit of massaging.
PHP Code:
private function start():void {
service = new HTTPService();
service.url = "http://webServer.aspx";
[code]....
My biggest problem is that I'm using Flash instead of Flex. What is the Flash (non-Flex) equivalent of HTTPService() method in the following code snippet?
I have a class Dialogs it has a method Open.Now I have an Instruction subclass of Dialogs. I want it to do something special when the method Open is called. Is there a way to "append" the open method in the Instruction sublass?
View 1 RepliesI'm trying to make a small card simulation that creates a pile of cards, and when I click on the deck it flips the top card over and moves it to another pile. Clicking on the other pile flips it back. I'm using Flash CS3 so can't use Flash 10's 3D abilities. So far, I'v created a Card class (extending sprite) which draws 2 rectangles (for the front and back faces), and contains a public method flipTo(). which when called starts a tween which moves the card and flips it (by adjusting it's scaleX value to negative, and when scaleX = 0 toggling the visibility of the card's faces).
This works fine, and so I have a for loop that creates 10 instances of the Card class on top of each other (and within a sprite container called rightPile), giving me my pile. I've attached an event listener to the pile, so when I click it, it performs the onRightClicked function, which calls the top card's flipTo() method. So when I click on the pile, the top card flips. However, when I click again, the same card flips again, and I can't figure out how to make the next card flip. I've tried keeping track of the index of the current card, and using rightPile.getChildAt(currentCard).flipTo(), but I get the following error...
[Code]...
ActionScript Code:
if (pMenu.AccSel.iconSel.child != undefined) {
pMenu.AccSel.iconSel.removeChildAt(0)
}
i was trying to do a child removal method that would work on command instead of me trying to find a child to remove each time in the code... it would find and remove it wisely... however, i've tried this method and it doesn't work... and i was wondering if there was another way for actionscript to check for Children and if there are any it'll remove it...
I'm looking for a way to call a method for ALL children elements of a DataGroup from the DataGroup. The problem is that when using the creationComplete event to call a method of a child that method is only called once for every itemrenderer (child) object. after the item was drawn once. now i want the children component to call a function everytime the datagroup containing it changes its data. Using "updateComplete" or "dataChange" inside the children (itemrenderer) component would work, BUT "updateComplete" and "dataChange" is called everytime i change the view (e.g. scroll my list) - thats not what i want.
[Code]...
I loaded external swf named child.swf from parent.swf. i am having a function called parentFunction() in parent.swf. I want to call parentFunction() from child swf.
View 2 RepliesI just began learning AS3. I'm simply trying to play an FLV video. How do you attach the video object to the main stage? I tried but it said that "stage" was undefined.
PHP Code:
package {
import flash.media.*;
[code].....
i am new to AS 3.0. I am preparing the game, which will initially display login page, after username validation. It enters into the game. I have prepared login page and a game in a separate file. To load all these files, I have main file which loads the login page and game file. When the preloaded completes, ill show the login page. Using application domain Ill access the login button. When I press the login button, ill send the entered user name and password to the server for validation. Based on the response will allow the user to enter. Now my problem is, I want to show game screen based on the username validation response. I am not sure how to do this.
View 1 RepliesI am new to AS 3.0. Please clear my doubts. I am preparing the game, which will initially display login page. After username validation, it enters into the game.
I have 2 separate pages for login and a game. To load all these files, I have main file which loads the login page and game file. When the preloaded completes, the login page opens. Using application domain, I will access the login button.
When the login button is pressed, the user name and password entered will be sent to the server for validation. If authenticated, the user enters the game. Now the problem is, I want to show game screen based on the username validation response. I am not sure how to do this.
public var blob:Blob = new Blob()
addChild.child(blob)
i get this error Call to a possibly undefined method child through a reference with static type Function.
My issue today is a DisplayObject error I'm getting when remove a child object. I have code that will launch(addChild) a video container and video controls as well as add a close button. Now the close button works fine and everything, removing the video and controls and I'm able to choose another video again, but when you click close a 2nd time I get this error: ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
at flash.display::DisplayObjectContainer/removeChild() So I've narrowed down the problem to where I remove the videoContainer (which holds the video object) My code to play the videos:
[Code]....
I have a picture on the stage that has multiple items that have hotspots/links over them that should open a child swf on top of the background and show details about the items. then have a button in the child swf itself that removes the child from over the background so the user can click on another item etc.I found this code in someone's post and I am trying to modify it so that works for multiple swf files...it currently works for a single swf.I wan to pass the name of the button in front of the .swf in the URLRequest to have the same name as the instance name of the referring button. But I can't figure it out. Here is the code I am using on the stage
View 2 RepliesI'm using a for loop to creat a bunch of identical movie clips I want to attach a different sound to each one of these clips. Is there a way to append a variable onto the end of another variable name. (ie. where i = [0,1,2,3,4,etc] variable[i] = variable0, variable1,variable2,variable3,variable4,etc.) below is the part of the code that I am trying to get working:
for (var i:Number = 0; i < xmlData.object_count; i++){
//create movie clips
var boxContainer_mc:boxContainer = new boxContainer();
[code]....
I'm writing an XML preferences file for an Adobe AIR project, and I'd really like to include XML comments. How does one append a comment to XML? The following doesn't work (the file just ends up with a blank line where the comment should be):
ActionScript Code:
var prefs:XML = new XML();
prefs.ignoreComments = false;
[code]....
What I would like to do is simply add to a dataProvider, but when I do, I get an error. Here's the code I'm trying to run...
dg.dataProvider.addItem(obj.ResultSet.Result[i]);
It's inside a for loop, using i as the integer. It works great doing...dg.dataProvider = obj.ResultSet.Result But that won't work for me, because I need to add to the dataprovider more than once. I'm getting results in batches of 10, and I need to add each batch to the dataProvider when it's received. I also tried to to do...
var dgDP:dataProvider = new dataProvider(); But for some reason Flex doesn't recognize it...
I need to append 4 letters to my variable name when referencing it to get either spanish or english XML data. I am trying to reuse my functions without writing an if statement.
like so:
//two options for
var spa_my_videos:XMLList;
var eng_my_videos:XMLList;
[Code].....
Is there a way to append an object that has already been created:
CODE:
userobject;
userobject = {uname:username, uage:so.data[username].age}
What if I wanted to add a phone property?
I have a flvplayer assigned to the id player and I am trying to set buffer times for videos I have embedded in an array, I understand how to pull the information from my array and have that value be set intoplayer.setBufferTime(value);but when ever I call that command it gives me the error1061: Call to a possibly undefined method setBufferTime through a reference with static type fl.video:FLVPlayback. player.setBufferTime(1);
View 2 RepliesI am trying to append onto a xml object dynamically. The format of the XML is as follows
[Code].....
I am using adobe dvrcast to record my live streams. the problem I am having is when I stop the encode during a live stream, a new file is not created, the existing stream is written over. How can I preventive this from occuring. Is there a way to have all vod files that are in one folder to roll over to the next file during play back.
View 12 RepliesI am using this method to fix the Active Content issue,[URL]but now I have come across a situation when I have to append the end of the .swf. EG: Active content fix script. It does not use the extension .swf
<script type="text/javascript" >
AC_FL_RunContent(
'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0',
'width', '764',
[code]....
I need to add .swf?<%response.write qs%>" to the images/footer_graphic_1_about, because I am passing a variable through the .swf.
Eg: images/footer_graphic_1_about.swf?intro=no
Due to the target website restriction, it only accepts swf file, and I want to pass parameter to this, So I post http:[url]............pass the file parameter this way, and This worked before, But now it doesn't, Where do I do wrong?
View 1 RepliesI need to append MIDI files: leave header (same for all files) and other meta information, just copy music/score part. I already have MIDI files in appropriate bytearrays, as I guessed I need to use writeBytes, but unfortunately couldn't find which bytes I need to take and copy. Something like this:
var newFileBytes:ByteArray=new ByteArray();
newFileBytes.writeBytes(firstMIDIBytes);
newFileBytes.writeBytes(secondMIDIBytes,8);
Works only partially, file is playable; first part fully and second - only some notes (then player hangs out)
To say truth byteArrays aren't my strong side, as the MIDI file structure.
Load an MP4 as ByteArray and Append it to NetStream?
View 4 RepliesI am using this method to fix the Active Content issue,[URL].. but now I have come across a situation when I have to append the end of the .swf. EG: Active content fix script. It does not use the extension .swf
<script type="text/javascript" >
AC_FL_RunContent(
'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0',
'width', '764',
'height', '141',
[Code]...
I have an XMLList:
Code:
var contentList:XMLList = loadedXML.someNode.elements(nodeFromNavElement);
Where "nodeFromNavElement" is a var being passed from a movie clip the user clicks on. That all works fine. The user is now in a particular section of the Flash app, and the content being pulled from the XML corresponds to the section. If the user clicks another movie clip (or navigation element, the content needs to update.
I need to get another node within the current node, like this:
Code:
var contentList:XMLList = loadedXML.someNode.elements(nodeFromNavElement).elements(nextNodeFromNavElement);
But I'm trying to append to the XMLList... something like:
Code:
var contentList:XMLList = loadedXML.someNode.elements(nodeFromNavElement) + .elements(nextNodeFromNavElement);
Which obviously doesn't (and shouldn't) work.
I am a newbie in flash and action script. I have a AS2 code which fetches the images and their URLs from a XML file and shows all of those images.I need to append my own images in those images however from the script itself therefore from Flash. I don't want to add that image in the XML.
View 5 RepliesWhat I'm trying to do is have a website where there are menu buttons on the sides and when you Mouse Over any of the buttons, the picture in the middle changes. Ideally I'd like to set it up so that the image in the center stays until the next button is touched and then it is removed and replaced with another button. Now I could manage this inside the timeline, but it would take a very long time so I'm trying to figure out how to do this with AS3.This first bit of code I used was as follows:
Code:
home_btn.addEventListener(MouseEvent.MOUSE_OVER,HomeShow);
home_btn.addEventListener(MouseEvent.MOUSE_OUT,HomeHide);
[code].....