OnClipEvent Inside External Swf Targeting
I've been asked this question several times and don't have an answer so I'm hoping someone can shed some light on this for me. People using the form mailer decide to load it externally and when they do they discover that the form won't go to the "thank you" frame. The onClipEvent (data) I assume fires but then you have
ActionScript Code: _root.nextFrame(); which works fine when the external is tested as the main movie. Now, I've tried using
ActionScript Code: this._lockroot = true; on the main timeline of the external swf and that didn't work. What is the secret to firing an onClipEvent inside an externally loaded swf?
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 12-08-2006, 07:49 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
OnClipEvent Inside An External Movie Targeting Issue
I've been asked this question several times and don't have an answer so I'm hoping someone can shed some light on this for me. People using the form mailer decide to load it externally and when they do they discover that the form won't go to the "thank you" frame. The onClipEvent (data) I assume fires but then you have
ActionScript Code:
_root.nextFrame();
which works fine when the external is tested as the main movie. Now, I've tried using
ActionScript Code:
this._lockroot = true;
on the main timeline of the external swf and that didn't work. What is the secret to firing an onClipEvent inside an externally loaded swf?
Targeting MC Nested Inside External Swf
Hi, guys.. a lil' help here, Please..
I'm trying to target a MC nested inside external swf.
Here is my case:
I have a button inside this movie call Movie1.swf
and i want this button to target a MC nested inside the external swf call Movie2.swf (which i loaded to an empty MC of the Movie1.swf with the 'loadMovie' to target).
I named the empty MC with the instance name 'holderMC'
and the MC of the Movie2.swf 'myClip'.
Anyway, i'm trying to get the 'myClip' MC to play when the button is clicked.
I know that i have to target them using their Instance names.
But i have tried so many ways & i just can't get to it.
I can only get to the root of the external swf but not the clip inside it.
So, can anyone out there gimme a lil' direction or write a bit of script sample maybe..? Any help at all would be greatly appreciated.
Thank U
Targeting MC Nested Inside External Swf
Hi, guys.. a lil' help here, PLEASEEE...
I'm trying to target a MC nested inside external swf.
Here is my case:
I have a button inside this movie call Movie1.swf
and i want this button to target a MC nested inside the external swf call Movie2.swf (which i loaded to an empty MC of the Movie1.swf with the 'loadMovie to target').
I named the empty MC with the instance name 'holderMC'
and the MC of the Movie2.swf 'myClip'.
Anyway, i'm trying to get the 'myClip' MC to play when the button is clicked.
I know that i have to target them using their Instance names.
But i have tried so many ways & i just can't get to it.
I can only get to the root of the external swf but not the clip inside it.
So, can anyone out there gimme a lil' direction or write a bit of script sample maybe..? Any help at all would be greatly appreciated.
Thank U
Targeting MC Nested Inside External Swf
Hi, guys.. I'm a new member here.
So, "Hello everybody.."
Anyway, I need a lil' help Pleasee..
I'm trying to target a MC nested inside external swf.
Here is my case:
I have this button inside this movie (Movie1.swf)
and i want it to target a MC nested inside an external swf (Movie2.swf).
This is what i did. I load the Movie2.swf into an empty MC of the Movie1.swf with the 'loadMovie' (to 'target' not 'level').
I gave an instance name of "holderMC" for the empty MC (holderMC is inside Movie1.swf)
and an instance name of 'myClip' for the MC inside the Movie2.swf.
Anyway, i'm trying to get this "myClip" MC to 'gotoAndPlay' certain frames of it when the button inside the master movie (Movie1.swf) is clicked.
I know that i have to target them using their Instance names,
and i have tried so many ways but i just can't get to it.
The most i can get to is the _root of the external swf (Movie2.swf),
but i can not get to the clip inside it.
Anyone have any ideas HOW TO?
Please.. I'm lost here.
Any help at all would be greatly appreciated.
Thank U
Targeting Inside An External Clip ? Noob Help
Hey everyone.
Just wondering how do I target a button instance inside a mc that I load in externally....
1. Here's how I load the clip in....
Code:
var mcl_G1:MovieClipLoader = new MovieClipLoader();
var mclL_G1:Object = new Object();
mclL_G1.onLoadProgress = function(target,loaded,total) {
loader_G1.percent_G1.text = Math.round((loaded/total) * 100) + "%";
}
mclL_G1.onLoadInit = function() {
loader_G1._visible = false;
loader_G1.percent_G1.text = "";
}
mcl_G1.addListener(mclL_G1);
this.b1.onRelease = function() {
loader_G1._visible = true;
mcl_G1.loadClip("JROSS_G1.swf",holder_G1);
}
2. And here's how I've been trying to load in other swfs in parallel using a button inside the first loaded ext mc...
Where does the external mc filename come into the targeting? Knowing that JROSS_G1.swf is the ext file and b_020 is the button I'm trying to target ??
Code:
//
var mcl_P1:MovieClipLoader = new MovieClipLoader();
var mclL_P1:Object = new Object();
mclL_P1.onLoadProgress = function(target,loaded,total) {
loader_P1.percent_P1.text = Math.round((loaded/total) * 100) + "%";
}
mclL_P1.onLoadInit = function() {
loader_P1._visible = false;
loader_P1.percent_P1.text = "";
}
mcl_P1.addListener(mclL_P1);
this.loader_G1.JROSS_G1.panel.b_020.onRelease = function() {
this.loader_P1._visible = true;
mcl_P1.loadClip("020.swf",holder_P1);
}
Anyone?
Targeting: OnClipEvent Vs. OnEnterFrame
Ok, I'm having a targeting problem (and I'm sure it's a syntax issue, but anyway...):
if I have 2 instances of a movie clip on the stage. One has an instance name of controller and the other has an instance name of moveMe.
If I put this code on the controller MovieClip it works:
ActionScript Code:
onClipEvent(enterFrame) {
_parent.moveMe._y -= 1;
}
every frame the moveMe movieclip moves up one pixel...
but now, if I remove that code, and on the main timeline on a blank frame I add the following code (which should do the same thing, I thought):
ActionScript Code:
controller.onEnterFrame = function() {
_parent.moveMe._y -= 1;
}
the moveMe movieClip does not move. I could replace the _parent with a _root and have it work, but if this clip is loaded into another movie that would cease to function. I need a relative path to the object....
could someone tell me what I'm doing wrong? Thanks...
EDIT: I'm doing this in Flash MX 2004
Targeting The OnClipEvent Handler
Hi, Im trying to write a script into an external file and including the file on the first frame. But if I try to ad onClipEvent ( mc.onClipEvent (enterFrame) {}) it doesnt seem to work! Can I write the onClipEvent remotly without having to place the script on the actual mc?
thanks
If Statement Inside Onclipevent
Hi,
Just wondering why I can't put an if statement inside an onClipEvent(load) - such as the code below.
onClipEvent(enterFrame) {
if (5 > 2) {
_parent.hitred(hit1, hit6, 1, 1, "dot1");
}
}
In my code the if statement is obviously slightly more than just 5>2 I just simplified it down for the purpose of this question. The code works fine if I just remove the if altogether, but I need it in there.
Thanks
If Statement Inside OnClipEvent
Hi,
Ive got a problem that I can't figure out. The following code works fine and I get the output "test" in the output window.
onClipEvent(load) {
_visible = true
}
onClipEvent(enterFrame) {
if (_visible = true) {
trace("test")
}
}
---However, if I change it to :
onClipEvent(load) {
_visible = false
}
onClipEvent(enterFrame) {
if (_visible = false) {
trace("test")
}
}
---I don't get any output at all - I've tried replacing the _visible bit with _alpha = 100 or _alpha = 0 but I get the same problem. Hopefully there is something really simple I am missing.
Thanks
OnEnterFrame Inside OnClipEvent?
Hey all! I'm trying to make a preloader (dynamic number preloader, not bar) to place over my emptyclip that I will be loading my swf files into (for my portfolio items. I was wondering if the way to do this would be to attach the following code to the mc that houses the dynamic text file (so it will tell me the status of the loadMovie within emptyClip_mc):
ActionScript Code:
onClipEvent(load){
emptyClip_mc.onEnterFrame = function(){
totalBytes = Math.round(_root.holder_mc.getBytesTotal() / 1024);
loadedBytes = Math.round(_root.holder_mc.getBytesLoaded() / 1024);
percentDone = Math.round((loadedBytes / totalBytes) * 100);
loadingText_mc.loadingText_txt.text = percentDone;
}
}
Is this the right idea? It's not working in showing the progress -- it's just showing 100 instead of showing the gradual load. Any ideas why? Thanks!
If Statement Inside OnClipEvent - EnterFrame
Can you put an if statement inside an onClipEvent (enterFrame) handler like so:
Code:
onClipEvent (enterFrame) {
if (preLeed == true;) {
loading = _parent.cover_mc.getBytesLoaded();
total = _parent.cover_mc.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
loadBar._width = per * 2;
if (percent > 99) {
_global.preLeed = false;
_root.holder1_mc.preloader_mc._visible = false;
_parent.cover_mc.gotoAndPlay("begin");
}
}
}
-Foochuck
Targeting From Inside A MC
I have a MC with buttons that on press should go to frame # and play.
The buttons were working fine when placed on the main stage but when moved to the movie clip it won't work.
I know it is a targeting problem I just don't know how to fix it.
Can anybody give me a hint?
Thank in advance,
FayeC
Targeting A Mc Which Is Inside Another
Hi, i wanna learn how can i do this:
When i press a movie clip, i want it to activate "A1" movie clip which is inside "A" movie clip.
So on the scene stuff is arranged like that:
root->A->A1
can anyone help me?
Targeting A Mc Which Is Inside Another
Hi, i wanna learn how can i do this:
When i press a movie clip, i want it to activate "A1" movie clip which is inside "A" movie clip.
So on the scene stuff is arranged like that:
root->A->A1
can anyone help me?
Targeting Inside Scrollpane
I've got a scrollpane placed on the main timeline. It's instance name is "thumbScroller".There is a movie clip inside the scrollpane and it's instance name is "tnailStrip". There is a movie clip inside that movie clip with the instance name "stripOne". There is again a movie clip inside that movie clip with the instance name "pb1".
I want to reference that "pb1" from the main timeline. What is the path? It seems like it should be:
_root.thumbScroller.tnailStrip.stripOne.pb1
but that doesn't work. How do I do it?
Targeting A Mc Inside A Button
Hi,
I'm having problems with targeting a movieclip inside a button. What i want to do is play the last half of a movieclip nested in the "over" state on the button when the user rolls out of the button. I have marked the 2nd half of the mc with a flame label, but cant seen to target the frame correctly. What script should i use to do this?
scene name = "main"
button name = "homeButton"
movieclip name = "homeOver_mc"
flame label = "rollOutHome"
Targeting Inside/outside Instances (F8)
Alright, no matter what I try, when I try to target an instance that exists within an instance, it doesn't work. Someone please tell me how.
Or, likewise, how can I target something outside the parent instance? I need that too.
Targeting An MC Inside A LoadMovie
Currently I'm using the following script...
_root.createEmptyMovieClip ("bg", 1);
_root.bg.loadMovie ("pictures", "pictures", 1);
...to create an MC in which to load an .swf file. Everything works as planned, but can I target an MC within the newly loaded "pictures." For example, can I target the MC "dog" that is located in the .swf "pictures" that was loaded into the empty MC "bg"?
Targeting Frames Inside Mc's From .as
using this code:
PHP Code:
package {
import flash.events.*;
import flash.display.*;
public class mainMenuMC extends MovieClip {
public function mainMenuMC() {
// Event Setup.
test2.artist_btn.addEventListener(MouseEvent.CLICK,navigationClicked);
test2.contact_btn.addEventListener(MouseEvent.CLICK,navigationClicked);
test2.gallery_btn.addEventListener(MouseEvent.CLICK,navigationClicked);
test2.web_btn.addEventListener(MouseEvent.CLICK,navigationClicked);
}
// Event Handlers.
private function navigationClicked(Event:MouseEvent):void {
var frmLabel:String='';
switch (Event.target) {
case test2.artist_btn :
frmLabel="artist_frm";
break;
case test2.contact_btn :
frmLabel="contact_frm";
break;
case test2.gallery_btn :
frmLabel="gallery_frm";
break;
case test2.web_btn :
frmLabel="web_frm";
break;
}
MovieClip(root).gotoFrame(frmLabel);
}
}
}
the frames are labelled inside test2, test2 is inside mainMenuMc.
i thought it would be like actionscript where i could use:
MovieClip(root).test2.gotoFrame(frmLabel);
but this brings up:
PHP Code:
ReferenceError: Error #1069: Property test2 not found on portfolio and there is no default value.
at mainMenuMC/navigationClicked()
any ideas?
Targeting Inside Instances
Alright, no matter what I try, when I try to target an instance that exists within an instance, it doesn't work. Someone please tell me how.
Or, likewise, how can I target something outside the parent instance? I need that too.
Targeting A Variable Inside A MC?
I have a movie clip called curtain_mc with this actionscript inside:
onClipEvent (load) {
stop();
f = false;
}
onClipEvent (enterFrame) {
if (this.f == true) {
this.nextFrame();
} else if (this.f != true) {
this.prevFrame();
}
}
On my first frame I have this:
play_btn.onPress = function() {
btnHandler();
};
var btnCounter = 1;
function btnHandler() {
if (btnCounter == 1) {
_parent.curtain_mc.f = true;
btnCounter++;
trace(btnCounter);
} else if (btnCounter == 2) {
_parent.curtain_mc.f = false;
btnCounter = 1;
trace(btnCounter);
}
}
I would like to change the variable 'f' from true and false by clicking a button but the actionscript on my keyframe doesn't recognize the actionscript in my movieclip?? I know its a targeting issue, but not sure how to alter it in order for the two to talk to each other??
Targeting Mc Inside Of A Loop
I have this loop as part of the timeline of an swf loading into a parent movie:
Code:
var TNsHolder1 = this.createEmptyMovieClip("TNsContainer1_mc", this.getNextHighestDepth());
var maxTNsInRow = 6;
var TNsWidth = 0;
var TNsHeight = 0;
for (var i:Number = 0; i<=(_root.artTNsArray.length-1); i++) {
var TN = TNsHolder1.createEmptyMovieClip("TN"+i, TNsHolder1.getNextHighestDepth());
var TNt = TN.attachMovie(_root.artTNsArray[i], "TNpic"+i, TN.getNextHighestDepth());
var TNb = TN.attachMovie("boxFrame", "boxFrame"+i, TN.getNextHighestDepth());
TNt._alpha = 100;
TNb._alpha = 100;
TN._x = TNsWidth;
TN._x = TN._x;
TN._y = TNsHeight;
TN._y = TN._y;
if (i == maxTNsInRow-1 || i == ((maxTNsInRow*2)-1) || i == ((maxTNsInRow*3)-1)) {
TNsWidth = 0;
TNsHeight = TNsHeight + (TN._height) + 10;
} else {
TNsWidth = TNsWidth + (TN._width) + 10;
}
TN.id = i;
TNsHolder1["TN"+TN.id].onRollOver = _root.boxOvrIn;
TNsHolder1["TN"+TN.id].onRollOut = _root.boxOvrOut;
TNsHolder1["TN"+TN.id].onRelease = _root.TNtPress;
};
The functions it is calling (_root.boxOvrIn, etc) are located on the timeline of the main (parent) movie:
Code:
function boxOvrIn() {
var tnZoomXIn_Twn = new Tween(this, "_xscale", Regular.easeOut, this._xscale, 107, .2, true);
var tnZoomYIn_Twn = new Tween(this, "_yscale", Regular.easeOut, this._yscale, 107, .2, true);
var tnZoomAOut_Twn = new Tween(this, "_alpha", Regular.easeOut, this._alpha, 50, .3, true);
}
Here's my dilemma,
"this" (in the function) is referring to what in the loop is declared as TN. That is fine and works as it should. How do reference TNt and TNb (both nested inside of TN)? Using this.TNt doesn't seem to do it. It appears the function only knows that this=TN but nothing beyond that...
any ideas?
Targeting M-clips Inside ScrollPanes
Hi
I'd like to know if there is any way to give a movie clip loaded into a scroll pane an instance name - so you can target objects inside it from other parts on the stage?
I've got a movie clip "Script Boxes_mc" made up of text boxes with the Scroll Bar component attached to each.
This movie clip "Script Boxes_mc" is loaded into a Scroll Pane Window via the linkage ID in the Library. [ linkage ID is also "Script Boxes_mc" ]
the Movie clip loads "Script Boxes_mc" fine but without the scrollbars attached to the text boxes.
I've tried targeting the text box from the scroll bar componet through the parent clip eg. ScrollPane_mc.Script Boxes_mc.textboxA
But I havent obviously named the instance of "Script Boxes_mc" that is loaded into the Scroll Pane.
Is there a way to do this, or is there something else going on - like problems embedding components within others??
Hope this makes sense! I'll keep on truckin with it anyway!
Cheers
Robyn
Targeting Button Inside Attached MC
If I've got an invisible MC on the main timeline with the instance name "invisMC" and I've attached a MC and created the instance name "attachedMC" and that MC contains a button with the instance name "yesButton". Can I target that button from the main timeline. The route I tried didn't work. This is what I thought:
Code:
_root.invisMC.attachedMC.yesButton
Targeting Inside A Scroll Plane
Ok I have a movie clip inside a scroll plane. I also have a menu which I want to target the movie clip.
how should I do this?
_root.scrollplaneInstance.movieInstance....
Is this right?
as it doesn't seem to work.
Targeting Components Inside A Scrollpane
targeting components inside a scrollpane is really what I would like to do. is there a way to target a specific part of my MC contained in my scrollpane?
example:
i have 10 paragraphs of text in a MC which is called up in a scrollPane and I want to target specific paragraphs in the MC using buttons (button 4 would bring paragraph 4 up tp the top of the scrollPane (similar to anchor tags in HTML)
I don't know what I am doing wrong:
on (release) {
_root.color.textContainer.textOne.scrollBarAsset.s crollTrack_mc.setScrollPosition(10);
}
or what is the best way to acheive this
Targeting A Label Deep Inside Other MCs
Using MX2004 Pro.
Can someone either tell me what I'm doing wrong, or point me to a thread?
I have the following setup:
_root.scrollPaneInstance.containerMC.contentMCInst ance
I want to target a specific frame in contentMC by pressing a button on the main timeline.
My button on the main timeline has the following code:
Code:
on(release){
gotoAndPlay("_root.scrollPaneInstance.containerMC.contentMCInstance.frameLabel)");
}
How do you enter a long path when the correct usage for gotoAndPlay is gotoAndPlay(framenumber) or gotoAndPlay("framelabel") ?
I've searched the board and found similar things but nothing seems to be working.
TIA.
Neumy
Targeting From Inside A Graphic Element.
I have a button inside a graphic element. This is present on all scenes of my movie.
Then I have a MC which is found on scene "home", frame label "portfolio02". The instance name on stage of that MC is "mcport". Inside this "mcport" I have a frame label "fashthumb"
Is it possible to target that frame label "fashthumb" within the MC (instance name on stage) "mcport" found on scene "Home", frame label "portfolio02" from the graphic element found on every scenes of the movie?
What code should I use on the button then?
I tried this, but it only works when I'm on the same scene that is "home", "portfolio02". It doesn't work from other scenes:
on (release){
_root.mcport.gotoAndPlay("fashthumb");
}
Targeting A Button Inside A Movieclip
Hello,
This is probably a Flash 101 question but I'm trying to target a button inside a moveiclip that will then move to another frame inside the movieclip and stop. The moving part isn't the problem. As it is good practise to have all of your script in frame 1 of the movie, this is what I'm trying to do. I can get it to work if I stick to script on the button itself but can't seem to it from frame 1. The button instance is called "next_btn" which is inside an mc with an instance name of "bride_mc".
Please help before I become a vegetable!
Targeting MC Inside SWF Externally Loaded.
Ok hi everyone again, I ve been trying to find a solution to this
problem for days now..here it is...
I have a "main" swf that externally loads my "menu" swf. That works fine:)
The "menu" swf has buttons on it (movie clips) that when the user clicks
them they supposed to load the sub-pages on top.
So I did a second holder MC for that the sub pages will load in to.
The problem is that my buttons dont work at all. I tried to trace whats
not working but could do it. So am pretty much with no hope at the moment.
If you have 5 minutes please have a look and give me a tip.
On the zip file there is the "main" , "menu" , "new devel" (first sub page) fla.
http://rapidshare.de/files/21754798/web_page.rar
thanks.
Help Targeting Loaded Swf Inside Dummy Clip
im trying to optimize my swf's. as told in the tutorial on flash kit. the problem is when i load a swf into a targeted MC that MC disapears. i check ed in the debugger and can not find the targreted MC. but all the loading is working..
my example is:
level 10 loads another swf into level 25. _level25 has dummyMC, which gets various swf's loaded within it. now i want to targret _level25.dummy from _level10, but i cant do it.
i know this is confusing,but any info on this would be helpfull.
thanks----PC Goshen
Targeting Movie Clips From Buttons Inside Mc's
I have a movie clip in SCENE 1. The movie clip contains a button. I want to use that button to target a movie clip on SCENE 3?
Or from that same button (in the movie clip, which I use to rotate the buttons on stage)in SCENE 1, how do I target a frame in SCENE 3?
I think the changing of scenes is crossing me up.
Thanks
Anthony
Targeting Movie Clip Inside Of Button
I have a movie clip that is inside of a button. I have action script asigned to the button. I can't for the life of me figure out the path to the movieclip to tell it to gotoAndPlay(); I thought it would just be button_instance_name.movie_clip_instance_name.goto AndPlay(frame);
But that is not working. Is there something I should know about targeting movie clips inside of buttons.
Thanks
Targeting Videos Inside A Flash Player(CS3/AS2)
Hello,
I recently built a video player in AS2, you can view it here, http://www.toyassociation.org/AM/Tem...ContentID=6760. There were two things I was hoping to do with it but wasn't sure how to proceed and was hoping somebody here could provide some tips/feedback.
1. I would like to be able to link directly to each video from another web page, email etc, as opposed to just the page where the player is housed.
2. The video window is a separate swf that gets called into a movie clip inside the main swf file when a thumbnail is clicked. When closed it refreshes the entire Flash file causing the sliders under each section of the video library to revert back to their original position. I would like to make it so that upon closing the video window, the sliders stay wherever they were before the user clicked on the video thumbnails. I've tried the unload, unloadMovie and fscommand code to no avail.
Thank you in advance for any help.
Targeting HTML Frame Inside A Frameset
Hi all
Similar questions about framesets have already been answered and i understand how getURL works. I recently came up with this problem though:
My client wanted an intro page in flash that has some buttons. Each button must target a nested frame inside a frameset. (ie when someone clicks on "pictures" the frameset should open and in the main frame the "pictures" section should be loaded. In the top frame i have a flash navigation). I must stress that the flash intro runs before the frameset loads. Any ideas?
Thanx in advance
Targeting Button Inside Loaded MovieClip
Hey there,
I think I am loosing it ...
Anyways, I have loaded a Movieclip onto the stage with:
_root.attachMovie("MCCheck","MCCheck",(1001)); // Attaches the Check Button
_root.MCCheck._x = 82;
_root.MCCheck._y = 202;
and would like to target the button (instace nameis butCheck) inside movieclip or just use a onRelease command to do something. I thought the code would go:
_root.MCCheck.btCheck.onRelease = function() {
trace("go");
gotoAndPlay(1);
//play();
}
But I am wrong.... and suggestion wher I went wrong
Targeting Videos Inside A Flash Player
Hello,
I'm new to this site and Flash as well. I recently built a video player in AS2, you can view it here, http://www.toyassociation.org/AM/Tem...ContentID=6760. There were two things I was hoping to do with it but wasn't sure how to proceed and was hoping somebody here could provide some tips/feedback.
I would like to be able to link directly to each video, as opposed to just the page where the player is housed, from another web page, email etc.
Currently, the video window is a separate swf that gets called into a movie clip inside the main swf file when a thumbnail is clicked. When closed it goes back to frame 1 of the main swf. This means the sliders under each section of the video library revert back to their original position. I would like to make it so that upon closing the video window, the sliders stay wherever they were before the user clicked on the video thumbnails.
Thank you in advance for any help.
There MUST Be A Simple Fix--targeting Inside Scrollpane Components Question
I can't figure out how to reference the .swf's i'm loading into Flash MX 2004's default scrollpane components from other mc's loaded into other scrollpanes.
Here's the scenario: I've got a scrollpane loading a .swf that creates arrays storing XML info. The info displays in the loaded .swf and becomes clickable. Clicking on the info loads ANOTHER scrollpane into _level10 via loadMovieNum("mySWF.swf",10).
This scrollpane loads another .swf itself which i want to draw info from the original arrays.
In a nutshell, how do I reference an array created in a .swf that's been loaded into a scrollpane that's on _level0 from a .swf that's been loaded into a scrollpane on _level10? Does it have something to do with the contentPath?
I've tried _global variables and functions to no avail.
Please HELP! It's the final puzzle piece!
Targeting Button Inside (attach)movie Clip
im trying to get a button working that is inside a movie clip.
the movieclip is given a linkage identifier (container_id and name as container_mc) as it is inside the library and not on the stage.
The movie clip has three buttons inside it.
I have the following code on each of the button
Code:
_root.containerBase_mc.scrollUp_btn.onRelease = function() {
trace("scrol upn");
};
this.containerBase_mc.scrollDown_btn.onRelease = function() {
trace("scrol down");
};
this._parent.containerBase_mc.close_btn.onRelease = function():Void{
trace("close me");
}
as you can see my desperate attempts to get this working
none of the trace actions work...
any help?
thank you.
Targeting Mutliple Movie Clips Inside A Parent Mc
Does anyone know of a way to list all movie clips inside of a parent movie clip.
And also can you target them even if they don't have an instance name.
I'm not looking for a basic "how to target" tutorial.
Thanks.
Loading A Swf File And Targeting A Label Inside Of It On Same Button Action
Is it possible to both load a swf file and target a label inside of that swf file with the same button action? What I have is a menu MC with buttons inside of it that need to target different frame labels inside of the swf file. These swf files are loaded into a blank MC "contents." I tried this actionscript on the button and all it did was load the swf.
on (release) {
_root.contents.loadMovie("myMovie.swf");
}
on (release) {
_root.contents.gotoAndPlay("index");
}
Any suggestions on what I am doing wrong?
Thanks
Tweening External Dynamic Text Inside A MC Inside Main Timeline
I've seen a hundred and a half posts on similar subjects, but goshdarnit, I just can't make this work. Let me explain the problem, and I've included a link to a Zip file with my .fla file and the away.txt file I'm calling the variables from.
Basically, I want to create an interactive menu thing, that starts with a row of each of the 26 letters of the alphabet. When one clicks on a letter, the letter is tweened to a larger faded state, and so is the rest of the alphabet, and I want the names of the schools starting with that letter to then fade in. I have a movie clip inside the last frame of the main tween, which should then tween (fade in over 12 frames) the graphic symbol containing my dynamic text box, which is supposed to be linked to the text variables in the external file. The text variable is created on the first frame of the main timeline using Actionscript on the static header layer, and so I should be able to load it inside my movie clip (I think). Everything looks fine to me, but then I've only been using Flash for 2 weeks.
To sum up, I need to tween the graphic symbol. The graphic symbol contains the dynamic text which references the external text file. The graphic symbol is inside a movie clip, inside one frame of my main timeline. The text isn't showing up, only the empty text box is.
My Zipped source files can be found at: http://www.tolcs.org/athletics/away.zip
If anyone would be willing to download my source files and give some wonderful advice, I'd revere and adore them forever.
Please ? Loading External Text And Viewing With OnClipEvent
Please
I am in need of desperate help or explanation why my loaded external txt files do not show up on clip events. I know they are loaded becuase I traced the variables and also it shows up on a a button event (release).
Is it even possiblEeto view onClipEvents? and if not I need a work around.
Thanks in advance
Here is the code
onClipEvent (load) {
daTextBox = HTMDATA; // HTMDATA Loaded Variable from text file
}
onClipEvent (load) {
scrolling = 0;
frameCounter = 1;
speedFactor = 3;
}
onClipEvent (mouseDown) {
if (up.hitTest(_root._xmouse, _root._ymouse)) {
scrolling = "up";
frameCounter = speedFactor;
up.gotoAndStop(2);
}
if (down.hitTest(_root._xmouse, _root._ymouse)) {
scrolling = "down";
frameCounter = speedFactor;
down.gotoAndStop(2);
}
updateAfterEvent();
}
onClipEvent (mouseUp) {
scrolling = 0;
up.gotoAndStop(1);
down.gotoAndStop(1);
updateAfterEvent();
}
onClipEvent (enterFrame) {
if (frameCounter%speedFactor == 0) {
if (scrolling == "up" && daTextBox.scroll>1) {
daTextBox.scroll--;
} else if (scrolling == "down" && daTextBox.scroll<daTextBox.maxscroll) {
daTextBox.scroll++;
}
frameCounter = 0;
}
frameCounter++;
}
Using External .txt Inside Movie Clip Inside .fla
I've seen a hundred and a half posts on similar subjects, but goshdarnit, I just can't make this work. Let me explain the problem, and I've included a link to a Zip file with my .fla file and the away.txt file I'm calling the variables from.
Basically, I want to create an interactive menu thing, that starts with a row of each of the 26 letters of the alphabet. When one clicks on a letter, the letter is tweened to a larger faded state, and so is the rest of the alphabet, and I want the names of the schools starting with that letter to then fade in. I have a movie clip inside the last frame of the main tween, which should then tween (fade in over 12 frames) the graphic symbol containing my dynamic text box, which is supposed to be linked to the text variables in the external file. The text variable is created on the first frame of the main timeline using Actionscript on the static header layer, and so I should be able to load it inside my movie clip (I think). Everything looks fine to me, but then I've only been using Flash for 2 weeks.
My Zipped source files can be found at: http://www.tolcs.org/athletics/away.zip
If anyone would be willing to download my source files and give some wonderful advice, I'd revere and adore them forever.
HELP HitTest Doesn't Work When OnClipEvent(load) But OnClipEvent(enterFrame)?
Somehow it works for my embedded xml links (coz of using hitTesting) but some of the actions don't run.
Is there anyway to resolve this ?? Coz I want to have clickable xml links embedded within flash. Along with other effects that run at the same time.
I realised that I can only use onClipEvent(enterFrame) instead of onClipevent(load) to trigger the actions. But why is this so???
Hope I'm making sense here...
PS: I tried using only on(rollOver) and on(rollOut), simple button to trigger all the actions and they did. But I can't use buttons as there are xml links embedded within.
ActionScript Code:
onClipEvent(enterFrame){
if (this.hitTest(_root._xmouse, _root._ymouse, true)){
_root.button01_mc.gotoAndStop("over");
_root.image01bg.setMask(_root.blindOpen02);
_root.blindOpen01.gotoAndPlay(1);
_root.image01bg.tween("_x",10,0.75,"easeOutExpo");
_root.lines_mc.alphaTo(100,0.25,"easeOutExpo");
}else{
_root.button01_mc.gotoAndStop("up");
_root.image01bg.setMask(_root.blindClose01);
_root.blindClose01.gotoAndPlay(1);
_root.image01bg.tween("_x",760,0.75,"easeOutExpo");
_root.lines_mc.alphaTo(0,0.25,"easeOutExpo");
}
TARGETING EXTERNAL SWF
What I would like to do is load swf files onto my main movie when pressing a button (that is easy to do) the problem starts when I try to tell each of those swf files to play at a label frame. See each one of those labeled frames has a simple animation leading to the content and the same animation in reverse from the content and I would like it to play each time I push one of those buttons ----->animation------>content------->animation that's it.
The way I have it know it only animates in and when I push button 2,3,4 it loads the new swf file in its place without playing the reverce animation ;(
I know there must be a easy way of doing that I just can't figure it out.
Take a look at the files attached or the link below.
http://emodelfinders.com/files/
Thank you so much in advance
|