Attach Movie?
hi.
i have a empty movie clip on the main stage of my movie with the instance name "main" and i'm looking to load movies from the library into depending on what someone clicks in the nav. i was wondering is the proper way to do this the attachmovie method? if so what would the code need to accomplish this?
also i was wondering is there anyway to maybe get them to transtion. say you have news loaded in already and you select links. could you possibly fade it out to 0 before fading in links from 0 to 100?
any help somene can lend me would be great! thanks in advance!
evan
Ultrashock Forums > Flash > Flash Professional
Posted on: 2007-08-07
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Problem, Call Attach Movie From One Timeline To Another Movie Clip
Hi Everyone,
I have a relatively simple attachmovie problem.
I have have two different movie clip instances correctly labeled on the main _root timeline; "slider" and "projects_library". Inside the timeline of the "slider" clip is a script to attach a clip to the instance "projects_library". However when executed, it doesn't work. The script works fine if it runs on the _root timeline, but not when it's inside the "slider" timeline. I might have a misunderstanding of levels in my script. Hope someone can advise and clarify. Many thanks,
onEnterFrame = function () {
_root.projects_library.attachMovie("testproject", "testproject_new", _root.projects_library.getNextHighestDepth());
}
How Do You Attach And Play A Movie Clip To A Movie Object?
I have a movie clip in my library, and i want to use action script to play the clip on my scene1 stage. I know i can simply drag the clip on the stage, but solving this will make most of my other problems dissappear.
I tried in the first frame of my scene:
---------------------------------------
mymovie = new MovieClip();
mymovie.attchMovie(clip,clip,20);
mymovie.play();
---------------------------------------
but it did not work...help! :-)
any suggestions?
zavyzavy
Duplicate And Attach Movie Within Another Movie Clip Problem
I'm having problems duplicating/attaching movie clips within a movie clip.
I have a panel_MC on stage. I want to be able to dynamically attach several movie clips (essentially they will be buttons) into this panel_MC. Unfortunately when I use mc.attachMovie() the previous movie clips are overridden..
here is some of my code.
Code:
var noOfIcons:Number = 10; /* 10 for easiness sake.. real number will be determined by a function */
var iconBtnXPos:Number = 0;
for (i=1; i<noOfIcons;i++){
var btnNo:Number = i;
panel.createEmptyMovieClip("container"+btnNo,this.getNextHighestDepth());
whereIsThis = panel["container"+btnNo].attachMovie("iconButton","icon"+btnNo, this.getNextHighestDepth());
trace("whereIsThis :"+ whereIsThis);
this.panel["container"+btnNo]["icon"+btnNo].iconLabel.iconText.text = btnNo;
this.panel["container"+btnNo]._x = iconBtnXPos;
this.panel["container"+btnNo]["icon"+btnNo].onRelease = iconBtnRelease;
iconBtnXPos +=52;//calculate next _x button position
}
Any ideas?
[F7]attach A Movie Inside A Loaded Movie
Hi,
I have a main .swf called a.swf. It loads the movie b.swf in one of the layers. Inside movie b.swf is a movie called c. Movie c is set up to export for actionscript with the linkage name "movieC".
Now, what I want to do is attach movieC from code in movie a.
Something like newMC = target.attachMovie("movieC", "c1", depth); But movie A apparently doesn't know the id "movieC".
so C is in B.
A loads B.
how does A access C?
I'm using AS2, btw. Thanks!
Movie Doesn't Show With Attach Movie
hello,
I have trouble with attaching a movie, i've read the help file and everything i made is what is supposed to be but the movie doesn't show up, here's my code
ActionScript Code:
on (release) { _parent.container.attachMovie("att", "att2", 10);}
att is the linkage name, and container is the movieclip where i want to attach my movie (has instance name) and it's on top layer, i also tried with "this.attachMovie" or "_parent.attachMovie" but still does'nt work.
Can anybody help me ?
Thanks
Ubik
Using Scrollpane With Movie Clip And Attach Movie
I'm dynamically attaching movie clips to an MC which is 750px wide and 2000px tall. That seems to work fine. I'd like to have this MC with its dynamically attached clips be able to scroll in a scrollpane.
i tried attaching the MC (that gets the little mc's attached to it) to the scrollpane in the parameters settings of the scrollpane (in the properties window) but that doesn't work!
anybody done this b-4? scrolling an mc that has other mc's dynamically attached and stacked like this??? help!
Dynamic Movie Clip, Attach To Movie In .fla
I have an .as file that creates movie clips, and is loaded into an .fla..
I need to attach these dynamic movie clips to other movie clips on the timeline.
How would I assign (attach) a dynamic movie clip to another movie clip that exists on the timeline?
'AS' Wizards?
Movie Doesn't Show With Attach Movie
hello,
I have trouble with attaching a movie, i've read the help file and everything i made is what is supposed to be but the movie doesn't show up, here's my code
ActionScript Code:
on (release) { _parent.container.attachMovie("att", "att2", 10);}
att is the linkage name, and container is the movieclip where i want to attach my movie (has instance name) and it's on top layer, i also tried with "this.attachMovie" or "_parent.attachMovie" but still does'nt work.
Can anybody help me ?
Thanks
Ubik
Using Scrollpane With Movie Clip And Attach Movie
I'm dynamically attaching movie clips to an MC which is 750px wide and 2000px tall. That seems to work fine. I'd like to have this MC with its dynamically attached clips be able to scroll in a scrollpane.
i tried attaching the MC (that gets the little mc's attached to it) to the scrollpane in the parameters settings of the scrollpane (in the properties window) but that doesn't work!
anybody done this b-4? scrolling an mc that has other mc's dynamically attached and stacked like this??? help!
How O Attach A Movie?
I have a problem with attaching the movie. Line looks something like that: attachMovie( "pausa", "p", 100 )
Pausa is the linkage in Library (that should be OK).
When I hit CHECK SYNTAX I GET THIS:
******* You must export your movie as Flash 5 to use this action.
attachMovie( "pausa", "p", 100 );***********
HELP!!
Attach Movie
Hi
Does anyone know why we choose to use Attach Movie instead of duplicate Movie ? what is the advantage?
Thanks in advance
MKit de HK
Attach Movie
Hi there,
Ok, I'm new to the multiple swf file idea. I thought it was pretty nice to have all the data in yust one file.......but, offcourse, it got to big.
So I Kicked all the background images in a BGlib.swf and all the pics in a PIClib.swf. Got the TUT about attachMovie and so it worked in my preview mode..........but not online??
Q: do you need loadmovie to use attach?
Q: is it possible to make a big library.swf but load just the MC you need?
oh, the code I used:
placeHolder.loadMovie("library.swf");
placeHolder.attachMovie("bg_ssl", "ssl", 0);
please help......
thanks
Attach Movie
i was wondering if its possible to do this via actionscript:
i have a button and i want to attach a movie from the library in the same position of the button when the button is clicked..and if i duplicate the button in another position it might have the same behaviour...thx
Attach Movie Help
I have this code
function create () {
for (i=0; i<30; i++) {
attachMovie("sub", "button"+i, i);
myButton = this["button"+i];
myButton._y = 15*i;
}
}
and this just attaches them in a line
I would like to have them in rows of 5
is this possible and how do I do it.
hope you can help
mac
Attach Movie
I have a problem using the attach.movieclip function.
I want to call a member (that I already have exported) of the library, by pressing another movie clip.
I want that it's been attached in another movie clip.
I also want that it attachs a copy each time the buttom is pressed, but i don't need that the name of the new instance changes each time.
What i'm doing is: Wirtting a script on the movie clip that serves like a button :
on (release) {
construct_zone.attachMovie("__2", "a", 0);
}
Attach Movie
I have a scene where I have an "attach movie action".
I've done a preloader for the movie but the problem is that the swf is showing 89k for the first frame. I'm sure that because of this action the movie loades all the information in the first frame.how can I escape from this problem without making another external swf. for the preloader?
thanks.
Attach Movie
im trying to attach a movie with a blank target MC.
the blank clip is on frames 1 - 5. and on frame 5 i have an Action to attach it.
_root.target.attachMovie(badguy1, badguy, 0);
it doesn't work but i dont know why.can anyone help?¿?¿?¿
Attach Movie ?
I want to load a MC into my main SWF from button action ON Release,(can someone run me through the attachmovie command)Big help Thanks Paul
Attach Movie
Hi
in my portfolio web site that i am building:
I have a button "Auto" that should take me to a frame label 'auto' in a MC 'folio'...
in that frame label i have an empty MC 'auto1' in which i want to attach a linkage MC from my library
so i have an action on my frame label
_root.folio.auto1.attachLoadMovie("auto1", "auto1", 20);
and that doesn't seem to work
it is keeping the MC empty although it is the right path. Is the syntax correct?
Because if I try the loadMovie command instead and I load any swf file, it works....
Now the thing is that I'd rather Attach Movie instead of Load, because in the Load Movie i will have to have 100 swf files or so to upload, whereas with the attach command everything stays in one file. But I don't want everything to load from the begining (as everything stands on one frame in my timeline, and it will be too heavy), i'd rather use a preloader when i click on the button Auto for instance to load me the attach Movie. Can I do that? Is my question clear? For any question, write to me
thank you very much
ran
Attach Movie Help
I am creating a simple "space invaders" movie where an attached movieClip (laser bolt) needs to move vertically upwards. I can do everything apart from this part. I can attach it to the "tank" at the bottom but need some simple code to send it on is way.
ie this.attachMovie( "laser", "laser1", 2 )
any help please?
Attach Movie
Hello All,
I'm new to actionscript so I'm stuck after working on this for quite some time.
I trying to dynamically attach a movie to an instance of another movie. Can someone please help? I would really appreciate it.
Here is the code that I can't seem to correct:
PHP Code:
function createButns() {
classAmount = totalClasses;
trace ("classAmount = " + classAmount);
y = 0;
spacing = 12;
for (i=1; i <= classAmount; i++) {
_root.listBox.attachMovie("classButton", "classButton"+i, i);
var name = "classButton" + i;
trace (name);
_root.listBox.name._y = y;
trace (y);
_root.listBox.name.classGroupName.text = classgroup[i];
trace (classgroup[i]);
y = i * spacing;
}
}
This attaches the first instance of "classButton" but does not place the next instance. Furthermore, the dynamic text box located within the "classButton" movie does not get populated from the array "classgroup".
I'm attaching the FLA file and its associated XML file.
Thanks again,
Flashtech2K
How To Attach A Movie?
Hiya. What I have here is a choice for a user. On top is the message to explain anything if necessary. In the middle is the drop down menu into which the options are available and the bottom is sort of like to 'ok' button.
When user presses the button, a message should show up in the dynamic text box on top saying he didnt make a choice. Otherwise, the choice of the user is stored as a variable and used in a frame further.
This doesn't work and it's my first problem...
Also, when the button brings the user to the desired frame, depending on what option he chose, a movie clip should be attached to the main timeline. I don't want to do different frames for different options because for what I need to apply this, I have too many choice... (Did that syntax make any sense!?!...)
I enclose the .fla file, so if anyone knows what I could do or what I shouldn't have done please lemme know!
Thanx!
Attach Movie
HI, I am not sure if I am going about this in the correct way. I am creating a quiz and one of the questions within the quiz requires 3 correct answers to be ticked out of a possible 7. I want the user to select three answers, but can swap and change their mind before submitting. To create the tick in the box to demonstrate that the user has picked the answer I am loading in external movie clips of the tick. This works fine using the below code:
on (press) {
_root.attachMovie("tick_mc", "mytick", 1);
_root.mytick._x = 134;
_root.mytick._y = 212;
}
However I want to load multiple movie clips in, this is where I am having problems as soon as I load a new clip in the first one disappears. This is the code I am putting on the second button:
on (press) {
_root.attachMovie("tick_mc2", "mytick2", 1);
_root.mytick2._x = 134;
_root.mytick2._y = 258;
}
Can anyone help me load multiple movie clips onto the scene one after the other so they are all there at one time.
Thanks
Michelle
Attach Movie
I was told that if I wanted to load a movie clip on stage by the press of a button then I would add this code:
on (press) {
attachMovie("MCName","MCName",1);
}
I have to questions on this matter:
1. What if I wanted to load different movie clips with the same button. E.G. (creat an arrow and switch through the different selections of MC's).
2. It still won't work after this code is in. Don't I have to say where I want it. E.G. (-y 200 x 500)
Attach Movie
I was told that if I wanted to load a movie clip on stage by the press of a button then I would add this code:
on (press) {
attachMovie("MCName","MCName",1);
}
I have to questions on this matter:
1. What if I wanted to load different movie clips with the same button. E.G. (creat an arrow and switch through the different selections of MC's).
2. It still won't work after this code is in. Don't I have to say where I want it. E.G. (-y 200 x 500)
Attach Movie
Hi,
is it possible to attach a clip to a loaded in movie? or can you only add new clips to the loaded in movie from within the loaded in movie itself??
thanks for any help.
boombanguk.
Attach Movie
Hi Can anyone see what is wrong here
I can't see the attached movie "officeDivider"
regards T
officeMC = officeAndContactMC.createEmptyMovieClip("officeMC" +k, 2);
officeMC.x = cityX;
officeMC.y = cityY;
officeMC.officeMap = officeMap;
officeMC.office = officeName.toUpperCase();
officeMC.createTextField("_office",1,0,textFieldHe ight,scWidth,textFieldHeight);
officeMC._office.text = officeName;
officeMC._office.border = true;
officeMC._office.setTextFormat(boldFieldFormat);
officeMC.onRelease = function() {
setSearchHeaderText(this.office + " INFO")
loadMap(this.x, this.y, this.officeMap);
}
phoneMC = officeAndContactMC.createEmptyMovieClip("phoneMC"+ k, 3);
phoneMC.createTextField("_phone",1,0,textFieldHeig ht*2,88,textFieldHeight);
phoneMC._phone.text = "Telefon "+ officePhone;
phoneMC._phone.border = true;
phoneMC._phone.setTextFormat(normalFieldFormat);
if (officeEmail != undefined) {
emailMC = officeAndContactMC.createEmptyMovieClip("emailMC", 4);
emailMC.email = officeEmail;
emailMCx = phoneMC._phone._x + phoneMC._phone._width;
emailMC.createTextField("_email",1,emailMCx,textFi eldHeight*2,50,textFieldHeight);
emailMC._email.text = "- E-post";
emailMC._email.border = true;
emailMC._email.setTextFormat(normalFieldFormat);
emailMC.onRelease = function() {
getURL("mailto:"+ this.email);
}
}
officeDiv = officeAndContactMC.attachMovie("officeDivider", "officeDivider2", 5);
Attach Movie
Hi,
Can anyone here explain why my attached movie won't show
I am loading an XML file with city data, and this data I want to present in dynamic text fields using a loop
after each city I need a line (from my library with linkage name "cityDivider").
But I can't see my line anywhere, do I do something wrong?
please see attached code
hope anyone have som answers,
Thanks in advance.
best regards T
Code:
code:
// Create textfield, and insert data
cityMC = resultHolder.createEmptyMovieClip("cityMC", 1);
// Store some variables
cityMC.x = cityX;
cityMC.y = cityY;
cityMC.city = city;
cityMC.cityMap = cityMap;
cityMC.createTextField("_city",1,0,0,scWidth,textF ieldHeight);
cityMC._city.text = city.toUpperCase();
cityMC._city.setTextFormat(boldFieldFormat);
cityMC.onRelease = function() {
// Some action
}
//
var div = cityMC.attachMovie("cityDivider", "cityDivider2", 5);
div._width = 100;
div._height = 100;
EDIT: Added [ as ] tags for readability - see posting guidelines at top of forum - jbum
Attach Movie
OK earlier i asked howd to make a movie clip to another movie clip and i did this
onEnterFrame = function() {
this.attachMovie(Ralph);
}
So now what's next how do i get it to change in to the movie clip i have already? PLEASE SOMONE HELP ME ON THIS
Attach Movie
Hi,
Im trying to load a movie clip into a scene, which is done by clicking a button.
In this example, the movie clip is a word in a crossword and when a button is clicked the word appears in the right place in the grid. (Obviously later on I will substitute the button for a text field, for the word to be input).
This is the code I have so far, partly helped by the Flash tutorial within Flash MX 2004 itself, which I am using:
Code:
stop();
woo_btn.onRelease = function() {
_root.attachMovie("digital", "digital_mc", 1, x = 400, y = 180);
};
The movie clip loads OK, but the problem is the positioning. It is just placed in the top-left hand corner of the movie, the coordinates I heve entered having no effect on it.
Could anyone point out where I'm going wrong?
Attach Movie
Hey guys,
Below I am attaching a movieclip based on a var:
Code:
if (_root.char == 1) {
_root.attachMovie("demon2","newdemon",200);
newdemon._x=30;
newdemon._y=120;
} else if(_root.char == 2) {
_root.attachMovie("fluffy","newfluffy",200);
newfluffy._x=30;
newfluffy._y=120;
}
else if(_root.char == 3) {
_root.attachMovie("snake2","newsnake",200);
newsnake._x=30;
newsnake._y=120;
}
I now want to attach another movie based on a different var, as shown below. If i spread the two code segments out over multiple frames I can see that as soon as the second lot of code is executed it immediately negates the first lot. So I cant get two characters on screen at once, as soon as I add a second, the first one dissapears. Im sure its a really simple problem as im pretty new, any suggestions appreciated
Code:
if (_root.enemychar == 1) {
_root.attachMovie("enemydemon","newenemydemon",200);
newenemydemon._x=300;
newenemydemon._y=120;
} else if(_root.enemychar == 2) {
_root.attachMovie("enemyfluffy","newenemyfluffy",200);
newenemyfluffy._x=300;
newenemyfluffy._y=120;
}
else if(_root.enemychar == 3) {
_root.attachMovie("enemysnake","newenemysnake",200);
newenemysnake._x=300;
newenemysnake._y=120;
}
[cs3 Using 2.0]using Attach Movie
I'm tring to learn how to only use 1 layer and 1 frame to build a site, to eventually use external script. I have been searching tutorials, and posts
all day and night (no lie)
can anyone please Help me with this, with code, tutorial, or advice
Code:
stop();
//need something to show that content below is loading
//then after an flv is done playing in the mc I want it to remove itself from stage
_root.attachMovie("introduction_mc", "intro", this.getNextHighestDepth(), {_x:0, _y:0});
//start loading after introduction_mc is removed from the stage
//need something to show that content below is loading
_root.attachMovie("redirect_mc", "redirectbuttons", this.getNextHighestDepth(), {_x:0, _y:0});
_root.attachMovie("welcome_mc", "notices", this.getNextHighestDepth(), {_x:0, _y:101});
_root.attachMovie("mainframe1_mc", "navigation", this.getNextHighestDepth(), {_x:50, _y:430});
_root.attachMovie("home_mc", "page1", this.getNextHighestDepth(), {_x:250, _y:101});
Happy Holidays, sincerly Sybershot
[cs3 Using 2.0]using Attach Movie
I'm tring to learn how to only use 1 layer and 1 frame to build a site, to eventually use external script. I have been searching tutorials, and posts
all day and night (no lie)
can anyone please Help me with this, with code, tutorial, or advice
Code:
stop();
//need something to show that content below is loading
//then after an flv is done playing in the mc I want it to remove itself from stage
_root.attachMovie("introduction_mc", "intro", this.getNextHighestDepth(), {_x:0, _y:0});
//start loading after introduction_mc is removed from the stage
//need something to show that content below is loading
_root.attachMovie("redirect_mc", "redirectbuttons", this.getNextHighestDepth(), {_x:0, _y:0});
_root.attachMovie("welcome_mc", "notices", this.getNextHighestDepth(), {_x:0, _y:101});
_root.attachMovie("mainframe1_mc", "navigation", this.getNextHighestDepth(), {_x:50, _y:430});
_root.attachMovie("home_mc", "page1", this.getNextHighestDepth(), {_x:250, _y:101});
Happy Holidays, sincerly Sybershot
Trying To Attach Movie Via XML
Hi, I am modifying the old Kirupa XML image gallery.
Currently, I want to generate buttons by iterating through the nodes on an XML sheet.
In this case, there are 7 nodes called <navLabel> which would mean that seven buttons should be attached to the main stage, but it is only attaching two. It also is not changing the button's text field to the value to the node's value.
What am I doing wrong?
I am attaching the code in question, and the files. Cheers.
Code:
var xPos = 40;
var yPos = 40;
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
nav_btn = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
//trace(total);
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
nav_btn[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
menu.attachMovie("nav_btn", "new_clip"+i, i++, {_x:xPos, _y:yPos});
//increase the x postion each time
xPos += this["new_clip"+i]._width+5;
new_clip[i].nav_text.text = nav_btn[i];
}
firstImage();
} else {
content = "file not loaded!";
}
return;
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
Help With Attach Movie
I have a button inside of an MC, when pressed I want it to load an MC (fullscreen_image) from the library and load a graphic("Alien_01_Sketch") into that MC. I have set linkage on the MC and the graphic to export for actionscript.
on (press) {
_root.attachMovie("fullscreen_image","fullscreen_i mage",{_x:512,_y:512});
_root.fullscreen_image.loadMovie("Alien_01_Sketch" );
}
...nothing is happening for me, the image is not loading. What could be wrong here?
in the fullscreen_image MC i have a button with this code on it, to remove the MC when clicked:
on (press) {
removeMovieclip(this._parent.fullscreen_image);
}
[MX] Attach Movie?
why doesn't this work
Code:
if (this.hitTest(_root.bomber)){
_root.bomber.attachMovie(_root.question1, question1question, 1);
}
I have bomber on a different level from this.
[CS3] Help With Attach Movie
Here is the code, its on the first frame of an empty movie clip that is on the first frame of scene 3. No errors are coming up, but no graphics are showing up either. I tried putting it simply in the first frame of the scene with _root. instead of this. but it gives my an error that says Type Mismatch.
Any help would be greatly appreciated.
Code:
// Sticking cases and buttons on Stage
a = 1;
positionX = 20;
positionY = 20;
while (a<21) {
this.attachMovie(caseBox,["caseBox"+a],this.getNextHighestDepth(),{_x:positionX, _y:positionY});
this.attachMovie(caseButton,["caseButton"+a],this.getNextHighestDepth(),{_x:positionX, _y:positionY});
if (positionX>_root.stage._width) {
positionX = 20;
positionY = positionY+20;
} else {
positionX = positionX+40;
}
a++;
}
//End Sticking cases and buttons
Attach Movie If
Hi all,
Simple thing, just tring to get an mc to attach IF the external movie on level 15 has already loaded.
The mc 'green' does not need to attach at the instant 'level15' has finished loading, because this code is placed on a frame on the timeline which may be encountered after 'level15' has loaded.
Code:
if (_level15.getBytesLoaded()<_level15.getBytesTotal()){
this.attachMovie("green", "greeno", 1);
} else {
play();
}
Attach Movie
Ok, here is something I've been struggling with for a long time, I'm finally saying enough is enough.
I create a movie with attachMovie:
ActionScript Code:
//From inside the lobby clip
_root.lobby.waitingRoom = _root.lobby.attachMovie("waitingRoom", "waitingRoom", _root.lobby.getNextHighestDepth());
Then remove it with removeMovieClip:
ActionScript Code:
//From main time line
lobby.waitingRoom.removeMovieClip();
Then, later when I try to attach the clip again, it doesn't show?
I've had varying results using attachMovie then trying removeMovieClip or unloadMovie in the past. As I said, enough is enough. And help?
Attach Movie
with AS three how exactly do i attach a movie from my library in runtime?
please help i miss as 2.0 but am trying to not cave!!!
Attach Movie In As3
Hey all, I'm fairly new to flash, but I can do a few things, I had a
good flash program going in as1, which I'm trying to convert to as3.
I had asked on irc for some help, but it was touching on subjects I have
not covered on as, and even after looking up and applying, its causing
countless problems.
1) My application receives information currently from echoed information
from a db onto a html page, which flash is able to feed in e.g. (echo
&var+rowvar+&).
I'm considering xml although I'm unsure about benefits or anything
2)in as1 my application could simple do a for loop with the number being
passed in via the number of rows in the database which was echoed onto
the page then fed into flash.
Do for loops act the same in as3?
3)I was attaching a movie clip multiple times, which I need to get to
act all independent of each other, so each one needs its own name, as1
this was possible via "_root.attachMovie("button","btn"+i, 100+i);"
and this is where the main problem is, as I was asking about this,
attachmovie no longer works, and I got told to sort out "linkage" which
I have done, then setting up class and using addchild. which I have
tried... but it does not work and I cannot get around.
reading up on it, documents say addchild should enable the object to be
displayed. which for me isnt happening.
Here are the list of problems I have been getting:
-An ActionScript file must have at least one externally visible
definition. so I looked it up, and I figured I have to put up a
package and public class (athough I do not understand class's)
which resulted in the error
-TypeError: Error #1006: addChild is not a function. at global$init()
which sounds great...
messing around got me to
-5008: The name of definition 'test' does not reflect the location of
this file. Please change the definition's name inside this file, or
rename the file. z:locationindex.as
so I changed the class "test" to "index" where I encountered more
problems...
[code]
var page1:page_mc = new page_mc ();
this.addChild(page1);
[/code]
[code]
package
{
import flash.display.MovieClip;
public class index extends MovieClip
{
public function index()
{
trace('lol');
}
}
}
[/code]
and by the way, I have tried using addchild on frame1 of the fla, with
no results.
I'm sure I'm missing something at the biginning because looking up every
problem and getting more errors seams silly for something that was so
easy in as1, that I would need so much code to stop problems of 1
function..)
Thanks in advance
Slpixe
Attach Movie
I'm writing the following actionscript:
attachMovie("pini", "p",1);
p._x = -10;
p._y = 126.7;
I want some graphic to appear higher than the movie. (to hide the movie)
i tried :
attachMovie("pini", "p",999);
p._x = -10;
p._y = 126.7;
didnt work...
any suggestion?
thanks
Attach Movie
I have a small problem Im trying to attach a mc multiple times.
On frame 1 I have :
attachMovie("button", "button1", 0, {_x:240, _y:80, onPress:stopDrag, onRelease:stopDrag});
On frame 2 I have :
attachMovie("button", "button2", 0, {_x:240, _y:120, onPress:stopDrag, onRelease:stopDrag});
The problem is that the attachment done in frame 1 dissapears as soon as the script on
frame 2 executes !
Anybody ?
Attach Movie Help
I was reading on how to create tiled games and came across attachMovie
_root.attachMovie("empty", "tiles", ++d);
what exactly does attachMovie do?
Thanks
Attach Movie
Subject: Attaching Movie in the Second Frame.
Can we attach the Movie in the Second Frame of the movie.
I have two frames in a Movie, I am able to attach the movie from the library in the first frame. I am unable to attach the movie in the second frame.
Is it possible in Flash to attach the movie in the second frame.
with regards,
Prathap
Attach Movie
Hello,
Can anyone help me in attachMovie script.
I have made one Flash Movie, File name is dummy.fla.
In this file(dummy.fla), I have got 3 Frames and one button to navigate between the frames.
In the library I have Three Movie Clips. I want to load First Movie Clip on the first key frame. Second one in second key frame and Third one in Third key frame.
So in the first Frame I have given the attachMovie script to attach the First movie clip. So this is working fine. Its loading and I can see that Movie Clip.
In the second Frame if I have given the attachMovie script to attach the Second Movie clip, it is not loading the second movie clip from the library.
Even in the Third Frame, same result, its not loading.
Will attachMovie Script works in different key frames.
Everyone are welcome to reply
Movie Won't Attach
Here's my code:
Code:
function loadMenu1():Void{
this.attachMovie("aboutevbc1btn", "aboutevbc1", this.getNextHighestDepth());
aboutevbc1._y = 44;
aboutevbc1._x = 7;
aboutevbc1.onRelease = function(){
_level0.menu2 = "aboutevbc";
trace(_level0.menu2);
this.menu2.removeMovieClip();
this.attachMovie("Menu_2", "menu2", this.getNextHighestDepth());
}
No errors show in the output panel. The Menu_2 symbol (movieclip) does not attach. Any ideas?
Movie Attach
Hello!
Could any one tell me what is wrong with this code?
It does nothing, it is supposed to duplicate the movieclips
many times (endlessly).
Attach Movie
I have a small problem Im trying to attach a mc multiple times.
On frame 1 I have :
attachMovie("button", "button1", 0, {_x:240, _y:80, onPress:stopDrag, onRelease:stopDrag});
On frame 2 I have :
attachMovie("button", "button2", 0, {_x:240, _y:120, onPress:stopDrag, onRelease:stopDrag});
The problem is that the attachment done in frame 1 dissapears as soon as the script on
frame 2 executes !
Anybody ?
|