ActionScript 2.0 :: OnClipEvent Loading XML Data Into A MC?
Sep 19, 2007
I have a Movie Clip on my time line that has an empty movieclip inside it which I whish to load a random external SWF file into. There is to be an unknown number of SWF's to load in and these are to be played one after the other. So when the first random SWF is finished playing the next random SWF is to start playing.
Here is the hierarchy of my file
Code:
|_ Timeline
|_ plasmaScreen_mc
|_ emptyMovieClip (instance name advert)
So on my empty movie clip I have an onClipEvent which loads in the file path of the External SWF from an XML file and tries to load the extrernal file. Here is my code
Code:
onClipEvent(enterFrame)
{
if(this._currentframe == this._totalframes)
{
[code].....
Unfortunately because the code for getting data from the XML file is included in the onClipEvent "this" now refers to the XML data and not the movieclip. Can anyone tell me how I can proceed. I need to pass the filename to movieclip.
View 1 Replies
Similar Posts:
Mar 1, 2010
I'm trying to load XML data after an hitTest but doesn't work the way I'm programming. Here is the source code:
onClipEvent (enterFrame) {
if (_root.ster1_mc.hitTest(_root.rocket)) {
trace("raak");
function loadXML(loaded) {
[Code] .....
When I use the XML code simple on a button it works perfect but after my hitTest it's doing nothing... When I remove the function it say's undivined in the textarea.
View 1 Replies
Apr 2, 2010
It's a very basic comments form with only 3 fields, the information gets sent directly to a email address through PHP.
The form works perfectly, sends all the information to my email, but my problem comes in when I try to run a onClipEvent(data) handler to go to a "Thank you" page when the information's been sent.
The onClipEvent(data) handler runs on the form movie clip and works fine when I run it on my local drive, but when I run it through the website it never executes. The form just get sent and it stays on the same frame.
I'm getting headaches from this because it looks like all the codes are working fine, it just doesn't want to run the damn handler!
View 0 Replies
Dec 18, 2003
I'm having an odd issue with this onClipEvent friend... In the main timeline, I set a variable like so:
[Code]...
And when it occurs, I get back LOADING FLAG IS: true, and that's fine too. Then, on the object I have the image loading into, I have the following:
[Code]...
And indeed, when the image loads, I get the trace statements, BUT though it traces, it does not redefine loadingFlag! also, the second trace statement comes up as IMAGE LOADING FLAG IS: with no value afterwards... Is there something with onClipEvent(data) where even though it's attached to a nested movieclip, it doesn't refer to the _root?
View 1 Replies
Sep 1, 2010
I am trying to change the images the following calls up. (Using CS4 and AS 2.0)
onClipEvent (load)
{
imageProperties = _root.getCurrentImageName(0);
loadMovie(_root.url + imageProperties.name, this.cont.pic);
[code]....
I get that I could find the image in the directory and just change it out with the same name/pixel size, but I'd also like to add more images to this particular project with the same conditions.
View 1 Replies
Dec 12, 2005
The probem is I have an external swf file that loads a mailer. everything works fine apart from the fact that when the data is sent to the php file this command wont respond. It works on my local but once on the server it dont go.I think that the problem might be that MC (goin) is the MC that this code is located in?
onClipEvent (data) {
_root.goin.gotoAndPlay(12);
}
View 1 Replies
Aug 26, 2004
How would you write this into a function that lies on frame 1:
onClipEvent(data){
this.sendSent.text = "MESSAGE WAS SENT";
this.textEmail.text = "EMAIL";
this.textSubject.text = "SUBJECT";
this.textName.text = "NAME";
this.textMessage.text = "MESSAGE";
}
View 1 Replies
Sep 1, 2010
I am trying to change the images the following calls up. (Using CS4 and AS 2.0)[code]Where is the getCurrentImageName calling the image up from? or..Where is the imageProperties.link ToOpen pointing to?Honestly, I get that I could find the image in the directory and just change it out with the same name/pixel size, but I'd also like to add more images to this particular project with the same conditions.I'm probably one of those girls that knows enough to cause more damage than good, so at least point me in the right direction.
View 1 Replies
Sep 1, 2010
I'm a flash newbie and I am trying to change the images the following calls up. (Using CS4 and AS 2.0)
onClipEvent (load)
{
imageProperties = _root.getCurrentImageName(0);
[code].....
View 1 Replies
Jan 6, 2005
I'm using the code contains onClipEvent(load) and onClipEvent(enterFrame) and duplicateMovieClip() to make the snowing effect in the 2 first movie-clips but then, i cannot stop them in the next movie-clips. (All of my movie-clips in 1 scene only.)
View 1 Replies
Aug 17, 2009
I developing a site where on the homepage, there are about 6 images that rotate, but if you click on a sub link, a different image loads. But the problem is that, the first image has to cycle through before the second image loads. I want the second image to load immediately.
[Code]....
View 1 Replies
Aug 10, 2008
Loading data from the test.php into the startLoading();
How do I load the data from test.php "echo $photo_out;" into the startLoading();
loadVariables("test.php", this, "POST");
infoField._visible = true;
startLoading(test.jpg);
[Code]....
View 16 Replies
Sep 24, 2006
I have read through Shared Objects but i couldn't get it work...
I just have to save my data, maybe array into .txt file and later on
retrieve from the same .txt file...
Anyone here have an example or some source code so i can have reference on it?
View 6 Replies
Jan 26, 2008
I am attempting to get data from an xml file load in flash. I followed a tutorial in a new fla and it seemed to work fine, I then tried to adapt it to my own needs which worked fine. But then when trying to implement this into my news section it doesn't seem to work. I am trying to make a news section, that displays the date and news article. This is in within a movie clip, I even tried putting it in the timeline of the scene but still nothing.
- I have 2 dynamic text boxes, date_txt and news_txt
- The xml file is named news.xml,
- both the fla and the xml are in the same folder
This is the actionscript I am using:
function loadXML(loaded) {
if (loaded) {
_root.thedate =
[Code]....
View 1 Replies
Mar 1, 2010
I'm trying to load XML data after an hitTest but doesn't work the way I'm programming. Here is the source [code]...
View 2 Replies
Jan 6, 2006
I have 2 images that I want to swap places on a certain frame in my animation. I've been messing with it for quite sometime now and I can accomplish one of two things. Either the animation goes smoothly and the images don't swap depths or the images swap depths and the animation hangs.
View 6 Replies
Mar 17, 2006
I need to have an mc duplicate itself under its own onClipEvent(load) handler. To put it perhaps more clear, something like:
onClipEvent(load) {
//clips duplicate itself
}
I have tried all sorts of combinations of _root.clip.dMC, this.dMC,
View 4 Replies
Aug 28, 2009
I've put together some code to allow the user to rotate a clock hand around the clock by dragging it round. My code isn't working.
Code:
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
arrowDrag = true;
}}
onClipEvent(mouseMove) {
if (arrowDrag == true) {
[Code] .....
View 3 Replies
Feb 20, 2012
I have a file where user chooses xy cordinates which display in text box.... which is workin, but I want to have it only appear inside a box area? ie choose once only inside box area - once outside i want the mouse to behave as normal (no new pointer no xy tracking) not sure what if statement would work ?
onClipEvent (mouseDown) {
duplicateMovieClip("../cue", "cue" add n, n);
setProperty("../cue" add n, _x, getProperty("_level0",_xmouse));
[Code]....
View 3 Replies
Oct 23, 2009
I've this script that works fine:
onClipEvent(mouseDown ){
_root.orange1anm.orange1.play();
}
I've been trying to change it to a rollover instead of a click and nothing seems to work.
View 2 Replies
Jun 16, 2010
This is my AS code:
onClipEvent (enterFrame) {
this._x = Math.random()*2+90;
this._y = Math.random()*2+60;
this._alpha = Math.random()*30+50;
}
It is applied to the movie clip. I am having trouble figuring out how to STOP to action. I want it to stop after 10 seconds. How do I do this?
View 2 Replies
Jan 4, 2009
I am just learning Flash. I'm using Flash CS4, However I am using Actionscript 1.0/2.0. I have a main page with just simple buttons, and such. My question is, I need to load a swf within my main page. I have a sqaure in the center of my page that I want to load a swf in. I made a rectangle using the rectangle tool, and converted the rectangle into a symbol so that actions may be placed within it. I want to load a file called News.swf within the rectangle. I can't find any code to do this that doesnt have compiler errors.
I found one code: News.loadMovie("News.swf"); when I put just that in the Actions field, and I export the movie I get the error: Statement must appear within on/onClipEvent handler
I just want to load News.swf in the actions tab within a symbol.
View 9 Replies
May 28, 2010
I have two movieclips that determine their frame number by a variable. The problem I'm having, though, is that the frame doesn't change when the variable changes. The original variables are determined in the main timeline (_root.item_slot1= 0;).The following code is contained in the item_slot1 movieClip:[code]So it starts off in frame 1. If I change the original variable to 1, then it will go to frame 2. However, the frame doesn't change when the variable changes, and I have a text box that shows the value of the variable, and it changes to 1 exactly when it's supposed to.I can't zip files, but I have the .fla at URL... if you can get it to download from there.
View 7 Replies
Aug 6, 2002
I am using loadmovie to load a separate .swf file into a movie clip which is on my main file time line. Is there anyway I can use Onclipevent () to preload the movie I am loading in?
View 15 Replies
Jun 10, 2005
Is there a way to remove an onClipEvent? I'm using onClipEvent(mouseDown) but this has to stop after an other event in the swf...
View 6 Replies
Jul 2, 2005
Code:
//this is one of the code pieces I've been trying
scroll_menu.onEnterFrame = function() {
var speed=.5/100;
var xcenter=400;
[code]....
View 1 Replies
Dec 4, 2005
I want to duplicate an MC every 5th second, so I came up with this code:
Code:
i = 100;
p = 0;
onClipEvent(enterFrame){
[Code].....
I know this doesn't work, because onClipEvent only works on buttons or MCs. So the question is: is there an onTimelineEvent or something that'd work on the timeline?
View 4 Replies
Mar 26, 2006
i remember there is a actionscript tat u can set on the timeline instead on the movieclip itself - onClipEvent(enterFrame){} what the code for it for the timeline.
View 1 Replies
May 9, 2003
1. If I have a 'fish' drawing, and I want to produce bubbles at its mouth, how will I know where its mouth is through Actionscript?
In general, if I have a complex drawing and I want to identify a single part how do I do that using actionscript? This complex object could be an octopus. Then, how do I locate the arm number 3(an octopus has 8 arms?) of the octopus?
2.How do I exit from onClipEvent() when a condition is met? For eg, in VB I have the exit function but there is no EXIT function in flash 5 from which I can exit whenever a condition is met?
View 3 Replies
Sep 8, 2006
why it isn't working, or what I'm doing wrong to fix it. maybe I have the right script, but the wrong location. I'm also on Flash 8, by the way.example. I have the movie clip labeled "characters" on the main timeline. in that movie clip I have one movie clip titled "boy" and another one titled "girl". the "boy" movie clip is lip-synced and talking up a storm with some audio, and somewhere down the line, "girl" movie clip is introduced and is also supposed to speak on the frame I labeled by the same name, "speak". I'm trying to specifically target a certain frame in her movie clip timeline to play, but I just can't get it right.what I do have is:
onClipEvent (load){
_root.characters.girl.gotoAndPlay("speak");
}
now I know I could also have:
this.gotoAndPlay("speak");
I've tried placing the script directly on the "girl" movieclip when I want the event to happen, and then also placed the script on its own actionscript layer, but somehow, it just isn't working correctly.like I said, "boy" is chatting up a storm, and let's say something like frame 200 is when I want "girl" to come in with her line, that specific audio frame within her movieclip timeline labeled, "speak". she also has about 6 other speaking cues that I'm trying to call up to coincide with movieclip "boy" while he talks.
View 1 Replies