Comands From Button In Attached MC
Hi, I have trouble, I can't make command to move to scene-B, frame 5, from button wich is placed in attached MC on main timeline: on (release) { gotoAndPlay("scene-B", 5); } Can anyone help me? what script I have to use? Thanks in advance
g e o r g e georgmorb@ip.osgf.ge
FlashKit > Flash Help > Flash General Help
Posted on: 11-16-2003, 11:51 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Action Works Attached To A Button But Not When Attached To A Frame
can anyone tell me why the following button script works:
on (release) {
_root.welder.eyes.gotoAndPlay(2);
_root.welder.gotoAndPlay(2);
}
but this virtually identical script won't work in a frame (on the same timeline as the button):
_root.welder.eyes.gotoAndPlay(2);
_root.welder.gotoAndPlay(2);
i've been pulling my hair out all day over this. i can't think of an explanation as to why the second example wouldn't work. its baffling to me.
Aplying Loading Comands
Hi,
at the following address is an example http://www.lynx.ch/hw/menu.html
The thing is that the symbols (bootle, plant, mirror) should load like this: you push the bottun PRODUCTS and the yellow panels move till the pannel with Products. When the pannels stop the movie should start loading (from external file). But just when the pannels reach a full stop.
I've tried to connect the loading to the button but the timming is wrong then.
And I dont know how to connect it to the panels.
If anybody has any another idea or methos how to make it please share it.
Thanks for being here,
Raoul
How To Change Comands Directory?
Is it possible to set the Commands directory to a different path? (I've been looking in registers, fruitless...)
Even better would be if Flash could look for the scripts in more than one directory, so me and colleagues of mine could add one network path that would contain some shared "public" macros.
Movie Comands In Flash Mx
hi.
i´m trying to make a simple movie, with simple scenes.
how can i, just pressing a botton on my keyboard get a scene playing.
like:
scene 1 - key q
scene 2 - key w
and on and on
thanks.
Passing Comands Into Flash ?
Im after seing this done in a few places now , And now here . It seems as if theyres not just flash involved first I thought it was just done using _url but after taking a look at the html and seeing this
Code:
<PARAM NAME=movie VALUE="/flash/name1.swf?name=How Do I Do This&x&maxmus=4&x&">
im not so sure
First of all im not trying to rip this site , Im trying to use vitrual domains for navigation to different events in a flash document since im working on an all flash site. Im thinking something like _root.attachMovie(Goto,Goto,10,_root.lastPos); where Goto is set using thevalue passed into flash by the domain or whatever .
Has anyone got any idea how to do this ?
AS To Button Attached To DB For Var
I have a button on a flash file that I would like to populate it from the database using ASP page...here is the code
the button will have a mailto: for launching email contact to the person chosen in the database....
the db file:
strContactInfo = ContactInfo;
so the variable is set (strContactInfo - dynamic text field if needed)
var set up for pulling the info from database to populate the rest of the button code...
var theUrl = "mailto:"+ContactInfo;
here is the code on the button...
on (press) {
getURL(theUrl);
}
but it doesn't work, can someone help me? must be simple enough...
thanks...
Fade AS Attached To Button - Is It Possible?
I've created a (mc)button that I would like to be able to make many different instances out of. So I need some of the (onRollover) code to be attached to the button, not only to the timeline.
PROBLEM:
On rollOver of this button I would like it to fade in MC1 and jump to frame 2 of that clip.
On rollOut I would like it to go back to frame1 of MC1
Now I would like to be able to take that button and Create a new instance.
I still want MC1 to fade in, but I would now like to be able to change the code on that instance to jump to frame 3
then again fade out on rollOut.
I can only figure out how to do this AS on a timeline, which doesn't allow for easily making new instances of the button.
Any Ideas or help would be greatly appreciated.
(I'm attaching a FlashMX version for better compatibility)
Button On Attached Movie
I have a button which calls in a movie which is attached to main movie. However there is a second button on the added movie which is then not recognised and does not work. Please can anyone help me to have this second button function.
Thanks in advance.
Text In A Button That Is Attached?
Hi if anyone can help with me with this problem i'm having that would be great. Within my button clip that I am attaching there is a textbox called "ts". I wanted to set it to x and the code below isn't working. Any ideas on this one?
xPointer=50;
yPointer=100;
for(x=1;x <= 7;x++){
_root.attachMovie("myBut",["mybut"+x],x);
_root["mybut"+x]._x = xPointer;
_root["mybut"+x]._y = yPointer;
_root["mybut"+x].ts.text=x;
xPointer += 50;
}
No Rollover On Attached Button (MX)
i'm creating an empty movie clip and attaching a button. however, when i preview the movie, the button's rollover state is not showing.
the code:
Code:
_root.createEmptyMovieClip("previewButton"+x, level);
_root["previewButton"+x].attachMovie("button", "button"+x, x+1);
any help greatly appreciated. thanks in advance
||| O ^ | + O ¬
Button On An Attached Movieclip
Can anyone help?
menu_mc.admin_btn.onRelease = function() {
_root.box.attachMovie("adminID", "panel", 99);
};
What I have is a button placed on top of an attached movieclip I want to link it to one of my other attached movieclips and I'm not sure how?
Button Actionscript Help: SWF Attached
Hi,
The 'HOME' page will be the FIRST thing the viewer will see when they come to my site.
I want the 'HOME' button already highlighted; until the user clicks on a different button. What's missing in my code?
b1.onRollOver = over;
b1.onRollOut = out;
b1.useHandCursor = false;
b1.buttText.buttonText.text = "HOME";
b1.onRelease = function() {
this.selected = true;
resetState(this);
};
b2.onRollOver = over;
b2.onRollOut = out;
b2.useHandCursor = false;
b2.buttText.buttonText.text = "PORTFOLIO";
b2.onRelease = function() {
this.selected = true;
resetState(this);
};
function over() {
if (!this.selected) {
this.gotoAndPlay('over');
}
}
function out() {
if (!this.selected) {
this.gotoAndPlay('active');
}
}
function resetState(mc) {
for (var i = 0; i<10; i++) {
if (mc._name != "b"+i) {
var tmp = this["b"+i];
if (tmp.selected) {
tmp.selected = false;
tmp.gotoAndPlay('active');
}
}
}
}
Button On An Attached Movieclip
Can anyone help?
menu_mc.admin_btn.onRelease = function() {
_root.box.attachMovie("adminID", "panel", 99);
};
What I have is a button placed on top of an attached movieclip I want to link it to one of my other attached movieclips and I'm not sure how?
Target Button In Attached MC
why I could not target a button which is inside the attached MC...
Iam working on button which was inside an attached MC -
but2.onRelease = function() {
main.clp1.stop();
main.clp1.inside.stop();
main.clp1.grey._alpha=50
}
main.clp1.grey.onRelease = function() {
main.clp1.stop();
main.clp1.inside.stop();
main.clp1.grey._alpha=50
}
note - that clp1 one is the attached MC
but2 is on root and it does well with all its functions
even it change the alpha of main.clp1.grey
but when i try to give same or different function to grey button it doesn't work
please give some suggetion its all about giving a function to a button which is inside an ataached MC.
Appreciate all replies
Random Sounds Attached To Button Help
Hello,
I am interested in creating a small flash movie that contains a single button (a picture), that when clicked, will play any of about 20 sounds randomly. The sounds can be stored in their own directory, and I would like for the flash movie to take up as little space as possible.
The scenario is that the button graphic is a of the head of a person, which will sit at the bottom of a website and every time it is clicked, it will play a different "quote" that this person has said. originally I thought I might be able to do it using simple mouseover and CGI with a GIF image, but that eliminates the possibility of getting a new sound each time without reloading the page (I think).
Thanks!
Remove All Attached Clips With A Button?
does anyone know how i can remove all my attached movie clips from the stage with one button? i have this code that unloads all levels from 1 to 100, can anyone tell me how i can convert it to remove all attached MCs, regardless of their instance names? thanks!
on (release) {
for (i=1; i<=100; i++) {
unloadMovieNum (i);
}
}
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
Rollout And Button Help Needed...fla Attached
hey
i'm designing an interface where the buttons are hidden under squares which slide up to reveal them. the problem is i have created these squares as button instances so when u are over them the buttons underneath dont work. i also really want the squares to slide back down on rollout instead of resetting to the up state. i have looked around and think it may be better to use a hittest instead for the quares? if anybody could take a look at the fla and give me advice i'd be eternally grateful!
jb
Reference Button In Attached Clip
I am trying to reference a button inside a movieclip. The movieclip is placed on the stage via attachmovieclip.
right now the movie attaches to the stage, but the button in the that movie doesnt work. How do I reference it?
code:
_root.createEmptyMovieClip("mc", 999);
btnbios.onRelease = function(){
mc.attachMovie("mymc", "mymc", 999);
}
mc.mymc.mybtn.onPress = function() {
trace("Button Pressed");
};
[AS] Target A Dynamically Attached Button...
Hello,
I attached some movieclips dynamically from the library, and the MC contains a button symbol called "myBtn", I would like to let it load another swf on _level3...below is part of my Actionscript.
Code:
stop();
//-------------------------
this.container.myText.html = true;
this.container.myText.wordWrap = true;
this.container.myText.multiline = true;
this.container.myText.label.condenseWhite = true;
clip.myText._visible = false;
this.container.myTarget._visible = false;
for (var i = 0; i<projectsArray.length; i++) {
var item = this.container.attachMovie("clip", "clip"+i, i);
item._y = (item._height+5)*i;
item.id = i;
getXML(item, i);
item.myTarget.loadMovie("content/"+projectsArray[i]+"/preview/thumb.jpg");
}
function getXML(clip, d) {
clip.aContent = new XML();
clip.aContent.ignoreWhite = true;
clip.aContent.load("content/"+projectsArray[d]+"/preview/text.xml");
clip.aContent.onLoad = function(success) {
if (success) {
clip.myText.styleSheet = aStyle;
clip.myText.text = clip.aContent;
}
};
}
How would I go about targeting the button instance and tell it to load an swf? It's abit embarrsing really, I don't what instancename I should use to target the button, or where to out the script...
Thank you for any replies,
Gene
Attached Button OnRelease Action
Easy. Don't use buttons. Use movie clips. You can't tell a button to go to any of it's frames using actionscript. But you can with movie clips. A movie clip can do anything a button can do, and WAY more. If you need a simple button with a rollover effect, use buttons. For anything more than that, use movie clips.
[AS] Target A Dynamically Attached Button...
Hello,
I attached some movieclips dynamically from the library, and the MC contains a button symbol called "myBtn", I would like to let it load another swf on _level3...below is part of my Actionscript.
ActionScript Code:
stop();//-------------------------this.container.myText.html = true;this.container.myText.wordWrap = true;this.container.myText.multiline = true;this.container.myText.label.condenseWhite = true;clip.myText._visible = false;this.container.myTarget._visible = false;for (var i = 0; i<projectsArray.length; i++) {var item = this.container.attachMovie("clip", "clip"+i, i);item._y = (item._height+5)*i;item.id = i;getXML(item, i);item.myTarget.loadMovie("content/"+projectsArray[i]+"/preview/thumb.jpg");}function getXML(clip, d) {clip.aContent = new XML();clip.aContent.ignoreWhite = true;clip.aContent.load("content/"+projectsArray[d]+"/preview/text.xml");clip.aContent.onLoad = function(success) {if (success) {clip.myText.styleSheet = aStyle;clip.myText.text = clip.aContent;}};}
How would I go about targeting the button instance and tell it to load an swf?
Thank you for any replies,
Rufus
[AS] Target A Dynamically Attached Button...
Hello,
I attached some movieclips dynamically from the library, and the MC contains a button symbol called "myBtn", I would like to let it load another swf on _level3...below is part of my Actionscript.
ActionScript Code:
stop();//-------------------------this.container.myText.html = true;this.container.myText.wordWrap = true;this.container.myText.multiline = true;this.container.myText.label.condenseWhite = true;clip.myText._visible = false;this.container.myTarget._visible = false;for (var i = 0; i<projectsArray.length; i++) {var item = this.container.attachMovie("clip", "clip"+i, i);item._y = (item._height+5)*i;item.id = i;getXML(item, i);item.myTarget.loadMovie("content/"+projectsArray[i]+"/preview/thumb.jpg");}function getXML(clip, d) {clip.aContent = new XML();clip.aContent.ignoreWhite = true;clip.aContent.load("content/"+projectsArray[d]+"/preview/text.xml");clip.aContent.onLoad = function(success) {if (success) {clip.myText.styleSheet = aStyle;clip.myText.text = clip.aContent;}};}
How would I go about targeting the button instance and tell it to load an swf?
Thank you for any replies,
Rufus
Flash Button Not Clicking When Attached (AS3)
Alright, let me try to explain my situation....
I have a class (AppCore) that extends MovieClip.
I have a MovieClip called StageContents.
I have a class (DefaultCaption) with a button on it, that extends MovieClip.
In AppCore, I essentially do this:
CODEvar StageContents:MovieClip = new MovieClip();
var dc:DefaultCaption = new DefaultCaption();
dc.setCaption("Text");
StageContents.addChild(dc);
[as][help] Remove Attached Button Instance
I´ve attached several buttons from the library using
Code:
attachMovie("inv_button","sub_btn"+i,i);
but I can´t seem to remove them later?
Code:
_root["sub_btn"+i].removeMovieClip();
doesn´t work, is that just for attached movieclips or what?
Button Attached To Scroll Pane
Guys, im so irritated. I want to use AS3 cause its becoming the new thing of course, but it seems like its becoming crazy for a once in a while designer to use
If someone can please help me out with one for now. I want to keep all my info on one flv. Unless there is an avdvantage of loading external swf files..
When i click on my home button, I want to jump to frame home and have a scroll pane load my info.
when i click on my directions button,i want to jump to frame directions and have either the same scrollpane or another one load my directions info BUT have the home info dissapear. i dont necessarily have to have a transition OUT, just transitions in.
I know exactly what i have to do with the code. BUT i dont know how to write it. Can someone please help me out here. Thanks
Button In An Attached Movie Clip Won't Work
I have a Movie Clip in my library called "Attachment". On the timeline for Attachment, there's just one frame, with some artwork and a button that goes to Frame 10 of the parent scene.
When I use the attachMovie function, "Attachment" shows up but the button doesn't work. In fact, to be honest, it doesn't seem to respond to my clicks at all, so I'm assuming that the image of the button is there, but the button isn't work.
I should note the buttons on the movie clip are also in my library. Am I jumbling something up? Do I need to do linkage for the buttons in the library, or just linkage for the movie clip since that's what I'm calling?
Button In Attached MovieClip Still Not Working... See My FLA Files And HELP Please
Okay, here's my problem. I have an attached Movie Clip on the stage. In that movie clip is a button that wants to go to Frame 20 of the main timeline, not the MovieClip's timeline.
I've tried having it go to Frame 20, but it doesn't work. Flash recognizes that it's a button, but doesn't go anywhere when I click it.
I've also tried giving Frame 20 a frame label, "Frame20". But when I set the button to go to "Frame20", still nothing happens.
I've attached regular buttons and they work perfectly. But I need to know how to put a button in a MovieClip and have it work.
Please check out my two .FLA files at:
http://www.clocksbydesign.com/ButtonProblem.fla
http://www.clocksbydesign.com/ButtonProblem2.fla
The first one is it not working going to the frame number, and the second one is it not working going to the frame label. Thanks, any help will be appreciated.
Targetting Button Inside Attached Movie
I have a button (buttonA) inside a movieclip (clip1)
"clip1" is attached to an empty clip (emptyclip)on _root at runtime
_root.emptyclip.attachMovie("clip1", "clip1", 0)
Now I know that I can target "clip1" for example to change it's colour using _root.emptyclip.clip1 but how do I target buttonA (which is inside clip1)
ButtonA inside clip1 has an instance name of "buttonA" and is also selected for export in first frame with a linkage name of "buttonA"
I tried this, just to see if it would work
_root.emptyclip.clip1.buttonA.onPress = function(){
trace("button pressed")
}
but it didn't work!
I assume that there is a problem with targetting, but I just can't see what is wrong
JennyJ
Having An Email Sent To Myself From A Script Attached To A Button On My Website
I am relatively new to action scripting, but I am very close to posting my online portfolio (graphic arts) done exclusively in Flash MX. Could somebody tell me how to achieve sending an email to myself from an action assigned to a button. In other words, when someome clicks my "email" button in my contact page, their email program will open with my email address loaded in their "to" column. Is this even possible?
Thank you
Button Action Affecting The Attached MC In Which It Resides
Question: can a button within an attached movie clip remove that movie clip?
Here's the scenario:
click a button, down slides a movieclip, called attacherBar. To this is attached another movieclip, called viewnit, which slides into view from the left. In viewnit mc is a button called closeBtn. The idea is, click on closeBtn and the whole process reverses itself, including removing the attached movieclip viewnit.
Unfortunately, it doesn't seem to work. A closeBtn sitting on the stage, not connected to any movieclip, works fine. But the closeBtn in the attached clip won't function.
Any ideas?
Button Action Affecting The Attached MC In Which It Resides
Question: can a button within an attached movie clip remove that movie clip?
Here's the scenario:
click a button, down slides a movieclip, called attacherBar. To this is attached another movieclip, called viewnit, which slides into view from the left. In viewnit mc is a button called closeBtn. The idea is, click on closeBtn and the whole process reverses itself, including removing the attached movieclip viewnit.
Unfortunately, it doesn't seem to work. A closeBtn sitting on the stage, not connected to any movieclip, works fine. But the closeBtn in the attached clip won't function.
Any ideas?
Referencing A Button In An Attached Movie Clip
I am trying to code an onRelease function for a button located in a movie clip I've attached to another movie clip. It works for one button, but not for another, eventhough I think I've done them the same way. Here's the code:
Code:
his.stop();
//THIS PART WORKS
map_button_holder.map_anim_mc.btn_get_map.onRelease = function(){
map_holder.attachMovie("mapclip", "map_mc", map_holder.getNextHighestDepth());
map_button_holder.removeMovieClip("map_anim_mc");
map_button_holder.attachMovie("mapclose", "map_close_mc", map_button_holder.getNextHighestDepth());
trace("get map clicked");
}
//THIS PART DOESN'T WORK
map_button_holder.map_close_mc.btn_close_map.onRelease = function(){
map_holder.removeMovieClip("map_mc");
map_button_holder.removeMovieClip("map_close_mc");
map_button_holder.attachMovie("mapanim", "map_anim_mc", map_button_holder.getNextHighestDepth());
trace("close map clicked");
}
The movie clip "map_anim_mc" was attached (using attachMovie) to map_button_holder a few frames earlier, and btn_get_map works. Can anyone see what's wrong with my code, or what might be the problem?
Creating A PAUSE Button For An Attached Sound Clip
I need to create a simple Sound Control Panel with a PLAY, PAUSE and REWIND(takes you back to the beginning of the sound file) button.
I am working in Flash 5.
The WAV files that my client wants to use are lectures and can be 5 to 15 minutes long.
Any suggestions as to how to setup the PAUSE button?
Can I use the new Sound / AttachSound and LINKAGE functions to "connect" to the sound file?
The tutorial for this on Flashkit is not working correctly, does anyone know of another tutorial or tip?
Thanks!
Mitch
[F8] Buttons Inside Movieclip Used As A Button Too, HELP Archive Attached
Hi guys, I've been figuring out for 2 days how to workaround the way to make that menu work. But my knoledge of AS it's not really advance.
I have created a menu like that I have a main movieclip, that contains an animation and buttons inside, but that main movieClip has ab onRollOver and onRollOut function. The thing is I dont want to use invisible buttons or movieclips over the movie to activate it, I want to try to do everything as a block or in the same mc, to can reuse without adding stuff over.
Thank You.
Attached File
Referencing A Var Within A Dynamically Created Button Via An Attached Function
I'm having a issue using a var within a button.
I create the button and add the var to the to button:
addChild(answerButton);
answerButton.thisX = ii; // temp value that changes with each addchild
The Question is how do I get the buttons to trace (to start with) the value of the var contained within them?
So easy in as 2
Here is my code below:
PHP Code:
//matchingSetUp.as
package {
import flash.display.Sprite;
import flash.text.*;
import flash.events.MouseEvent;
import flash.display.MovieClip;
public class matchingSetUp extends Sprite {
private var choiceButton:choice;
private var allAnswers:Array;
private var answerButton:answer_box;
private var tempString;//my movieclip name
private var myThis:MovieClip;//my movieclip
private var sortMethods:Array = [1,2,8];// 3 diverse types of sorts
var sortInt:int=0;
private var _matchingObj:Object;
public function matchingSetUp(_matchingObj) {
init(_matchingObj);
}
private function init(_matchingObj) {
// setting up drop zones
for (var i:int=0; i < _matchingObj.problemCodes.length; i++) {
choiceButton=new choice ;
addChild(choiceButton);
choiceButton.x=_matchingObj.targetsX;
choiceButton.y=_matchingObj.targetsY[i];
choiceButton.name="mc" + _matchingObj.problemCodes[i];
}
//setting up Correct answer buttons
//// putting all answer into 1 array
allAnswers = _matchingObj.choiceBank;
for (var k:int = 0; k< _matchingObj.extraChoices.length; k++) {
allAnswers.push(_matchingObj.extraChoices[k]);
}
//// pseudo-randomizing the answers boxes based on sorts
sortInt = (Math.random() * 3);
allAnswers.sort(sortMethods[sortInt]);
//// adding the boxes to the stage
for (var ii:int=0; ii < allAnswers.length; ii++) {
answerButton=new answer_box ;
addChild(answerButton);
answerButton.x=757;// this needs to be in the fla struct
if (ii == 0) {
answerButton.y=108;// this needs to be in the fla struct
} else {
tempString =allAnswers[ii-1];
myThis=answerButton.parent.getChildByName(tempString) as MovieClip;
answerButton.y=myThis.y + 29;
}
answerButton.name=allAnswers[ii];
answerButton.thisX = ii;
trace(answerButton.thisX); myThis=answerButton.parent.getChildByName(answerButton.name) as MovieClip;
myThis.my_name.text = allAnswers[ii];
answerButton.addEventListener(MouseEvent.CLICK,myMouseDown2);
}
}
private function myMouseDown2(event:MouseEvent):void {
trace(thisX); // how do I access the var here ??????????????????????????
}
}
}
Button Playing Specific Frame In Attached Movieclip
Hi: New to flash and really need help with this-
I've attached 2 movie clips with:
this.attachMovie("saltanswer", "f", 0, {_x:200, _y:200});
this.attachMovie("salt", "f", 1, {_x:200, _y:200});
I have a button within one of the attached movies (linkage is "salt") that I want to call to a frame within the other attached movie ("saltanswer"). Right now all I have is actionscript directly on the button:
on (release) {
gotoAndPlay ("saltanswer", "wrong1");
}
I get no errors but it just seems like the button doesn't know the path to the specific frame- right now the path is the linkage name, and the frame label I want it to go to.
anyone have any idea how to remedy this? I'm looking to finish this up ASAP so if anyone can help me that'd be great!
Happy holidays
Button On Level_1 Of Attached Swf Link To Mc On Root Of Target Swf
I have a webpage that i am redesigning and have come across a problem.
The page is made up of a "blank" page (main_page.swf) containing empty placeholders into which i am loading previously created SWFs using the loadMovie script.
The problem is that one of the loaded SWFs is a menu (menu.swf). on level_1 (slideBackground_mc) of the menu are a series of buttons (eg. main_btn). I am trying to use the buttons to load other external SWFs (main_text.swf, music.swf etc) into a content placeholder (content_mc) in main_page.swf.
the script i am using is:
main_btn.onRelease = function(){
loadMovie(main_text.swf,_root.content_mc)
I understand why this doesn't work, as it refers to the root of menu.swf. how do i get it to refer to content_mc on the root of main_page.swf.
I hope this is clear enough for someone to understand and explain to me whether it is possible to do.
Many thanks in advance.
jmckerchar
Applying Dynamic Functions To A Button Nested In An 'attached' Movie
I can't get this to work.
I'm attaching several movie clips from my library. Within each clip is a button. I need to assign a function to each button when the clip is attached - but the functions will be slightly different for each button. E.g. I want flag1.flag_button to display the flag1.title_text on rollover.
Code:
_root.tiles.attachMovie("flag_pin", ("flag" + k), (_root.depth));
eval("_root.tiles.flag" + k)._x = x;
eval("_root.tiles.flag" + k)._y = y;
eval("_root.tiles.flag" + k).title_text.text = eval("_root.sites.site" + k + "_title");
eval("_root.tiles.flag" + k).flag_button.onRollOver = function () {
title_text._visible = true;
}
eval("_root.tiles.flag" + k).flag_button.onRollOut = function () {
title_text._visible = false;
}
Thanks,
Loading Multiple Movie Clips Using MovieClipLoader Script Attached To A Button State
I am building a site that loads both images(using moviecliploader) and text(using loadvars.load) dynamically to a stock page(mytarget is on level5) when different buttons are pressed. My problem is that when I program a function to a button state to call more than one item it does not work.
For examle
code:
Mybutton.onRelease = function(){
myMovieLoader.loadClip(“mytarget.swf”,5); //loads the swf that has the text and image targets
myMovieLoader.loadClip(“image1.jpg”,_level5.imaget arget); //loads image to target MC on level5
myLoadVars.load(“mytext.txt”); //loads the text using myLoadVars to level5.sitetext
}
So, this does not work. If I delete any two of the lines of code it will work. The image load will work independently, the load vars will work independently, and the moviecliploader works independently.
So as a temp solution I have separated out the lines of code to different mouse actions. This does work but looks like crap because the text does not come up till the user rolls off the button, which can only confuse them.
Example
code:
Mybutton.onPress = function()[
myMovieLoader.loadClip(“mytarget.swf”,5); //loads the swf that has the text and image targets
}
Mybutton.onRelease = function(){
myMovieLoader.loadClip(“image1.jpg”,_level5.imaget arget); //loads image to target MC on level5
}
Mybutton.onRollout = function(){
myLoadVars.load(“mytext.txt”); //loads the text using myLoadVars to level5.sitetext
}
SO how would I call the moviecliploader to load...say 3 movies to different levels just by pressing a button?
EDIT: Added [ as ] tags - jbum
Attached Sound To An Attached Container
I am trying to have sound play when the user rolls over an image with this code below:
Code:
container._visible = 0;
thumbsnr = 4;
for (var i = 1; i<=thumbsnr; i++) {
mc = this["mc_"+i];
mc.onRelease = function() {
container._visible =1;
container.attachMovie(this._name, clip, 1);
};
}
the script i am using for the sound is this:
Code:
s = new Sound();
s.attachSound("sound_1");
s.start();
i have done the linkage but it still doesn't seem to be working.
"Start Over" Button Not Working (See Attached)
I've found a bug in this movie and cannot figure out how to fix it. After entering the initial values and then running the simulation, everything works fine. However, if you press the "Start Over" button, then enter more values, the values are not "taking" - I just get a bunch of NaN values.
I'm not really sure why this doesn't work - and I have a feeling it has something to do with Flash's quirky logic.
See the attached FLA
Any help would be greatly appreciated. Thanks in advance.
Aaron
Button(movie Clip) In A Button(movie Clip) Help - Attached Fla
Hey guys,
I had 3 buttons in the main movie which was working fine.
an external actionscript file was responsible for the buttons' functions
playPause is the instance name of the button(made as a movie clip)
ActionScript Code:
playPause.onRollOver = function(){ if(this._currentframe == 1) this.gotoAndStop("pauseOver"); else this.gotoAndStop("playOver")}
What I wanted to do is create another button(instance name speaker) on the main movie that when a user rolls over with a mouse, it'll show the 3 buttons. Basically, a button(movie clip) in a button(movie clip).
I have this movie clip working fine but none of the action script on the original buttons are working (of course because target changed).
I have tried the following and it will not work (in external .as file)-
ActionScript Code:
speaker.playPause.onRollOver = function(){ if(this._currentframe == 1) this.gotoAndStop("pauseOver"); else this.gotoAndStop("playOver")}
here is the fla (for the test file, i simply put the as code in the frame and not external as file)
www.yooniq.net/dante/testmp.fla
and here is what i'm talking about
www.yooniq.net/dante/testmp.swf
any suggestions? it'll be greatly appreciated.
thanks in advance
Working With Dynamically Attached Movies Inside Dynamically Attached Movies
I'm trying to work with a movie I dynamically attached inside of another movie, what is wrong with this code for setting the _x and _y of the inner most movie, and how do i fix it?
Code:
this[iButton].attachMovie("More","M"+iButton,1000+iButton);
this[iButton].["M"+iButton]._x = 10;
this[iButton].["M"+iButton]._y = 10;
This._Y Of An Attached MC, Just Can't Get It Right. Help Please
Hi,
I am quite new to Flash, although I know a bit of Lingo.
I have a major problem with my maths ), but still I am not going to give it up.
My problem is that I try to attach 2 different clips into a smart clip.And I want the drag bar to sit on top of the content window.
this is my script(in the frame 1 of the smart clip):
this.attachMovie("dragbar","drag",1);
this.attachMovie("content","window",2);
//posX,posY are variables sent from smart clip parameters
window._X=posX;
window._Y=posY;
drag._X=posX;
drag._Y=posY-window._height/2; (I assume that the X and Y coordinates are the center of the MC. this is where I get confused. Maybe is all wrong).
Any help would be much appreciated. If you can just explain to me this _X and _Y business cause I just don't get it from the book. Sorry. I know is a bit stupid.
Targeting Attached MCs, Please Help
hi
i have a move where i attach a movieclip multiple times, using this code:
on (release) {
// add this object to the list of chosen objects
_root.items.push("green");
name = items[j]+j;
_root.attachMovie(items[j], name, j+1);
_root[name]._x = (j+1)*50;
_root[name]._y = (j+1)*50;
_root[name+"x"] = _root[name]._x;
_root[name+"y"] = _root[name]._y;
_root[name+"rotation"] = _root[name]._rotation;
_root[name+"height"] = _root[name]._height;
_root[name+"width"] = _root[name]._width;
j++;
}
can anyone tell me how i can target the new clips on the stage without changing this code? i am having a hard time finding out the PATH to the attached clips. thanks!
justin
Attached Mcs Hog Load
hi
if you use attached internal mcs they completely hog the loading process loading before everything in the first frame and stopping any preloader even appearing until theyve loaded..
anyone come across this or found a solution
cheers
neil
|