ActionScript 2.0 :: Copy/Move A Movieclip From _root To Inside A MC?
Jan 18, 2008
If I have a movieclip on the main timeline, is there a way to put this movieclip inside another movieclip on stage (ofcourse during runtime) ? I know that one of the methods of doing this is using bitmapdata class to capture an image of the movieclip (draw method), then attaching the object it to another movieclip that can be anywhere, but this will make the movieclip lose it's interactivity behaviour, and vector quality.
In the code below i want to change the _root.broj and _root.logo variables inside the function which returns values from .php file. Inside the function everything works fine and all values are correct but when i trace var broj outside the function it's still 0.
var result_lv:LoadVars = new LoadVars(); var send_lv:LoadVars = new LoadVars(); var broj:Number=0; var logo = new Array();
I just recently began migrating from AS2 to AS3, and I have of course realized that I can no longer move the "_root" by changing the _x and _y positions of the _root (which no longer exists in AS3). How can I do this in AS3 (specifying _x, _y, _z possibly of the "_root")?
I'm just starting with as3 object oriented programming -- i've always liked the idea, but could never "see" how the whole objects/classes worked with actual game development.in my fla file i have this...
Actionscript Code:
var moveBob:MoveMan =new MoveMan()
in my MoveMan.as file...
Actionscript Code: package { public class MoveMan { public function MoveMan() { bob.x = 5 } }}
and on the stage i have a movieclip with the name set as "bob" If i use this line in my fla file... bob.x = 100 it works.But when i try to move the movieclip inside the class i get this.1120: Access of undefined property
I have an animation (movieclipX) on frame 2 of main timeline. At the end of movieclipX I'd like the main timeline to move to the next frame, frame 3. How can I do this??Sorry if this is an easy question, I'm in the process of learning.
how to get my move drag and drop a copy of the reindeer. (see attachment) I've been mulling over for so long i'm starting to confuse myself. It's go to be something simple that i'm over looking.
I have some global Arrays defined and loaded with data at the _root level. Data is OK cause I checked it with the List Variables option. I cannot address any of my arrays from within my MC hierarchy (not from MC2, MC1 or Component MC), BUT I can address variables defined at the root level correctly?
MC Hierarchy: ComponentMC-->MC1-->MC2-->Various MCs
I placed trace(_root.MyArray[0]); at MC2 level, then at MC1 level and finally at ComponentMC level but the sentence still reads "undefined". Is there a way to actually get my Arrays data from _root ?
I am loading a external swf in to a movieclip.. now i need to copy and paste the text available inside the external swf. i tried with setclipboard method to copy the text inside that, but it is not working for me..i have attached the code for your reference..
For my project I need to copy the graphics of a Movieclip with all of its children without copying anything else into a second Movieclip. I cannot use the Bitmap classes because I need the graphics to be displayed as a vector and I cannot use a method that simply copies the clip by calling the instructor ie:
var copy:MovieClip = clip.constructor. Is there any way to copy only the display portions of a clip into another Movieclip without turning it into a bitmap?
if a condition is true, then:_root.(MC with instance name that is the value of "_root.eelmine").nextFrame(); is this correct?_root._root[eelmine].nextFrame();
got a problem.. if i load an image into _root.pic_mc movieclip and its loaded i try to load anotherone in the same mc.. now the pic_mc turns white and the picture disappears.. so i tried to make a duplicateMovieClip on the pic_mc but this also didn't work. any other solution on this problem?
now MovieClip_1 contains one child _child_1. now by pressing button i want to add that _child_1 of MovieClip_1 to MovieClip_2 without removing from MovieClip_1.
i tried following code in button press event but it removes _child_1 from its past container.
var mc:MovieClip = MovieClip(MovieClip_1.getChildAt(0)); MovieClip_2.addChild(mc);
when I have one movieclip mc1, mc2 is child movieclip in mc1. How can i copy mc1 to mc1_1 with all children movieclip ? if i use attachMovie or duplicateMovieClip, i only copy mc1 without mc2.
MainMove.swf is doing a loadmovie of SecondMovie.swfThe Button that loads SecondMovie.swf also disables other buttons in MainMovie.swfon (release) { _root.intro_btn.enabled = flase; loadMovieNum("SecondMovie.swf", 2);How do I Re enabled the Buttons in MainMovie.swf from a Button within SecondMovie.swf???
I have two movie clips on stage, each with the same code, I have another movie clip that comes along and interacts with the two of them and changes properties to its speed and such. The problem is, it only seems to work one at a time, for instance I can't have both of the movie clips changing its speed, it works with one and then ignores the others code. *EDIT* I just ran a trace on the two mcs, I can confirm both of them know when the main one hits it, but because I'm trying to change a _root.mc.speed property in each one, it only accepts one of them and ignores the other for some reason :S If I use different properties in each it allows that.
I`m trying to set-up a script that changes the color of a movie clip, depending on the current url of the page... My code is:
Code: var link = "http://localhost/v-v/indexSRP.php?kategorija="; var link2 = "http://localhost/v-v/index.php?kategorija="; if (_root._url.indexOf(link + "3") == 0) {
How does one select layers then bring them into a new MovieClip with their artwork and functionality etc intact.
I have a load of layers which together form a map with animations that run on it. A static key with a few buttons runs the animations on the map. I need to pan/zoom this map and as such need to package all these layers that form the map up into something that can be referred to in the coding for the pan and zoom functions.
I created a new layer in my timeline, called it MapPanZoom, then went Insert>new>movieClip.
I now need to remove the maps layers from the timeline and into the timeline for the movieClip I just created. How is this done ?
Leaves behind the static key that sits outside of the map, when a button in the key is clicked, I hope to see it run the animation on the map, and have a user able to zoom and pan the map whilst it runs.
I tried selecting the layers then edit>copy, then opening MapPanZoom movieClip from Library and edit>paste, nothing happened. Planned to delete the layers if it had worked out of the original scene1.
I know there are a million and one posts about how to copy a MovieClip object, and I'm fully familiar with the method of[code]...
For this reason I can't use the original.constructor job as flash obviously thinks it's a straight MovieClip, so I just get an empty MovieClip. So far I've been getting by with creating a Bitmap, but in future these swfs will contain animations too.
A web channel streaming service streams to a certain IP range, it only checks the IP in example.com/cmd.php?id=xxx (channel number) and outputs an rtmpe stream URL, nothing else.How do I trick it to get my local URL instead of the one on their server? I have considered squid proxy, but is there some way to do it with a firefox plugin or greasemonkey script?
Edit:I will try to specify:It's a streaming service from an ISP and cable provider. They stream for free to people on their IP's. On their webtv page, which is called webtv.example.com, there is a flash player. If you are not on an IP from their ISP, you can't stream anything but the test channel.When you try to change channel via. javescript:videoplayer_changechannel(xxx) it makes this HTTP request:
[URL]
If you are on one of their IP's you will get an RTMP URL, like this:
[URL]
This is what the flash player requests, and if it get's this response it load the channel requested. There is no HTML on the php page, just the URL. Note that the rtmp URL is static.If you are not on one of their IP's it will return a random sentence (something stupid, the programmers having fun).I wan't to trick the flash player into getting the right value, even though it's not on one of the ISP's IP's.
I've download a flash template from:[URL]I just wanted to use the menu, so I copy the movieclip and paste it into my stage then use AS 3.0 to control it.It's working fine when I only have 1 item on the menu.But when I paste more than 1 they all seem to share the same attribute, when i edit the text of 1 the rest get edited too.