AS3 101... Talking To Clips...
2 functions. putAnim draws something from the library to the stage. This works fine. However when I call the moveAnim function, it fails saying that it cannot reference the properies: 1120 access of undefined property kammy x = 300Why can the moveThis function not find the kammy object? ActionScript Code: function putAnim() { var kammy:kameko = new kameko(); this.addChild(kammy); moveThis();}function moveThis() { kammy.x = 300;}
KirupaForum > Flash > ActionScript 3.0
Posted on: 07-11-2007, 04:56 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Talking To Movie Clips ...
help..... please ....
I can't get my Nav to work the way I want it to. Would somebody please take a look at www.MissMaryMac.org. this is my portfolio site Hopefully you will be able to find the nav on my site and you will notice three sections 1. print 2. web and 3. Graphics & Illustration. Notice that this nav is a draggable movie clip. Below the nav (because I can't figure out how to make it work from within the nav movie clip) are the next and back arrows. right now the next and back buttond are placed inside of each of the three sections and their code looks like this:
on (press){
slideClick = 1;
transition.gotoAndPlay("start");
}
I would like to take the next and back buttond and place it within the draggable nav movie clip and have them work from there but have been unsuccessfull in speaking to the different sections from within the nav movie clip.
P.S. The different sections are movie clips placed on the main timeline and the nav is also a movie clip placed on the main time line. each movie clip is named ie; web, print & Ilustration
This script did not work:
on(press){
tellTarget(_root.print){
slideClick = 1;
transition.gotoAndPlay("start");
}
}
Any Ideas???
Thanks much!
-M
Talking To Duplicated Movie Clips?
I am having a problem communicating properly to MCs that are being duplicated when the user clicks an icon and drags them to a hotspot.
My question is, if I have an data array associated to the MC being duplicated, does or can the duplicated MC contain a unique instance of the data array set? and if so, if the dulicated MC is on _level0, can I send the mulitdimensional array to the server as one variable? Since, I'm going to have an array of duplicatedMCs that each contain a unique data array set.
Actionscript... Talking To Other Movie Clips Within _parent
I'm sure this is so simple but its not something I'm understanding at 2am.
I'm in level 1, I have a movie clip on frame 2 (called movieOne) and a movie clip on frame 10 (no name). I want a button in the movie clip on frame 10 to go to a frame (frame 180)...inside the movie clip on frame 2
When in Frame 10's movie clip, I want to "on (release){_parent.movieOne} //name of the movie clip on froma 2// gotoAndStop(180); //frame number I want to go to//
You pro's... can ya help a Actionscript kewk out?
Thanks in advance!
si
Talking To Al Of These Mc's
let say i wanna remove all of these mc's
or tell an mc to do something wich is nested in all of these mc's...
please help me
Talking Between Exe's
Is it possible for a button in one exe
to open up another exe?
Regards
Dogs Lipstick
.swf's Talking To Each Other?
Ok flash gods, I know that I've asked this before and just can't remember the , how to part!!!
I have my main movie index.swf - now in this loads logon.swf into it ... The problem I have is that I want the logon.swf (which is a password logon section) to tell the index.swf to go to next sceen which is "thankyou" this has to happen when you either press a button or press enter on your keyboard...
Thanks in Advance
D
Talking Between Swf's...
I would like a button press inside one swf to open another swf in a new IE window, whilst also changing the variable "writing" inside the newly opened swf (in new IE window) to a certain .txt file that contains the text i want displayed.
So, i have a template movie, with a variable "writing" that will be used many times over, and in each case, pointing to a different .txt file.
I have been able to do this, but only if the new swf loads inside the old one, but unable to do it when the new swf loads into a seperate IE window.
Any ideas?
G
.exe's Talking To One Another
I have two separate Flash MX executables(.exe) One executable launches the other. Is there a way to detect when the launch executable has been closed or exited, and then notify the other executable that this has happened and take the user to a specific start point in the first executable.
Thank you for your help
Talking To Another Swf
Hi
I have a separate animated swf file that has no interaction but just plays through its long sequence of frames.
But now i want some buttons on top of this swf that will allow me to jump forward or backwards 20 frames at a time.
I guess this is going to involve levels but i really don't know where to start.
Can anyone point me in the right direction?
HELP One MC Not Talking To Other MC
Hi
I am using Flash 5. I have previously created a website, with two MC's, which works fine. My new site, which uses the same principle as my old site, doesn't work.
My previous site has an MC called "buttons", with menu buttons in it, and screens, which each button links to, in another MC called "screens". The buttons are static.
On my new site, each button is animated, tweening from left to right across the screen. Each button is within its own MC for alignment purposes. I have placed the following code into each button:
on (rollOver) {
stop ();
}
on (rollOut) {
play ();
}
on (release) {
_root.screens.gotoAndStop(2);
}
The on (rollOver) and on (rollOut) commands work fine on each button.
On my previous website,
on (release) { _root.screens.gotoAndStop(2); }
goes straight to the appropriate screen.
Now, when I test the new site, the button does nothing, even though I have asigned the code to it.
I am baffled. The two sites are literally the same except for the moving buttons in the second site.
Please help!!
Btn Talking To A Swf?
How can I get a button to play a swf that’s targeted in a diff’ mc.
I have 2 swf files- nav.swf(with btn) and bg.swf,
Both swf’s are targeted to separate empty mc’s – nav_mc and bg_mc.
How can I get the button in nav.swf to tell bg.swf to -goto and play frame 2?
Talking Bee
Hi!
I would like to have some help with the little bee on the link beneath...
First of all I would like to have the bee to speak something randomly,
For example: “hello, I hope you are find today” and so on…
I would be aprox 20 of this randomly “words”
And for second: when you push the bee there will be lets say 10 different other
randomly “words”
It’s a little nice thing to communicate with , in the end there will be
an Ice projector.
Can I do it with action script?
Thanks in advance
http://www.dynamisk.nu/bee.htm
Swf Talking To Swf
hi all wondering if anyone could help.
i have a main movie that loads 2 movies into it.
one goes to level 2
the other to level 10
now i whant a button in the level 10 movie to change the alpha of the movie in level 2 to 50%.
any advice - ideas would be great thanx.
Talking
hi, im pretty new to this which is why im here, and i was wondering, how do i place a sound clip in my movies? to better explain, this is what i would like to:
have bob say hi to joe (sound clip one)
joe says hi again (sound clip two)
everything i know about flash up until now was self taught, and the reason im asking for help now is because i've always wondered how people get the timing right when their characters speak, and i dont want end up doing it the hard/long/wrong way. i mean, should i make the movie first, then add sounds, make the sounds first and then make the movie? i was gonna go with the second option, but i cant figure out how to add sounds. i've been looking so many places, but the only tutorials i see anywhere is for everything but what i want to do. and i dont see an "insert sound" option which would be nice, lol. i have the 2004 delux version of Flash MX. hopefully this is an easy question or somewhere can link me to a tutorial. sorry if this has been posted but i did 3 long (really long) searches in the forum and didnt see anything on this.
.SWF Talking To Another .SWF
Can anyone point me towards a good tutorial on having one .swf talk to another?
I am trying to get one .swf file to talk to another one to control some different elements.
Thanks,
--J
.AS Talking To .FLA
Hi, I need a movieclip that lives in my .fla to perform an action when something specifically happens in my .as. So pretty much i need to be able to call a function in the .fla from my .as.
Is the only way to do this using custom events and/or eventDispatcher. And if so how would I implement? Any help/suggestions would be much appreciated, thanks
MC Talking To One Another?
Hey all,
Well I lent my book on MC's talking to one another to this great looking girl at school, and wouldn't ya know it, I need it. Ah well she was worth it.
I have two movie clips within my main timeline. Both clips are named and MC1 has the buttons which I want to activate the animations in MC2. I'm just not sure how to ask the permissions so to say.
THanks
One Swf Talking To Another?
Anybody know how I can have one .swf talk to another. The real trick is that I need them to communicate with one another in different frames.
stumped
Meaddas
Swf Talking To Another Swf Label
Hello,
Here my problem: Since my movie is a little bit to large (543kb) I have decide to break the movie into 5 movies.
I want to be able to talk to other movies but inside one of my movie there are labels. How can I speak to the label x of my movie x when I am in the movie y.
Hope you will understand my problem.
Talking To Frames
I am starting to make a new version of my site and need help. I have difrent "pages" of the site which would be the diffrent companies we did business for. i want to be able to have an mc for each company,ex. COMPANY1 could be the first mc and there will be text boxes and swfs loaded externaly, so each dif company page can have a difrent layout. i will then place that mc into another mc which will be the SHOW page. each frame in the SHOW mc will be a difrent company, ex. frame one will be the COMPANY1 mc and frame 2 will have COMPANY2 mc. then, on the main the SHOW mc will be placed in the CURRENT mc. this is where you can see the first company. the problem is when you go from one company to another i want there to be a transistion. basicaly i want the CURRENT mc to become and mc called LAST, and that will go up, and a mc called NEW will contain the page about to come up, and that will have an up animation. then the NEW mc must become the CURRENT mc. i was wondering how i will be able to tell flash which frame the SHOW mc was on, that being the mc that contains all the mc of the difrent companies. i was wondering if i could do something like give each frame a variable, then on the main i could tell the button that says company 2 to have NEW mc equal the second frame in SHOW and mc LAST to equal the frame that was just CURRENT. im sorry this is so dragged out, but i think it seems simple. i just dont know how to do it. heres a quick summary of the mcs
main scene:
mcNEW(will be CURRENT), mcCURRENT, and mcLAST(was CURRENT)
|
mcSHOW(each frame is a company)
| |
COMPANY1, COMPANY2, etc.
(i hope that stays aligned)
i have also thrown together a sort of example swf that can be found at http://www.claysushi.com/flash/example.swf
basically im doing it this way because i want it to be very easy to update, i.e. when weve finished a new clinet, we can add them buy jsut adding a frame to the mcSHOW. if none of this made sense because you dont understand my problem, the problem is that lets say you were viewing company 4, and want to go back to company 2, company 2 will animate upwards like it was the next one, or else i could jsut have tell targets and gotoANDplay frame 1, 2, etc. thank you for anytime spent on reading this very long question and thanks so much if you are able to help.
Talking Between .swf Files
I have 2 .swf files sitting in 2 seperate frames of an HTML page. Is there a way to have one of the movies tell the other movie to gotoAndPlay a certain frame?
Talking To Other Swfs...
i have a movie... that is loading several different swfs... first i open one swf with _level1.gotoAndPlay("certianframelabel")then at the end of that swf you hit the next button and it opens level 2 swf, works just fine but I want to be able to go back to level 1 movie... but it just unloads all movies or puts it behind level 2... how do i achieve this... so i can back to level 1....
thanks in advance
Talking To Timelines
Thanks to many of you in this discussion forum, I have created a prototype (using Flash MX) for instructional tutorials. If I can solve one more problem, I'll have a fully working prototype!
My movie uses a movie clip for navigation. It has Restart, Previous, Next, and Go to End buttons. All of the buttons work fine with one exception (see below).
Here's what my main movie does (and doesn't do):
(1) Plays an introduction and then prompts the user to "Click to begin."
(2) User clicks Next, Movie1 (external swf) loads into a movie clip on the stage. User can click forward or backward to view different labeled frames in Movie1.
(3) In the last section of Movie1, if user clicks Next, Movie2 (external swf) loads into the same movie clip (replacing Movie1) and plays. User can browse this movie, too.
(4) At the end of Movie2, if user clicks Next, main movie takes over and displays a Menu Page that enables user to revisit any of the tasks demonstrated in any of the movies.
At this point, if I click the Restart button and go back to replay the main movie from the beginning, it plays the introductory material and prompts the user to "Click to begin" again. But this time, if the user clicks Next, the movie won't budge. It won't advance to the next frame and reload Movie1.
In testing, I find that if I skip the loaded movies and click "Go to End," then click "Restart," the movie plays fine. It's only when I have loaded the external movies that restarting the movie causes it not to advance normally. I've tried explicitly unloading them, but that doesn't seem to fix the problem.
I have also used the Debug command to watch variables and to see what's showing on the stage. I do use variables in all timelines, but I'm careful to target them. The only thing I note is that if I play the entire movie and then click Restart, the loaded movie sometimes shows and sometimes doesn't. I can't seem to isolate the problem.
If I can just get this movie to Restart and play without problems, I'll be done with this project.
I humbly seek advice...
Talking To Other Movies
hi | i'm having problems communicating with an external .swf and i can't seem to figure out why. i'm working off a main movie which calls several external .swf files.
in this instance, a button is the trigger from the main movie. i apply the following actions to the button:
_root.swiftholder.gotoAndPlay(120);
swiftholder is the instance name of an empty movie clip in the main movie. on the first frame of the main movie i apply the following action:
swiftholder.loadMovie("flash/3D.swf");
i want the button in the main movie to talk to the 3D.swf file and that's why i applied the first action:
_root.swiftholder.gotoAndPlay(120);
problem is that it isn't working. i believe the syntax is just fine but something else i've messed up. anyone have any ideas?
thanks. - matt.
Talking Scripts...
hi,
What im trying to do is to make my MC say the numbers randomly selected between 1 and 10..if th number is 4 let me hear it say "four" and "two for 2"...(using my *.wav" files already on my comp.)
thenks
Frame Talking
How can I change a variable of a swf from another swf in another frame of a HTML page?
I have one frameset called test.
There are two frames. Frame A and frame B.
In frame A, there is a swf called Af and in frame B a swf called Bf.
In swf Af there is a variable called Ok.
I need to set this variable to true from a button in Bf.
Hou could I do it?
Thanx
Talking With NaN Data
Hi everyone.
I made a calculator, but if the user put any letter in the fields that only must have numbers, display NaN in the results..Normal !!!
But my client want to display "Not right" in the place of NaN..
I think that was very easy to do.. But isn't
I did that:
function calc(){
re = c * all[p][s];
if(re == NaN){
return "Not Right";
}else{
return re
}
}
But, didn't work.... In the If I try re == false, re == "NaN"... But don't work... always display NaN..
Talking Between Timelines
hey guys, i got one for ya! i got a MC producing a random number and i want it to use that number to make another MC play for that ammount of frames, is that possible?
another thing, whenever i try dragging stuff from the library, flash stops responding, anyone know about that?
SWF Talking To SWF Across Frameset?
Hello, we buitl a site that uses seperate SWF's in various frames of a frameset, and I would like one to communicate with the other, mainly to set variables from one to the other, is this possible? If so, could someone please let me know how and/or where I could find more information?
Thank you,
Ben K.
ben@kaubisch.org
Talking Between Movies
I've loaded an external swf. Played it thru and then closed it. Upon closing it I'd like to jump to another frame in the movie beneath it, and I'm having trouble targeting the parent movie.
Talking Heads
I have two videos of a people talking to the camera, both are reading their script.
I want to make a flash file where one video is on one side of the screen, the other is on the opposite side and i want to be able to play a segment of one of the movies,then pause it, and start playing the other, back and forth...
Basically to look like a conversation is going on between the two videos. (eventually the videos may be replaced with animations, if they look better).
Any easy way to do this, or any suggestion of a better way?
Robert
Two Swfs Talking To Each Other
Hi there
Hokay, I have a main swf movie called 'main'. When this movie plays and gets to a label on the main timeline called 'pullin', we stop the playhead on the main time line playing and then pull in the swf called 'external' that plays within the 'main' swf.
The think I want to do is for the 'external' swf to play and when it finishes it tells my 'main' swf to continue to play.
I hope that I have explained this correctly...
Many thanks in advance
TASvinO
Talking Site Pal
Hello everyone,
I recently visit a site that had a talking person (navigator) on it. You anyone know how I can get into this maybe find some tutorials.
Here is the URL:
http://vhost.oddcast.com/vhost_minis...ex.php?email=1
I Am Having Trouble Talking To A MC
I am having trouble talking to this MC from the main time line.
The clip has an instance of "block".
Here is the script in the first frame of the clip.
-----------------------------------------------------
stop();
_level0.blockAbs = this;
// Set block dimensions
var blockWi = 350;
var blockHi = 300;
var blockWiHi = blockWi+blockHi;
var pivotY = blockHi/2+blockWi;
var blockColor = 0xF9FBFF;
-----------------------------------------------------
After the MC is loaded I want to change the width and height.
I have tried to reference the MC by:
_root.block.blockWi = 200;
_root.block.blockHi = 200;
That didn't work so I tried:
_root.blockAbs.blockWi = 200;
_root.blockAbs.blockHi = 200;
and that didn't work.
What am I doing wrong?
Thanks
www.e4net.com
www.tobymack.com
Walking Or Talking
I am new to this site, so forgive me if this is a question that was already asked.
What I am tring to do is create a cartoon in flash.
1. Is it possible to build a character and lock the arms and legs on the body with pivit points? So, if I move the arm up, it says in the sholder on the body and moves up like an arm. Same thing for the legs (but not on the sholder).
2. I am tring to animate my character talking. I have the head, mouth, eyes, and sound as seperate layers. Is it possible to flatten the layers in Flash so I could add it to my library and then put the talking head on my body?
Maybe there is a simple cartooning tutorial out there. Please direct me oh great masters of Flash in the right direction.
Talking Characters
Hi all..
I need software like Flipz MX Composer.
Flipz don't sell there software anymore.
Can any one tell me what software I can use instead ?
Or if you have a registred version of Flipz MX Composer, I can buy ?
Regarts
Henrik
Talking Animation
I am preparing a presentation where I require a talking animator like one provided by www.sitepal.com. However the problem is that sitepal supports this over internet whereas where I will be presenting I dont have internet. From where can i get talking animation free of cost to be integrated to FLASH.
Also Is free text to voice converter avaialbe over net ?
Talking Head
I'm trying to create a pull string or wind up doll effect. I can't find one anywhere. basically you pull a string and it says a random sound. Has anyone seen this or does anyone know how it would be done?
thank you
Swfs Talking With Another
I have a html, that have 2 swfs, inside, one in the top an another in the bottom of the page, i want that the one swf talk with another.
How???
Talking Between Two Movies ...
I have this menubar that when clicked loads an animated submenu. Now this submenu is a completely separate movie and I would like to write this so that when the submenu item is clicked it loads a certain frame from the original movie. Here's where I am ... I don't know how to do that. Is there some kind of gotoAndPlay or Stop function whee you can point to a separate movie? If anyine can pitch me a hand that'd be great. Thanks.
-Bryant
»» Two Flash Talking Together ««
This is something I wanna do with a webpage made in frames.
One top frame and another one on the bottom.
Each one contains a different swf files... Is it possible for them to exchange information together?
One Flash would be "Invisible" and it would send variables to the main one on the Top frame...
Is it complicated? Is it something Explorer and Netscape can handle (PC and Mac).
I've made my search and cant find anything about Flash talking to another in a Frame based webpage.
Talking To Applets
This is probably a really silly question but is there any way to make a flash file and applet talk to each other on the same page?
SWF Talking To HTML
Does anyone know the AS to get a button to talk to html via variables?
I need this for a menu, so on release the button will show which page you are on ..
Talking Villagers
Can anybody help me, im kind of new to flash and im making this little village and i want to make it that when you walk over a villager a speach bubble appears saying something like "get out of my shop" i searched all of the tutorials and cant seem to find anything that helps.
I am using FLASH MX 2004
Talking To Variables
hi all!
i have a problem thats driving me mad...
i have a swf (swf2) that has been loaded into my main mc (swf1) using loadMovie
i have an mc in swf2 that needs to talk to a variable in the top layer in swf1.
i have this code on it:
onClipEvent(enterFrame){
if (_root.myVar == "on" && _currentframe < 3){
trace ("its on");
_root.mc1.gotoAndPlay(3);
}
}
i just cant get it working
any suggestions?
Talking To Another Class
i am still trying to wrap my head around as3/oop logic- say i have an interactive image on the stage...it is its own class (BigImage), with private functions to do different things. Depending on what you want, you can shrink it, tweek it, move it, etc.... Behind it, i have an MC , also it's own class (BackDrop), designed to respond to this images changes (scale, alpha, etc)---if, for example, i drag the image, BackDrop mc, will follow. At present, my logic was to set up public function s on the BackDrop mc , and then from the BigImage class, call these as they are necessary. So, for example, i have a public function on the BackDrop that states:
Code:
public function positionMe(wd:Number,ht:Number):void
{
this.readyHeight=false;
this.readyWidth=false;
this.finalW=wd;
this.finalH=ht;
this.alpha=0
this.x=stage.stageWidth/2
this.y=stage.stageHeight/2
this.addEventListener(Event.ENTER_FRAME,rebuild)
}
and then from BigImage, on a click, drag, or whatever, i have :
Code:
private function fadeIn(e:Event):void
{
this.newW=maxW;
this.newH=maxH;
bd=BackDrop(stage.getChildByName('backdrop'))
bd.positionMe(newW+10,newH+10)
}
i get this feeling there is a more oop way of doing the same thing....there's a voice in my head saying eventListeners and dispatchEvent -so, before i start really bad habits, can someone guide me the right way, and also tell me why this the wrong way?
ps- i already read this http://board.flashkit.com/board/showthread.php?t=743340
and i am browsing oop related articles after i click submit new thread....just asking the above to help the learning curve
How To Get AS3 Talking To JQuery?
Hi everyone,
The code below does the following - when you click on next it goes to step 2 which replaces step 1. This works but the problem I have is when I add the anchor like "2" on a flash button it goes to an empty page. What I want to know is how can I add this JS code into my Flash AS3 file so when I click on the flash button next it goes to step 2 instead of an empty page?
Code:
<script src="js/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
function loadnext(divout,divin){
$("." + divout).hide();
$("." + divin).fadeIn("slow");
}
</script>
.hide {
display:none;
}
<div style="position:relative;" class="1">
step1
<a class="next" onclick="loadnext(1,2);">Next</a>
</div>
<div class="hide 2" style="position:relative;">
step2
<a class="next" onclick="loadnext(2,3);">Next</a>
</div>
This is the AS3 that is on my flash
Code:
button:button1.addEventListener(MouseEvent.CLICK, myButtonFunction);
function myButtonFunction(event: MouseEvent) {
var request:URLRequest = new URLRequest("2");
navigateToURL(request, "_self");
}
URLRequest thinks 2 is a new page but it should just go to the jQuery anchor "2".
I have tried adding an anchor like <a name="2"> but for some reason it still couldn't find it..
Please can someone help?
|