Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




AS3 - XML - Merging Attributes



I know this should be an easy thing to do but my brain has gone to sleep.

How would I take the attributes from one XML node and add them to another XML node?

Basically I need to take these...


ActionScript 3.0 Code:
var fooA:XML = <fooA apple="green" banana="yellow"/>;var fooB:XML = <fooB cherry="red"/>;
...and plop the attributes from fooB onto fooA so I end up with this...


ActionScript 3.0 Code:
<fooA apple="green" banana="yellow" cherry="red"/>



Ultrashock Forums > Flash > ActionScript
Posted on: 2008-05-27


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Merging ?
Hey everyone,
I am making a flash intro/movie and I have two flash files I want to put them together or Merge them in other words, so its one big movie. Anybody know how to do this or Thanks help would be much appreciated.

Merging
let say i have 2 fla

i want to put them all together, so when i play it, both will load at the same.

i tried import and it says unexpected error... any help would be appreciated

Merging Fla's Together
Hello everybody,

I just signed in. I have a question for you. I'm putting together some flash files I separately made some time ago. Each consisted of one scene, and was made as an independent unit, but now I have the need to jump from one to another by clicking buttons, etc.
I thought each of them could become a scene of a bigger file, but I couldn't find a way. I mean, there are tools to duplicate scenes, delete them, but I couldn't find any to export scenes.
Any clues?
Thank you.

benix

Merging Fla's Together
Hello everybody,

I just signed in. I have a question for you. I'm putting together some flash files I separately made some time ago. Each consisted of one scene, and was made as an independent unit, but now I have the need to jump from one to another by clicking buttons, etc.
I thought each of them could become a scene of a bigger file, but I couldn't find a way. I mean, there are tools to duplicate scenes, delete them, but I couldn't find any to export scenes.
Any clues?
Thank you.

benix

Merging?
I'm doing a project on flash and I have made it in parts, is there a way for me to merge the parts into one piece?

Merging Layers
I have 2 layers, consisting of 20 frames each.

Can anyone help me with how to merge these 2 layers?

i.e. So the contents of "frame 1", "layer 1" are on the contents of "frame 1", "layer 2".

Thanks..

Merging 2 TellTargets
Can this be done? I am playing 2 small mcs on Press the mcs open. On Release they close. BUT when clicked quickly only the first closes. I assume the computer doesn't have enough time to process the code...but I could be wrong. I am looking for a way to merge 2 TellTargets. They are the same length and have the same frame labels. OR is there a better way to do this to force flash to run ALL of the code.

Thanks,
Rob5150

Merging .fla Files
I am not sure if it is even possible but I have three seperate .fla files that I have created for one site. One is a picture page, another is a splash screen (or loading screen) and the other is the the main site. Is it possible to merge the three together?

Merging Movies
Dear all, is there a way of merging two seperate movies... which you had created in order to make a website modular... without rebuilding all those pages into a new movie?

Thanks,

K

Merging Movies?
Dear all, is there a way of merging two seperate movies... which you had created in order to make a website modular... without rebuilding all those pages into a new movie?

Thanks,

K
ps I'm using flash 5

Merging Scenes?
Hi,

I am told that to stream a song, rather than a loop, with an animation, you should only have 1 scene rather than several.

Is there an easy way to merge all my scenes together onto 1 timeline in the correct order?! Is this even possible?! What if you are dealing with some scenes that have movie clips and other scenes that are regularly framed straight out?

Thanks,

frustrated

Merging Scenes
Ummm, let me start , i made my flash animation but it is in two different fla files who do i bring it in to one with sound , exporting and import destroys it and not replacing the symbols (it gets messed up) please help i spent 2 week on this animation

Merging Two Fla Problem
Please help me!

I'm trying to put in a 1-frame fla containing a 3d engine a menu that needs frame cycling to function!

How can I get it?

actually If I include new frames in the 3dengine fla it stops working (o reset continuosly the scene, obviously), whilst the menu freezes if I put it in the 1-frame 3dengine fla, because it needs his timeline to cycle.

I'm going to try putting all the menu into a movieclip apart.

Waiting for replies, then.


p.s.: actually HOW does the #initclip influences the movie behaviour? I think there's something dependent on this in my problem...

Merging Scenes
I started my flash movie in one scene (where my sound loop lives) and continued part 2 it in another scene (no sound in part 2). How can I add scene 2 to scene 1? Is it as simple as copying and pasting? or does someone have a better idea? ( I will just move the start sound frame to the first frame of the entire movie).

Merging 2 Fla Files
let say i have 2 fla

i want to put them all together, so when i play it, both will load at the same.

i tried import and it says unexpected error... any help would be appreciated

Merging 2 Files
let say i have 2 fla

i want to put them all together, so when i play it, both will load at the same.

i tried import and it says unexpected error... any help would be appreciated

Merging Files.
as in another thread i made i have made a menu system in one .fla file. and the rest of my site is in another .fla file...the menu is a floating element.

how do i merge the two files...?

the problem is the menu system needs to be placed onto the full site. however in a moment of stupidty i didnt actually make the menu a movieclip its just a series of timeline events.

thanks in advanced.

Merging Layers
im might sound like a huge newbie. Is there anyway to merge layers in flash?

thnx in advance

Merging Layers
Is there anyway to merge layers like you can in Adobe?

Merging Functions
Hi all
i'm using mx2004. With an imported .txt file that has links to load an image into my main movie. It's done using the following function in my main flash movie:

function loader(whichFile) {
_root.image.loadMovie(whichFile);
}

this calls an external image into empty clip called 'image'. the following code creates the text link in the external .txt:

<font color="#0066FF" size="14"><a href="asfunction:_level0.loader,gallery1.jpg">IMAG E 1</a></font>

when you click the link IMAGE 1 it calls gallery.jpg into my 'image' mc. THIS WORKS!

now my problem is i want to load another separate image into a separate empty mc called 'enlarge'. i used my own logic to create this new function on the main timeline:

function loader2(whichFile) {
_root.enlarge.loadMovie(whichFile);
}

But how do i MERGE the href part to use the SAME TEXT LINK,(its just a syntax thing i cant get correct)?

<a href="asfunction:_level0.loader2,gallery1.swf">

cheers
Rat

Merging Two Documents
Hi guys,

I’m quite new to Flash, and would like some help in merging together two documents. I’ve searched the forums, but can’t quite seem to find anything specific to what I need.

I’ve take the Flash documents from a template used for DotNetNuke, which I cannot make display the document when it relies on another. Let me explain… When the swf runs, the background picture is stored in another file, which it calls on. However, when I run it in DotNetNuke, the second swf cannot be found. The easiest way to overcome this problem is to put all the information in one file. However, I am now having a great deal of difficulty with this.

This will sound stupid, but I can’t seem to find a lot of the information that is obviously in the Flash file. There are translucent white bars which loop over the background image, but I can’t for the life of me find where these are animated. What my question is, is whether there is anyone out there who would be willing to spend 5 or 10 minutes putting these documents into one for me. I would be extremely grateful.

If you are able to help me, please e-mail me at dinky_dwinky@hotmail.com (excuse the e-mail address!) and I can pass on the two files to you. I would be very, very grateful. I’m sure there is a simple way to do it, but the scripts look very complicated and I simply cannot understand them!

Thank you,

Pete

Merging 2 .fla Files Into 1
I've created 2 different .fla files. However, I would like to merge the 2 files together to become 1 file with 2 different scenes. Is it possible to do so?

[F8] Help With Merging 2 AS Scripts Please
Thank you in advance if you can help me. Basically I have 2 scripts but I want to combine them into one and don't know if its possible or even how.

A.) I have a preloader with an intro and outro animation tween in it from here:
http://www.kirupa.com/developer/acti..._preloader.htm
that works great and uses this code:

On the timeline:

loaded_bytes = Math.round(_root.getBytesLoaded());
loaded_total = Math.round(_root.getBytesTotal());
total_percent = (loaded_bytes/loaded_total)*100;
_root.loaded_text = Math.round(total_percent);
startpoint = bar._x
_root.text._x = startpoint + (_root.bar._currentframe*2.5);

On the movieclip:

onClipEvent (enterFrame) {
gotoAndStop(int(_parent.getBytesLoaded()*100/_parent.getBytesTotal()));
}

B.) I also found a step preloader here:
http://www.ffiles.com/view_listing.php?sid=208&cat=75

I like this one but cannot get it to work with an intro and outro animation.

This second preloader uses this code on the movieclip only:

onClipEvent (enterFrame) {
t = _root.getBytesTotal();
c = _root.getBytesLoaded();
d = Math.round((c/t)*100);
if (d>=10 && d<=19) {
anim1.gotoAndPlay(2);
}
if (d>=20 && d<=29) {
anim2.gotoAndPlay(2);
}
if (d>=30 && d<= 39) {
anim3.gotoAndPlay(2);
}
if (d>=40 && d<= 49) {
anim4.gotoAndPlay(2);
}
if (d>=50 && d<= 59) {
anim5.gotoAndPlay(2);
}
}

Effectively Preloader B’s code controls 5 moviclips inside it that animate one at a time until everything is loaded. I want to have the same 5 movieclips (anim1 – anim5) used in Preloader A

I guess I would need to write something like this for example:

If total bytes loaded is equal to 40 through 49 then play anim4, but somehow use this in Preloader A's code.

My actionscripting skills are basic so I need help. If anyone has any ideas that can lead me in the right direction then I would greatly appreciate it.

Merging Problem
I am making a map for a game of mine and I need to merge some bitmaps together.
The problem is that some of the bitmaps aren't sqare and have alpha on them and for some reason they don't mix that well.
If for example I have a map hexagon with a river runnung north ans south-east (helpful picture):
...___
../..|..
/....|....
......../
..\___/

I would attach the background to depth 1 and then merge the river parts into one bitmap and then attach it to depth 2, but I can't get the mer(d/g)e function to work properly.

[CS3] Merging To Fla Files
hi all in this rar file

http://3afooor.com/flash.rar


there is two FLA files one is for image pan with mouse wheel zooming effect and the second one for drawing

how can i merge them together so that i can paint on the map in the first FLA files

i just load the paint movie over the map if u click ( shift+p) u will see the paint file but try to paint u will c the problem that the draw is not fixed with the map

so any help plz ?

[CS3] Merging Two .fla Files Together
I am creating a portfolio in flash and a part of my project is to produce an xml gallery. I have founda tutorial online and started to copy it and got it to work. but it is in a seperate .fla file than my main project.

I have attempted to copy and paste each object across and the objects in the library but whilst it works on the seperate .fla file it comes up with many errors when i copy and paste it across.

is there any way of merging them together?

Thanks

Merging 2 Arrays ?
I want to cut a array at a certain point and put the left half + add new item + right half into a NEW array...how can i do this ?

cause i`m REALLY struggeling to write an algorithm...
but i think there is an easier way using splice maybe ? but i have NO CLUE !!

HELP ME !!!

Help With Merging 2 AS Scripts
Thank you in advance if you can help me. Basically I have 2 scripts but I want to combine them into one and don't know if its possible or even how.

A.) I have a preloader with an intro and outro animation tween in it from here:
http://www.kirupa.com/developer/acti..._preloader.htm
that works great and uses this code:

On the timeline:

loaded_bytes = Math.round(_root.getBytesLoaded());
loaded_total = Math.round(_root.getBytesTotal());
total_percent = (loaded_bytes/loaded_total)*100;
_root.loaded_text = Math.round(total_percent);
startpoint = bar._x
_root.text._x = startpoint + (_root.bar._currentframe*2.5);

On the movieclip:

onClipEvent (enterFrame) {
gotoAndStop(int(_parent.getBytesLoaded()*100/_parent.getBytesTotal()));
}

B.) I also found a step preloader here:
http://www.ffiles.com/view_listing.php?sid=208&cat=75

I like this one but cannot get it to work with an intro and outro animation.

This second preloader uses this code on the movieclip only:

onClipEvent (enterFrame) {
t = _root.getBytesTotal();
c = _root.getBytesLoaded();
d = Math.round((c/t)*100);
if (d>=10 && d<=19) {
anim1.gotoAndPlay(2);
}
if (d>=20 && d<=29) {
anim2.gotoAndPlay(2);
}
if (d>=30 && d<= 39) {
anim3.gotoAndPlay(2);
}
if (d>=40 && d<= 49) {
anim4.gotoAndPlay(2);
}
if (d>=50 && d<= 59) {
anim5.gotoAndPlay(2);
}
}

Effectively Preloader B’s code controls 5 moviclips inside it that animate one at a time until everything is loaded. I want to have the same 5 movieclips (anim1 – anim5) used in Preloader A

I guess I would need to write something like this for example:

If total bytes loaded is equal to 40 through 49 then play anim4, but somehow use this in Preloader A's code.

My actionscripting skills are basic so I need help. If anyone has any ideas that can lead me in the right direction then I would greatly appreciate it.

Merging Two Shapes Together?
I have two shapes that I draw is as3.
I'd like to merge them together.
I didn't come across any methods for that.

Would I have to figure out where the lines intersect and redraw the image?
Am I talking complicated graphics stuff?

Merging Shapes
How do you merge two shapes so that they cannot be separated? Like with the brush tool with default settings, individual strokes become merged and are no longer individual vectors. I want to accomplish the same thing with shapes and lines.

Merging FLA Files
Does any one know how to combine or merge to separate FLASH files.

When I copy and paste they loose all
animations.

Merging 2 Mp3 Files Into One
Hi Guys,

I have just started working with FMS and after spending many hours with tutorials and self education I'm finally getting started on my project.

The project is a (fairly) simple e-education project between a Tutor and Student.

I will no doubt have a few problems over the course of this project, but for now, I'm thinking ahead to a problem I can foresee already.

The tutor and student both have an A/V stream, both are recorded to the server. After the lesson is finished, I will use the 'Total Video Converter' (from this blog post) to convert the audio from both the tutor and student into mp3 files.

What I need to do next is the tricky part. I need to combine / overlay the two mp3 files to create one mp3 that would result in the conversation of the lesson.

Any ideas how I can do that? I'll be working on a Windows Server 2003 machine running IIS.

Sorry for the long post, just wanted to be clear.

Thank you in advance!



























Edited: 12/13/2007 at 01:18:51 AM by BenderB

Merging Layers
i know this is a very question.
but i just don't know how to do it. how in a world do you merge layers in flash? i have seven layers and i want to merge it into only one layer. i tried cuttting the six keyframes and pasted it in the remaining keyframe. but it doesn't worked.

thanks in advanced!!!!

flashroiem

Help With Merging Two .fla Files
Hey Kirupians!
I have this: MAIN

And I have this: CONTENT

How do I get the content to be displayed inside the main page?

I have built seperate .fla files for each button. Since this is my first REAL Flash site, I am having problems with AS.

Any help would be SO very appreciated!
JM

Merging Two .fla Or .swf Files
i have two flash files and would like to integrate the two of them such that one is playing within the other, please detail. thank you.

Merging Scenes
I have a movie with 3 scenes, and the file size is getting up there. I read on some previous threads that scenes boost the file size, so I thought I'd merge them - they always play in order anyway - but I can't see an easy way to do that?

There are layers with the same name in different scenes, so I'm not sure about just copying frames from one scene to another, without LOTS of renaming - is there an easier way?

Merging Blobs
Hi,
I found this effect (Outline Effect) interesting, and tried to replicate it. It is quite simple. However, the tutorial did not include any interaction, and I tried to. Please take a look (attachment).

If you take a look at my coding, its quite miserable. The underlying working remains the same. I've tried to work my way around things for the "dragging" part. Is there any better way to do this? I've increased the frame-rate to 25 so that onEnterFrame is called soon enough to eliminate erratic motion.

Merging Layers
i know this is a very question.
but i just don't know how to do it. how in a world do you merge layers in flash? i have seven layers and i want to merge it into only one layer. i tried cuttting the six keyframes and pasted it in the remaining keyframe. but it doesn't worked.

thanks in advanced!!!!

flashroiem

Help With Merging Two .fla Files
Hey Kirupians!
I have this: MAIN

And I have this: CONTENT

How do I get the content to be displayed inside the main page?

I have built seperate .fla files for each button. Since this is my first REAL Flash site, I am having problems with AS.

Any help would be SO very appreciated!
JM

Merging Two .fla Or .swf Files
i have two flash files and would like to integrate the two of them such that one is playing within the other, please detail. thank you.

Merging Two .swf Movies With Different FPS.
Hi,
I am not very good at action scripts, so any help would greatly appreciated.

I have a banner.swf, runs at 35 fps; and I have a logo.swf runs at 10 fps.
when I try to merge them, the whole movie runs at either 10 or 35 fps...
Is there any way to merge them but keep their original fps?

so far I have tried these:

To an empty new movie(10 fps):
in first frame, I have entered:
loadMovieNum("banner.swf",0);
loadMovieNum("logo.swf",1);
result: both swf's are loaded and positions are perfect, but whole movie running at 35 fps.

in first frame, I have entered:
loadMovieNum("banner.swf",1);
loadMovieNum("logo.swf",0);
result: only logo.swf showed up, running at 10 fps.

Any help??
Thanks in advance

Merging To Swfs
yeah so i designed this site, www.dmaconsulting.ca, after creating the flash version i created the preload screen, problem is the preloader needs to be a part of the same scene in order for it to work. how do i insert say,10 frames before the actual content of the site in order to allow the preloader to be a part of that scene. please help, my personal flash coach is away on vacation, and dma consulting wants their work done. yesterday! thanks in advance...

Merging Arrays
what is the best way to merge two 2d arrays ie
[[0,0],[1,1],[2,2]];
and [[3,3],[4,4],[5,5]];

into [[0,0],[1,1],[2,2],[3,3],[4,4],[5,5]]

Merging Two Arrays
Hi, I want to add the elements of one array to another array. I could do it by looping through all the elements of the array I want to add, but I thought there would be a better way?


ActionScript Code:
var toAdd=[4,5,6]//I want to add this arrays elements...
 
var toAddTo=[1,2,3]//to this array
 
//I though this would work
push.apply(toAddTo,toAdd)
 
trace(toAddTo);//I wanted 1,2,3,4,5,6 but I get 1,2,3
 


any ideas?

Merging Between Images - Help
Hi, would appreciate any assistance on the following problem!

I'm trying to merge between 4 different image files, so it merges from image1 to image2 to image 3 to image4.

I can't make then fade out by using the alpha channel because they are imported images. I know it can be done I just can't figure out how.

Any ideas??

Merging 2 Animations To One?
This is what I would like to do. I made 2 animations, and I would like to play them in this order ; first the gif preloader, then the first animation plays and then the second one plays and stays looping...

Is it possible and how?

Merging Flash Files
This probably has an easy answer that I'm just looking too close to see (happens a lot with me). Anyway, I've built 2 different presentations with Flash MX and now I'd like to merge them.

I've tried copying and pasting--to no avail. What am I doing wrong?

Thanks in advance,

Tim

Elastic Button Merging As One
Hmm.. I don't know exactly how to explain this.. But i have made two buttons with each a different hit-spot.
one opens the eyes, and one opens the mouth.
I found a script that made them elastic.
But what I want is that the two buttons are just one button.. only with different hit-spots. I can't seem to get it to work because the one overlaps the other.
Is there a way to do that?

see (attachment for the .fla file)

Merging Two Flash Animations
Hey everybody,

I have a flash animation which I have recently added another animation to, which is a seperate animation altogether. Basically, the new piece I have added is like a little introduction. Initially, I used the loadMovie command to load the introduction into the movie, let it play through, and then unloaded the introduction when it was finished. However, I recently transferred it to a friends computer in an *.exe format (as they don't have flash) and of course, without the original introduction file actually 'within' the animation, no introduction is shown.

I am basically wondering if it is possible to have my intro placed in the .exe file in some way? Obviously, the most basic way includes me pasting the whole animation in; however the animation is quite complex and when I paste it, the animation is positioned differently and involves a LOT of repositioning of tiny elements on different layers. Can an animation be pasted into another with specific coordinates? Or is there another solution?

Copyright © 2005-08 www.BigResource.com, All rights reserved