ActionScript 1/2 :: Append Onto A Xml Object Dynamically Inserting
Jun 29, 2009I am trying to append onto a xml object dynamically. The format of the XML is as follows
[Code].....
I am trying to append onto a xml object dynamically. The format of the XML is as follows
[Code].....
I 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 RepliesIs 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'm trying to append a live stream to an existing file, but I cant figure out how to open the existing file and then append the live stream. This is server side as well.I know I need to open the existing file using stream = stream.get("file"). but I don't understand how to associate stream with the live stream coming in.
View 8 RepliesUsing Flash Pro CS4/Windows Vista: I have a table layout which breaks apart in Firefox leaving gaps between cells after inserting a SWF file.
I have inserted the file using the Insert>Media>SWF command in Dreamweaver and uploaded the SCRIPTS folder.
When I remove the SWF object, the file displays perfectly (with an empty cell where the SWF object should appear) The SWFobject is 2 pixels narrower than the containing cell (cell: 227w X 146h; SWF 225w X 146h)[URL]..
whenever i insert an object to this datagrid it show this error
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Forms::LessonPlan/addLesson_clickHandler()
this is my code
for inserting an object
var obj:Object = new Object();
var temp:Object = new Object();
obj.activityid = arrayNames.selectedItem.activityid;
[code]....
I'm trying to dynamically addChild a Sprite to an already tweened MovieClip (tweened on the Flash timeline).
Let's say ObjectA is the tweened object, I published it in my swc and linked it to my Actionscript project in Flash Builder. I make an instance of ObjectA in my class, and then try to do the following:
var objectA:ObjectA = new ObjectA();
var objectB:ObjectB = new ObjectB();
objectA.addChild(objectB);
addChild(objectA);
Now, the problem is, objectB doesn't tween along with objectA. Is there any logical solution to this?
How to dynamically add attributes to an object and convert that object into xml in Flex/Actionscript?
View 1 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].....
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 RepliesXML append Child 's equivalent method?
View 2 RepliesI 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].....
I'm looking to simply append the following text to an existing spark.components.TextArea's text flow:
<b>something</b>: hello world
I have attempted to do this using the following code, but nothing happens:
this.textarea.textFlow.addChild(TextConverter.importToFlow(
"<b>something</b>: hello world",
TextConverter.TEXT_FIELD_HTML_FORMAT));
How can I accomplish this? I know in the old mx.controls.TextArea component, I could simply do:
this.textarea.htmlText += "<b>something</b>: hello world";
How can I do this with the new TLF/FTE API expressed in the spark.components.TextArea component?
How would I go about appending (not just changing the entire text area to this img, actually appending) a simple 25x25 image sprite into a text area in a flex project? using actionscript? (not mxml)
(it has to be a spark text area component, mostly because this is a flex mobile project and thats all thats optimized for mobile)
edit: I guess I should have said this, i know html text is the way to go about it. But my real confusion lies with first it being a Sprite, so i dont have a url to link to. It's an actual sprite var (it would be a file sent over the network in bytes, and saved in a sprite object.) and then the second part where im lost is APPENDING it to the text inline, so it doesnt replace any of the text already in the text area, and will be scrollable in the text area.
also, remember im trying to append this to a SPARK TEXT AREA component. I know i could just make a text field instance and thats it, but i cant find any information about appending this to a text area
EDIT AGAIN:
SInce there was some confusion about the sprite im trying to append, this is how the image is being transmitted,
it's starting out as just a standard cameraphone image, then..
var fs:FileStream = new FileStream();
fs.open(new File(imageURL), FileMode.READ);
var bytes:ByteArray = new ByteArray();
[Code]....
So then finally I have the image in imageSprite... and that brings us to my main problem appending this image in a TEXT AERA spark component. With an end result that will have the look of a picture message sent on an android or iphone.
I'm completely confused by this. An Adobe Flex WindowedApplication has a 'menu' property, which by default is assigned a FlexNativeMenu instance, which is used to create a native menu tree for the application.For example, on OS X, if I create a WindowedApplication, I get the standard 'application menu', 'File', 'Edit' and 'Window' menus created on startup. The question is, how do I append additional menus to this without creating an entirely new menu? I want to use the default OS X menus as a starting point and add my own. If I assign menu = new FlexNativeMenu; I just get a completely empty application bar with no menus at all.
View 1 RepliesIs there a spark TextArea decleration in actionscript3 file since private var ta:TextArea is a mx component?
View 1 RepliesI am trying to convert a bytearray into a string. The problem is whenever I try to append a NULL character using String.fromCharCode(0) it cuts off the end of the string and than I cant run it throw base64. I tried using String.fromCharCode(32) (space) instead but no luck.
View 1 RepliesI'm using Flash CS3 Actionscript 2. I'm loading an external file (it used to be an XML file but now it is an aspx file). Anyway, my actionscript for loading the file looks like this:
xmlFile = "flash/info.aspx?id=1"
Which works great with the aspx file I've created. But I need the "id=1" to append a dynamic number instead of the "1".
I have loaded content into an array and have displayed that data in a dynamic text field. What I need to do now is take that same array data and append it to a gotoAndPlay command.
example:
var myArray:Array = new Array(); // lets pretend a button has been clicked and loaded (event.target.name) into the array
//I can then display the contents of the array in a text box
myTextBox.text = myArray[0]; //this works well
but I need to also do this
myMovieClip.myArray[0].gotoAndPlay("start"); in which will actually end up being myMovieClip.home.gotoAndPlay("start")
How do I write this the correct way
----actual code-----
var myMenuArray = [home, about]; //1 button duplicated with instance names to reflectfor each (var btn in myMenuArray)[code]....