Making A Function Run When A Variable Is Changed.
Code: //==============================================================================================// //Create Local Connection with other SWF's //==============================================================================================// _global.topmenu_lc = new LocalConnection(); _global.topmenu_lc.GetMenuArea = function(param) { XMLMenu = param; }; _global.topmenu_lc.connect("incoming"); // //==============================================================================================// //Master Variables at beginning runtime. //==============================================================================================// XMLMenu = "soo.xml";
What I need is an efficient method to watch the XMLMenu variable so that when it is changed...... it will run this function.
Code: //==============================================================================================// //Rebuild Menu Fuction //==============================================================================================// MovieClip.prototype.RebuildMenu = function() { // this.LastMainButton = this.menuItems_arr.length; this.ResetButton = this.LastMainButton-1; // ---------- Loop all the Main Buttons Shut for (var k = 0; k<Number(this.LastMainButton); k++) { var ObjectPath = this["MainButton"+k]; var twnobj = ObjectPath; var twnprop = "_y"; var twnbegin = ObjectPath._y; var twnfinish = ObjectPath.MainBtnOrigin; this.PositionMainButton_twn = new Tween(twnobj, twnprop, TT, twnbegin, twnfinish, Speed); this.PositionMainButton_twn.stop(); this.PositionMainButton_twn.continueTo(twnfinish); this.PositionMainButton_twn.addListener(ObjectPath); if (k<Number(this.ResetButton)) { ObjectPath.onMotionFinished = function() { this.removeMovieClip(); }; } else { ObjectPath.onMotionFinished = function() { getXML(XMLMenu); }; } } }; // As soon as this swf file is sent a new variable via the Local connection I want it to automatically rebuild the menu. Really need to try and sort this out ASAP so help is appreciated guys.
FlashKit > Flash Help > Flash ActionScript
Posted on: 02-27-2003, 12:22 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Making A Variable Available Outside A Function
Basically I'm trying to load a variable from an external file and then make that variable available for anything.
Code:
var where;
locSource = new LoadVars ();
locSource.load("source.txt");
locSource.onLoad = function () {
where = this.loc;
}
trace (where);
I've tried all the variations of this I can think of. I've defined "where" as a global variable both outside and inside the function, tried to define a separate global value within the function (and changed the syntax of the trace accordingly in either case), nothing works. Basically, the function is being loaded properly; if I put the trace inside the function it shows up perfectly, but the variable isn't available for anything else, which is what I need to happen. Any ideas?
Variable Gets Changed When I Don't Want It To.
Ok the situation is that I am trying to have a variable that does not get changed throughout the entire script except for one place. here is what I have.
_root.ammo = 15;
Then later in the onEnterFrame section I have this:
temp_ammo = _root.ammo;
Now what is happening is that if temp_ammo is already set to something else it changes the _root.ammo to what it is. If you have a variable being changed to the value of another, does it always change the source variable as well? I can't seem to get around this.
Thanks for any help.
EventListener For A Changed Variable
So I'm confronted with a problem, that eventListener seems to be lacking to tools to directly over come.
I've got a global variable, from a class that multiple SWFs I've got going share. I want fire off a function in a child, to be exact, the child of a child, SWF when that variable is changed by the parent.
It seems to me an easy way to do this would be to have an eventListener than detects changes in a variable. But there doesn't seem to be any way to directly do that via a listener - at least from what I gather from:
http://edutechwiki.unige.ch/en/Actio...dling_tutorial
I can fudge it with enterFrame in that child- but that seems like a really ham fisted solution to have it constantly checking like that.
I'm still a novice, so be gentile when explaining things.
A Function In Flash 8 Help File Should Be Changed
At curveTo Function,there is an example how to create a circle by ActionScript:
quote:
this.createEmptyMovieClip("circle2_mc", 2);
circle2_mc.lineStyle(0, 0x000000);
drawCircle(circle2_mc, 100, 100, 100);
function drawCircle(mc:MovieClip, x:Number, y:Number, r:Number):Void {
mc.moveTo(x+r, y);
mc.curveTo(r+x, Math.tan(Math.PI/8)*r+y, Math.sin(Math.PI/4)*r+x, Math.sin(Math.PI/4)*r+y);
mc.curveTo(Math.tan(Math.PI/8)*r+x, r+y, x, r+y);
mc.curveTo(-Math.tan(Math.PI/8)*r+x, r+y, -Math.sin(Math.PI/4)*r+x, Math.sin(Math.PI/4)*r+y);
mc.curveTo(-r+x, Math.tan(Math.PI/8)*r+y, -r+x, y);
mc.curveTo(-r+x, -Math.tan(Math.PI/8)*r+y, -Math.sin(Math.PI/4)*r+x, -Math.sin(Math.PI/4)*r+y);
mc.curveTo(-Math.tan(Math.PI/8)*r+x, -r+y, x, -r+y);
mc.curveTo(Math.tan(Math.PI/8)*r+x, -r+y, Math.sin(Math.PI/4)*r+x, -Math.sin(Math.PI/4)*r+y);
mc.curveTo(r+x, -Math.tan(Math.PI/8)*r+y, r+x, y);
}
should be changed:
this.createEmptyMovieClip("circle2_mc", 2);
circle2_mc.lineStyle(0, 0x000000);
drawCircle(circle2_mc, 100, 100, 100);
function drawCircle(mc:MovieClip, x:Number, y:Number, r:Number):Void {
mc.moveTo(x+r, y);
mc.curveTo(r+x, Math.tan(Math.PI/8)*r+y, Math.cos(Math.PI/4)*r+x, Math.sin(Math.PI/4)*r+y);
mc.curveTo(Math.tan(Math.PI/8)*r+x, r+y, x, r+y);
mc.curveTo(-Math.tan(Math.PI/8)*r+x, r+y, -Math.cos(Math.PI/4)*r+x, Math.sin(Math.PI/4)*r+y);
mc.curveTo(-r+x, Math.tan(Math.PI/8)*r+y, -r+x, y);
mc.curveTo(-r+x, -Math.tan(Math.PI/8)*r+y, -Math.cos(Math.PI/4)*r+x, -Math.sin(Math.PI/4)*r+y);
mc.curveTo(-Math.tan(Math.PI/8)*r+x, -r+y, x, -r+y);
mc.curveTo(Math.tan(Math.PI/8)*r+x, -r+y, Math.cos(Math.PI/4)*r+x, -Math.sin(Math.PI/4)*r+y);
mc.curveTo(r+x, -Math.tan(Math.PI/8)*r+y, r+x, y);
}
Related Photo:http://www.mzwu.com/pic/20070618/001.gif
A Simple Tooltip Function That Can Be Easily Changed
After messing with virtually every componentized tooltip under the sun and discovering that NONE of them can redraw a new message if the tooltip data changes, I decided to throw together something very simple that can be called from anywhere and always works. I'm calling it the "bTooltip" because my name is Brett and I'm sick of tooltips that don't work right and come with zero documentation. I hope this simple function saves someone a weekend, of trying to programatically change one of those crappy tooltip components from the Macromedia/Adobe Exchange. This one isn't feature-rich, but it should be easy for anyone to tweak if they wan't other features. Also, if someone wants to fix this to show the correct fonts, feel free.
Code:
// Simply put this function on your _root timeline and then call it from
// anywhere by using _root.bTooltip("message text", true);
// I just attach it to the onRollOver event of buttons and movieclips.
// The first parameter is the message to display. The second parameter
// can either be a width to display a fixed width tooltip with wordwrapping,
// or you can pass a boolean "true" or string "autosize" to have it size
// itself to the raw string. If you use autosize option you have to put
// your own linebreaks in the string using "
" characters.
// To hide/destroy a tooltip simply call the function with false like this:
// _root.bTooltip(false,false);
// Just attach this to the onRollOut event of a button or movieclip
function bTooltip(message_string,the_width){
var autosizeit = false;
if(!_global.tooltip_depth){
_global.tooltip_depth = _root.getNextHighestDepth();
}
//unload the tooltip if we called the function with "false"
//let's be redundant since flash is a memory leaking whore
if(message_string == false){
_root.tooltip.text_field.removeTextField();
_root.tooltip.unloadMovie();
delete _root.tooltip;
}
//create the tooltip
_root.createEmptyMovieClip("tooltip",_global.tooltip_depth);
_root.tooltip._visible = false;
if(message_string == "" || message_string == undefined){
message_string = "You did not set your message properly. This text is displaying for diagnistic purposes so that you can see if the word wrapping and other features are working right";
}
if(the_width == "autosize" || the_width == true){
the_width = 20;
autosizeit = true;
}
_root.tooltip.createTextField("text_field",_root.tooltip.getNextHighestDepth(),0,0,the_width,20);
_root.tooltip.text_field.font = "_sans";
if(autosizeit == true){
_root.tooltip.text_field.autoSize = "left";
}else{
_root.tooltip.text_field.autoSize = "left";
}
_root.tooltip.text_field.type = "dynamic";
_root.tooltip.text_field.border = false;
_root.tooltip.text_field.multiline = true;
_root.tooltip.text_field.html = true;
_root.tooltip.text_field.embedFonts = false;
_root.tooltip.text_field.selectable = false;
if(autosizeit == true){
_root.tooltip.text_field.wordWrap = false;
}else{
_root.tooltip.text_field.wordWrap = true;
}
_root.tooltip.text_field.mouseWheelEnabled = false;
//_root.tooltip.text_field.setNewTextFormat(_root.tooltip.text_field);
//text_field.condenseWhite = false;
//text_field.styleSheet = undefined;
_root.tooltip.text_field.text = message_string;
//now draw the background and outline
_root.tooltip.beginFill(0xFFFF99, 80);
_root.tooltip.lineStyle(1, 0x000000, 80);
_root.tooltip.moveTo(0, 0);
_root.tooltip.lineTo(_root.tooltip.text_field._width, 0);
_root.tooltip.lineTo(_root.tooltip.text_field._width, _root.tooltip.text_field._height);
_root.tooltip.lineTo(0, _root.tooltip.text_field._height);
_root.tooltip.lineTo(0,0);
_root.tooltip.endFill();
_root.tooltip.onEnterFrame = function(){
if(this._visible == false){
this._visible = true;
}
this._x = _xmouse + 15;
this._y = _ymouse + 5;
}
}
Note: Originally I used a "with(_root.tooltip)" statement to set all the tooltip and text_field properties, but discovered that this screwed up the scope of the variables I was passing into the function to control the sizing, so I switched it back to the long way.
How To Leave A Script Once A Variable Has Changed And Goto A Particular Frame? Eep.
THIS IS MY PROBLEM (prepare yourself)
All i want to be able to do is if it has changed ONE VARIABLE (very important it only changes ONE) to goto a different frame labelled "game".
If it doesn't change a variable then i want it to goto and play the next frame, where it plays a piece of code telling it to go to a frame before (before its starts playing the below code) it making this whole thing loop until a variable named "computercheckloop" == 0.
Any suggestions would be REAAALLLLLLYYY appriciated! Thanks guys (and girls (i didn't mean to be sexist but its just that thier is only one girl in my computing lesson so y'know i guessed but to the girl who is reading this im sorry. UNLESS YOU ARE THAT GIRL IN MY COMPUTING LESSON. Gemma i hate you.).
Jim
// ******************************************
// TRIES TO PREVENT PLAYER WIN
// ******************************************
// Checking for places on the COLUMNS to prevent human player from getting 3 in a row.
// Checks that the place isn't allready taken by a letter :-)
if (this["n"+num1] == "X" && this["n"+num2] == "X" && this["n"+num3] == "_") {
this["n"+num3] = "O";
}
if (this["n"+num2] == "X" && this["n"+num3] == "X" && this["n"+num1] == "_") {
this["n"+num1] = "O";
;
}
if (this["n"+num1] == "X" && this["n"+num3] == "X" && this["n"+num2] == "_") {
this["n"+num2] = "O";
;
}
// Checking for places on the ROW to prevent human player from getting 3 in a row.
// Checks that the place isn't allready taken by a letter :-)
if (this["n"+num4] == "X" && this["n"+num5] == "X" && this["n"+num6] == "_") {
this["n"+num6] = "O";
}
if (this["n"+num5] == "X" && this["n"+num6] == "X" && this["n"+num4] == "_") {
this["n"+num4] = "O";
}
if (this["n"+num4] == "X" && this["n"+num6] == "X" && this["n"+num5] == "_") {
this["n"+num5] = "O";
}
// Checking for places on the DIAGONAL to prevent human player from getting 3 in a row.
// Checks that the place isn't allready taken by a letter :-)
if (this["n"+num7] == "X" && this["n"+num8] == "X" && this["n"+num9] == "_") {
this["n"+num9] = "O";
}
if (this["n"+num7] == "X" && this["n"+num9] == "X" && this["n"+num8] == "_") {
this["n"+num8] = "O";
}
if (this["n"+num8] == "X" && this["n"+num9] == "X" && this["n"+num7] == "_") {
this["n"+num7] = "O";
}
// Checking for places on the DIAGONAL to prevent human player from getting 3 in a row.
// Checks that the place isn't allready taken by a letter :-)
if (this["n"+num10] == "X" && this["n"+num11] == "X" && this["n"+num12] == "_") {
this["n"+num12] = "O";
}
if (this["n"+num11] == "X" && this["n"+num12] == "X" && this["n"+num10] == "_") {
this["n"+num10] = "O";
}
if (this["n"+num10] == "X" && this["n"+num12] == "X" && this["n"+num11] == "_") {
this["n"+num11] = "O";
}
// ******************************************
// TRIES TO WIN
// ******************************************
// Checking for places on the COLUMNS to prevent human player from getting 3 in a row.
// Checks that the place isn't allready taken by a letter :-)
if (this["n"+num1] == "O" && this["n"+num2] == "O" && this["n"+num3] == "_") {
this["n"+num3] = "O";
}
if (this["n"+num2] == "O" && this["n"+num3] == "O" && this["n"+num1] == "_") {
this["n"+num1] = "O";
}
if (this["n"+num1] == "O" && this["n"+num3] == "O" && this["n"+num2] == "_") {
this["n"+num2] = "O";
}
// Checking for places on the ROW to prevent human player from getting 3 in a row.
// Checks that the place isn't allready taken by a letter :-)
if (this["n"+num4] == "O" && this["n"+num5] == "O" && this["n"+num6] == "_") {
this["n"+num6] = "O";
}
if (this["n"+num5] == "O" && this["n"+num6] == "O" && this["n"+num4] == "_") {
this["n"+num4] = "O";
}
if (this["n"+num4] == "O" && this["n"+num6] == "O" && this["n"+num5] == "_") {
this["n"+num5] = "O";
}
// Checking for places on the DIAGONAL to prevent human player from getting 3 in a row.
// Checks that the place isn't allready taken by a letter :-)
if (this["n"+num7] == "O" && this["n"+num8] == "O" && this["n"+num9] == "_") {
this["n"+num9] = "O";
}
if (this["n"+num7] == "0" && this["n"+num9] == "0" && this["n"+num8] == "_") {
this["n"+num8] = "O";
}
if (this["n"+num8] == "O" && this["n"+num9] == "O" && this["n"+num7] == "_") {
this["n"+num7] = "O";
}
// Checking for places on the DIAGONAL to prevent human player from getting 3 in a row.
// Checks that the place isn't allready taken by a letter :-)
if (this["n"+num10] == "O" && this["n"+num11] == "O" && this["n"+num12] == "_") {
this["n"+num12] = "O";
}
if (this["n"+num11] == "O" && this["n"+num12] == "O" && this["n"+num10] == "_") {
this["n"+num10] = "O";
}
if (this["n"+num10] == "O" && this["n"+num12] == "O" && this["n"+num11] == "_") {
this["n"+num11] = "O";
} else {
nextFrame ();
}
[F8] [AS2] Access An Instance Variable From Within A Function Within Another Function
So here is the scenario that has completely stumped me. I have a class, within the class a function and within that function an xml onload handler. So herein lies the problem, I need to store the array of values that I receive from the XML into an instance variable belonging to the class. How can this be achieved?
To illustrate:
Class A {private var values:Array;public function getValues():Void{Xml sendandload code here.xmlReply.onLoad = function(){iterate through xml code and generate array of values.Store this array back into values belonging to class A}}}
using the variable straight up doesn't work.
if I use "this" it refers to the onload function, not the class.
i tried creating another class method called setValue and calling this.setValue(arr) and setValue(arr), but neither of those work.
i even tried combinations of _parent and this, still no go.
The only way I can get it to work is to make reference to _root.class.value, but this is not solid code and is very impracticale, especially if what calls the class doesn't happen to be in the root of the file.
Any ideas would be appreciated.
[Help]Class Function As Function Variable And Using 'this'
Hi, its me again!
I met with a problem now. I was trying to implement the Merry-go-round tutorial in OOP. I created a class, had a function exactly like displayPane function. But here's the problem. The 'this' in displayPane is pointing to the class I created. Not to the object I was about to pass this function to. I thought of maybe static will help. But after some more thought I find out that I need to access some of the class object data i created. This really leave me with a hard time. How can I tell AS to point the this to the object I was about to pass this function to. Is there's any possibility to pass in parameters value while you passing function reference to a variable? (I don't there's this possiblity right)
Thanks in advance. Any help is appreciated.
Pass Variable Function In Function
I'm counting how many elements are are in my XML tree and then adding a button and changing the postioning. I can load the info in perfect, but when I try and pass the color variable to the button function things start to screw up.
PHP Code:
var theXML:XML=new XML();
theXML.onLoad = function()
{
buttonx=10;
nodes=this.firstChild.childNodes;
//trace(nodes.length)
for(i=0; i<nodes.length; i++)
{
newname="button"+i;
_root.mc5.attachMovie("button", newname,20+i);
_root.mc5[newname]._x+=buttonx*i;
new_color=nodes[i].firstChild.nextSibling.nextSibling.nextSibling.nextSibling.firstChild.nodeValue;
newname="button"+j;
mc5[newname].onPress = function (new_color)
{
end_color=int(new_color)
doBlend = 1;
set_interval=setInterval(interval_function,1);
return end_color
}
}
}
theXML.load("xml.php");
I'm totally stumped. Any ideas?
How To Put External Variable's From PHP Into Variable's In A Function
I already echo my variable's the right way. I want to make it possible to adjust collors trougout my database. This is what my PHP file echos:
&homecolor=33ff33&newscolor=000000
this is how my PHP file looks:
PHP Code:
<?php
require("connection.inc.php");
$query = "SELECT name, color FROM outlinecolors";
$result = mysql_query($query);
while(list($name, $color) = mysql_fetch_row($result)) {
print("&$name=$color");
}
?>
This way of using PHP also works for the text I use in my movie, which I let flash put in a dynamic textfield. So I tought that it should be possible to have the variable colors above being used in the next function:
code:
home_btn.onRelease = function() {
outline.fadeColor(homecolor, 100, tweensspeed, test);
};
"homecolor" is the place where the value/echo from php must come (&homecolor=33ff33) so "33ff33" must be in the function in stead of homecolor.
Can anybody help me?
Greets..
I Making Function
Hi friends,
I am trying string and replace it with another character , i am making function and there is 3 parameters
First parameter: is a string "the input string in which a character is to be replaced"
Second parameter: is a character "(a string datatype) which is to be replaced in the input string
Third parameter: is a character " (a string datatype) which will replace the character supplied in the second parameter
The function will return a string which will have replaced characters
For example: function call, findAndReplace( "welcome to newthrea", "e","R") shall return "wRlcomR to nRwthrRa"
please tell me how i do i try all thing but i not get result
thanx
Flash4lover
Making A Function() Global
Hi all
The Flash MX manual states that if a function is set with _global, you don't need to set the path to it when calling the function.
I've put my function in a frame on the main stage, and am trying to call it in the action script of a movie clip. How do I set the function to be globally accessible? In other words, where on earth do I add the _global command to achieve this? The manual doesn't elaborate.
Cheers. in advace.
Importing URL From XML And Making It Function?
I"m trying to import a URL from my XML document:
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
- <images>
- <pic>
<image>images/Photo-1.jpg</image>
<caption>ROYALTY FREE MUSIC</caption>
<caption>"BRINGS OUR CATALOGUE TO THE WORLD!"</caption>
<caption>Russell Brewer</caption>
<caption>SAN FRANCISCO, CA.</caption>
<url><a href="http://www.someplace">VISIT THIS URL</a></url>
</pic>
- <pic>
// and so on...
Then I am checking the render HTML option for my textfield I'm feeding this info to.
But, it isn't working. If I simply feed text it works fine. When I feed the URL I get "null".
...could someone help out?
Thanks!
Making This Function A Protoype
hello!
I've this skewfunction on a MC which have to be transformed in a prototype
so I can moderate the mc from the timeline. I tried it but without positive results . here's the code:
onClipEvent (load) {
xscale = _xscale;
yscale = _yscale;
function skew () {
rad = Math.PI/180;
for (obj in this) {
if (typeof (this[obj]) == "movieclip") {
this[obj]._rotation = -45;
}
}
ang_x = _root.skew_x=Number(_root.skew_x);
ang_y-- ;
_rotation = (ang_x+ang_y)/2+45;
rang_x = ang_x*rad;
rang_y = ang_y*rad ;
sin45 = Math.sin(45*rad);
_xscale = xscale*(Math.cos(rang_x)+Math.sin(rang_y))/Math.sin(((ang_x+ang_y)/2+45)*rad)*sin45;
_yscale = xscale*(Math.sin(rang_x)+Math.cos(rang_y))/Math.sin(((ang_x+ang_y)/2+45)*rad)*sin45;
}}onClipEvent (enterFrame) {
skew();}
Making A Movie A Variable?
there is a ray of light movie at
http://www.flashkit.com/movies/Effec...31/index.shtml
that has a movie instance as a variable.. I was wondering where you define these variables?
(Flash 5)
Thanks for any help =)
Dynamically Making A Variable Name
I know this is probably easy but...
How can I make a literal "myVariable" be made into a variable name such that ( is the word recast?) my script thinks it is not a literal but in fact a variable name so it can reference the contents of variable data loaded from the text file with the line &myVariable=Apple
The end result should be that my manufactured variable name now points to the data referenced in the loaded file.
Making A Variable Global
I know this is a simple issue, I am just confused at this point and need some assistance. How do I get this variable inside the loop (hexColor) to be global? Thanks in advance :D
Attach Code
hexColor = "000000";
_global.hierarchy_xml = new XML();
_global.hierarchy_xml.ignoreWhite = true;
_global.hierarchy_xml.onLoad = function(success)
{
if (success)
{
rankCount = String(hierarchy_xml.firstChild.childNodes.length);
_global.ranks = new Array();
for(var i=1; i<rankCount; i++)
{
iconName = String(hierarchy_xml.firstChild.childNodes[i].childNodes[1].firstChild);
descriptionText = String(hierarchy_xml.firstChild.childNodes[i].childNodes[2].firstChild);
hexColor = String(hierarchy_xml.firstChild.childNodes[i].childNodes[3].firstChild);
if (descriptionText=="null")
{
descriptionText="";
}
_global.ranks.push (iconName);
_root.legend.ranks["rank"+i]._iconName = iconName;
_root.legend.ranks["rank"+i]._description = descriptionText;
_root.legend.ranks["rank"+i].moreDownline._visible = 0;
MovieClip.prototype.setRGB = function(newColor)
{
(new Color(this)).setRGB(newColor);
}
//var setColor:String = ("0x"+hexColor);
//var nhexColor:Number = parseInt(setColor, 16);
//_root.shirt.test.shirt[i].setRGB(nhexColor);
//trace (hexColor);
-----> hexColor[i] = hexColor;
}
_global.numIcons = (hierarchy_xml.firstChild.childNodes.length) - 1;
_root.legend.ranks.gotoAndStop (numIcons);
helptext = String(hierarchy_xml.firstChild.firstChild.firstChild);
//_root.helpScreen.helptext = helptext;
}
else
{
output ("error loading ranks");
}
_global.tree_xml.load(treePath);
}
-----> trace (hexColor[1]);
Making Filename A Variable
Hi all,
Does anyone one know if it's possible to have AS take the filename of itself and make it a variable. I need it to be done by AS only. I know it's possible in PHP, but I'm not sure about AS.
I'm guessing if it's possible it's one line of code.
I'm using Flash 8 but publishing at Flash 6, AS 2.
Thanks in advance,
Bret
Making A Variable Name Variable...
I have a situation where I have buttons on my root that are pushing variable text to a dynamic text field in a movie clip. I am doing that with this type of approach:
code:
on (release) {
moviecliptxtbox= button01txt;
}
In the movie clip, the user will be able to edit the text in the dynamic text field. When they are done, I want them to be able to put the updated text back to the original variable. I have a button in the movie clip that should push the new text back, but it needs to be able to do that for multiple buttons. I am stuck on how to "nest" the original variable name (in this case, "button01txt") into a variable so that the new text is sent back to it. In other words, something like this would be attached to the movie clip button:
code:
on (release) {
last root button clicked = moviecliptxtbox;
}
Any help would be very appreciated.
Making A Variable With A Variable Name
Hey, this is proboly another easy question. How do a make a variable with a variable name?
Code:
for(var tempX=0; tempX<15; tempX++){
for(var tempY=0; tempY<15; tempY++){
var "tile" + tempX + "_" + tempY:Tile = new Tile(gridOffset + (tempX * tileSize), gridOffset + (tempY * tileSize), tileSize, tileSize, "");
}
}
Making A Javascript Function Call
Hi everyone -
Situation: I have four rollover stars in a line used for grading an online document that if you rollover star 3 for eg, 1 and 2 light up as well. Easy enough. Next I want to pass a function call to some javascript external to the flash file passing forward which star has been clicked, ie
on (press) {
mystarfunction(star3);
}
Obviously this will only call a function within flash. This is where I get stuck. I know it has something to do with FSCommand, but my knowledge ends there as I've never really explored this area.
any ideas would be great
thanks
frank
Making A Function Using _root Annotation
Sorry about the last post guys (i sent it before i was done)
Hey guys,
I just want to know how to make a function that goes to and plays frame two of a desired movie clip that is passed through a parameter. I assumed it would something like this but it doesnt work.
function move(movieclip) {
_root.movieclip.gotoAndPlay();
}
Making A Function And Updating It Every Minute
Hi.
I need to make a function that can update itself every minute. can anybody help med?
(to be exact it has to update a clock, so different things can be triggered when certain times come)
Thanks, Andy
Making A Check For Combo Function...
Hi:
I´m trying to make a combo function for a game, that´s it: I want to check if there is a row of three or more shapes on my movie. I want to click on an mc and save to a root variable that there was a hit... so I want to save the second and third hit on a same shape mc... I think that I have the idea for this code but something is wrong when I´m calling that function: is not called, is not running
I have this initial code on my mc:
Code:
this.onPress = function ()
{
if (this._currentlabel == "labelA" && _root.sample0._currentlabel == "labelA") //This line checks if current label is equal to sample label.
{
startcombo = true;
_root.consecutiveShape1 = 1;
trace("consecutive shape + 1 ");
if (startcombo == true)
{
trace("start combo");
checkforCombo();
}
}
}
and so trace("consecutive shape + 1 "); and trace("start combo"); are traced but checkforCombo(); is not running
the code for checkforCombo(); is on the _root and is:
Code:
function checkforCombo()
{
trace("this function is called successfully");
if (_root.consecutiveShape1 = 1)
{
trace("combo count starting");
}
}
As always any help is greatly appreciated
Making A Function Button Activated
this is probably really easy, but i haven't touched flash in abut 6-8 month so i forgot what i need to do. i have the below function and i need to change it from OnEnterFrame to activating it by using a button. i am assuming that i need to name the function, but i am not certain. any advice would be appreciated...
_root.onEnterFrame = function() {
if (_root.mainVar == 0) {
homeX = (-_root._xmouse*.39);
} else {
homeX = (-_root.mainVar*.39);
}
thisX = _root.mv_background._x;
diffX = homeX-thisX;
if (_root.mainVar == 0) {
moveX = diffX/60;
} else {
moveX = diffX/5;
}
_root.mv_background._x = thisX+moveX;
_root.mv_buttons._x = thisX+moveX;
_root.figure1._x = thisX*1.18+moveX;
_root.figure2._x = thisX*1.19+moveX;
};
Newsreader AS Function() Errors - Making Me Ill
Hi, I copied this from another site...
but when I TRY and publish i continually get "2 errors" and I have TRIED everything to make it work... are the functions entered incorrectly? I tried adding {}, but nothing helps it run....
I marked *** Line 91 ***** and 107 **** in the AS below (very bottom of code)
thanks, this is driving me CRAZYYYYYYYYYYYY
~HotWings
----------------------------------
DEBUG ERRORS:
**Error** Symbol=Symbol 337, layer=ActionScript, frame=1:Line 91: '{' expected
scrollSlider = function (dir);
**Error** Symbol=Symbol 337, layer=ActionScript, frame=1:Line 107: Syntax error.
Total ActionScript Errors: 2 Reported Errors: 2
----------------------------------
ACTUAL ACTIONSCRIPT:
PHP Code:
setLinesVisible = function ()
{
var visibleIndex = 7;
var pos = this.holder._y;
var topClips = int(pos / -15);
var i = _root.lineArr.length;
if (this.holder != NULL)
{
variables = this.holder;
var feed = this.holder[variables];
feed._visible = true;
(true);
feed._visible = false;
!(topClips >= i || int(topClips + visibleIndex) < i) ? false : true;
i--;
} // End of the function
} // end if
setSliderHeight = function ()
{
if (this.holder._height < initHeight)
{
this.slider._height = initHeight;
this.slider._visible = false;
}
else
{
this.slider._height = initHeight * (initHeight / this.holder._height);
this.slider._visible = true;
} // End of the function
} // end if
initHeight = 80;
speed = 5;
function ()
{
var scrollPos = -slider._y + 1;
var ratio = this.initHeight / this.slider._height;
var newPos = scrollPos * ratio;
var difY = newPos - this.holder._y;
this.holder._y = int(this.holder._y + difY / speed);
} // End of the function
easeDrag = function ()
{
setSliderHeight();
var dragSpace = 2 + this.initHeight - this.slider._height;
var ratio = this.initHeight / this.slider._height;
this.slider._y = dragSpace;
this.holder._y = int(2 - this.slider._y * ratio);
} // End of the function
reposSlider = function (dir)
{
var scrollSpace = 2 + initHeight - this.slider._height;
var stepNum = Math.floor(scrollSpace / 8);
var scrollStep = int(scrollSpace / stepNum);
var ratio = initHeight / this.slider._height;
if (dir == -1)
{
swDebug.trace("going down = " + scrollStep);
if (this.slider._y + scrollStep >= scrollSpace)
{
this.slider._y = this.slider._y + scrollStep;
}
else
{
this.slider._y = scrollSpace;
} // end if
}
else
{
swDebug.trace("going up = " + scrollStep);
if (this.slider._y - scrollStep >= 1)
{
this.slider._y = this.slider._y - scrollStep;
}
else
{
this.slider._y = 1;
} // end if
} // end if
this.holder._y = int(2 - this.slider._y * ratio);
} // End of the function
****************LINE 91*************
PHP Code:
scrollSlider = function (dir);
slider.onPress = function ()
{
this._parent.dragmode = 1;
var dragSpace = 2 + this._parent.initHeight - this._parent.slider._height;
this.startDrag(false, 203, 1, 203, dragSpace);
} // End of the function
slider.onRelease = function ()
{
this._parent.dragmode = 0;
this.stopDrag();
} // End of the function
****************LINE 107****************
PHP Code:
setSliderHeight();
Making Repeated Function Calls
Hello,
I'm having a problem with the function call.
here is the situation - on mouse move I'm calling a function, which will be called repeatedly when ever mouse is moved.i want to execute the function calls one after the other. for example when first time mouse moved the function is called and during that time again if mouse is move the function will be called again. I want the second call has to be executed after the first one is done with the execution.
Any suggestions??
Making Function To Control Nav, Prototyping
i have this site i'm making a lot of navigation items that all follow the same type of animation.
i want to have a centralized location where i can change how the animation looks and have it affect all the items.
so far i had an idea like this:
Code:
function changeNav(navitem:MovieClip):Void {
navitem.tween("_x", 2, "easeOutSine");
}
then i call it with a rollover button
Code:
nav_mc.main_butt.onRelease = function():Void {
changeNav(main);
}
basically i try a trace function and it returns undefined so I'm guessing there's something wrong in my syntax. any suggestions? its like its not passing the movieclip name as a variable let alone executing the tween function.
Making A Instance Names Variable
Ok, so I want to have my flash app dynamically create movie clips using the duplicateMC command and then change the contents of each movie clip (ie mc1.textvar="ABC" mc2.textvar="XYZ").
I have no probs if I hardcode the number of movie clips, but I want to make it dynamic (will be setting variables outside of flash)
Attached to a button in the root level I want to do something like
for i=1 to NumMoviesVar
myclipTemplat.duplicatemovieclip("myclip"+i,1);
myclip[i].textvar="This is clip" + i
next
Another button would then go through and hide all of the dynamically created movie clips.
Is there any way I can reference the instance name in a "variable" sort of way with this pseudo array? Or is there a better way?
TIA
-Rob
Simple Q About Making A Score Variable
hi there
I have a problem with my score variable
Here is what i have :
scoreText - Dynamic text box
coin - movieclip
moneyBag - movieclip
i then have the following scrip in an "actions" movieclip on the scene
onClipEvent (enterFrame) {
_root.coin._y += 5 ;
if (_root.moneyBag.hitTest(_root.coin)) {
_root.moneyBag._x += 10;
scoreText = Score+=10
}
}
and i have the following in the first frame of the scene
Score = 0;
scoreText = Score;
I think there is something wrong with where i define my variables bust have tried moving it around but does not seem to work
well hope someone can help i think it is a simple answer but i just cant seem to get it to work
thanks
moo
Help Making A Variable Into An Expression Without _root
Hi there, hopefully someone can solve this little problem. I have a movie clip called "radio". In it, I need to call a variable from the main timeline called "thisAnswer". This is the code I used:
var theFrame = _currentframe+("/thisAnswer");
The idea is to move to the current frame plus the answer to the last question (represented by the variable thisAnswer). However, the code above here does not seem to work, I'm guessing because it does not come in as an expression. The simple solution would be this:
var theFrame = _currentframe+(_root.thisAnswer);
Which works correctly, however because I am ebedding this file into another .swf file several layers deep, the root gets all screwed up. I have tried messing with absolute notation in the main movie to solve it, but have not been successful. I'm running MX, so _lockroot is not an option yet.
I guess I'm looking for a way to convert thisAnswer into an expression, or a way to call it out from the main timeline so that it works like the _root.thisAnswer code. Whatever solves the problem.
Thank you in advance for your help.
Darren
var theFrame = _currentframe+(_root.thisAnswer);
Making A Button Appear Based On A Variable
Hi,
I'm just wondering if it's possible to actually make a button appear based on a variable.
So lets say if _root.mybttn = 1 the button will appear, and if it = 0 it won't.
If it is possible, how would I go about doing this? Should it be the frame at which the button should appear? Or in the button itself?
Also, what command should I use to make it appear/not appear?
Thanks.
Making Part Of A Filename A Variable?
Hey all,
I'll keep this short: how do you make part of filename a variable (to later be displayed in a textbox)?
I ask this because I want to have a slide-show of sorts that is easily maintained and updated by the addition and re-naming of image files. For example, by calling a file "picture1.jpg" it will be displayed as "picture1" in the flash file.
I know there are some commands the exist for separating strings into smaller sections (words or letters) But I want to know is there a way of saying "make everything after the / symbol a variable and cut off the filename"? So if you placed that picture.jpg in folder so the filepath looked something like this "/images/beach/image1.jpg" it would return the variable "image1"?
Thanks for your time.
Making A Imported Variable ( From Php ) Into A Number
hey
Quick question...
im importing a few variables with this
Code:
myVars = new LoadVars();
myVars.load("getinfo.php?user1="+userN+"&pass45="+passN+"&random="+refresh1,"0");
myVars.onLoad = function() {
_root.cash=myVars.balance;
....
thats all working good ..
but now how do i make a variable say...
_root.cash
into a a number which can be used in equations or used for logical compariosons such as < > ==
thank you
Making A Imported Variable ( From Php ) Into A Number
hey
Quick question...
im importing a few variables with this
Code:
myVars = new LoadVars();
myVars.load("getinfo.php?user1="+userN+"&pass45="+passN+"&random="+refresh1,"0");
myVars.onLoad = function() {
_root.cash=myVars.balance;
....
thats all working good ..
but now how do i make a variable say...
_root.cash
into a a number which can be used in equations or used for logical compariosons such as < > ==
thank you
Flash 4 Actionscript - Using A Variable In The Function Go To And Stop ("variable")
Sorry to take everyone back to Flash 4, but I have a question about using the Go to and stop command to go to a label in a separate movieclip. Basicly it is like this:
I have a thumbnail movie, each thumbnail has a button over it which sets a variable _level0:ITEMNO per each thumbnail.
I also have a fullsize movie, with several fullsize images that correspond with the thumbnails. Each image is on it's own frame with a label name which is it's item number (ITEMNO).
I want the fullsize movie to Go to and stop ("_level0:ITEMNO")
please help.
Making A Function To UrlEncode Inside Flash4
I am trying to url Encode the variable, 'menu_text' inside Flash, so that I can send it back out of Flash to an ASP page (as _level0:itemTitle) without problems in Netscape in instances where 'menu_text' contains word spaces (The value of 'menu_text' is actually the title of a user-published item passed into Flash from the database via an asp page, and so sometimes it will contain spaces).
I have found posts for functions in Flash 5 but really nothing for Flash 4.
I tried the following, but get returned a value for _level0:itemTitle of a series of %20's (however many spaces there are in the title with no other letters). Can anyone help me from here?
------------------------------------------------------
Set Variable: "x" = "0"
Set Variable: "_level0:itemTitle" = ""
Loop While (x <= Length (menu_text))
Set Variable: "_level0:currChar" = Eval (Substring (menu_text, x, 1))
If (Substring (menu_text, x, 1) eq " ")
Set Variable: "_level0:currChar" = "%20"
End If
Set Variable: "_level0:itemTitle" = _level0:itemTitle & _level0:currChar
Set Variable: "x" = x + 1
End Loop
-----------------------------------------------------
thanks.
Drawing API - Making A Global Draw Box Function.
Hey everyone, I have here the code for a function that creates a box with curved corners and a fill. It works if the code is not within a function, but when I put it in a function and try to reference it globally, I get an error message saying that I can't use a "with" statement because there was no object. Any idea?
// The following code is on the main timeline. A movie clip on the main timeline houses a variable called movieClip. The variable holds the name of the movie clip in which it resides...so let's say i had a movie clip on the main timeline called "admin_login_bg". Within that movie clip I wanted to create a box. So I would call the global function...
createBox("admin_login_box", 0, 0, 300, 100, 10, 2, 0x000000, 100, 0xCCCCCC, false);
The global function below should create a movie clip within the movie clip that resides on the main timeline... _root.admin_login_bg.admin_login_box ...and within that movie clip create the box.
_global.createBox = function(clip_name, xloc, yloc, width, height, corner_bevel, l_thickness, l_colour, l_alpha, f_colour, drop_shadow) {
_root[movieClip].createEmptyMovieClip(""+clip_name+"", _root[movieClip].getNextHighestDepth());
_root[movieClip].clip_name._x = xloc;
_root[movieClip].clip_name._y = yloc;
with (_root[movieClip].clip_name) {
lineStyle(l_thickness, l_colour, l_alpha);
moveTo(corner_bevel, 0);
if (f_colour) {
beginFill(f_colour);
}
lineTo(width-corner_bevel, 0);
curveTo(width, 0, width, corner_bevel);
lineTo(width, height-corner_bevel);
curveTo(width, height, width-corner_bevel, height);
lineTo(corner_bevel, height);
curveTo(0, height, 0, height-corner_bevel);
lineTo(0, corner_bevel);
curveTo(0, 0, corner_bevel, 0);
if (f_colour) {
endFill();
}
}
};
Making Text Selectable Though It Has OnRollOver-function?
Hi!
I've got a text inside a movieclip that has an onRollOver-function (the function basically says: display me on mouseover, hide me on mouseout).
My problem is that I still want the text to be selectable! I've tried setting the .useHandCursor = false without success (the cursor changes but the text is still not selectable). Is there anyway I can have an interactive text that responds to the mouse cursor, but that is still selectable?
Any help greatly appreciated!
Thanks a lot /Tove
Making Tween Function Available To Entire Movie?
Hi,
I have the following function on my main timeline:
Code:
_global.importTrans = function() {
import mx.transitions.*;
import mx.transitions.easing.*;
};
Further down the timeline I am attaching mcs to a container on the main stage and trying to call importTrans(), but to no avail. The only way that I can get it to work is if I paste the code on the timeline of each attached mc and then call it. Considering that I have dozens of mcs to attach, is there any sort of workaround for this?
Thanks
Var Scope: Making A Local Var Work Outside A Function?
I know functions use local vars and that data is tossed when they are done processing. Also know I could use a return type to get a value from a function. BUT... how would you return multiple vars, like from an xml parse??
I don't completely understand how to get data processed ina function out into the main timeline. any help is wonderfully appreciated...
Problems Making Sound Function Global...
I'm trying to create a global play function from the 'Creating preloaders for the attachSound Method' tutorial.
The function works when on the main timeline, using the following code:
PHP Code:
function playSound(idname){
playSoundobj=new Sound(this)
playSoundobj.attachSound(idname)
playSoundobj.start()
}
called using either:
PHP Code:
//button on the main timeline
green.onRelease = function() {
playSound("electronic")
};
//button in loaded swf
subMenu.btn1.onRelease = function() {
_level0.playSound("electronic");
}
I've tried to make it a global function (as follows), but it doesn't work
PHP Code:
_global.playSound = function(idname){
playSoundobj=new Sound(this)
playSoundobj.attachSound(idname)
playSoundobj.start()
}
call using:
PHP Code:
green.onRelease = function() {
playSound("electronic")
};
or
subMenu.btn1.onRelease = function() {
playSound("electronic");
}
It's not too important as it does work (but is messier), but it's driving me mad not knowing what I've done wrong - other globals I've written work, but none use sound... Can anyone explain where I'm going wrong??
Many thanks in advance!!
Juzme
Making Multiple Event Listeners Run The Same Function
I have a block of code. I attached two different event listeners, one to the stage and one to a button. I want it so when the event is triggers, the event handler should run. Look at the code. Thanks.
Attach Code
package
{
import flash.display.MovieClip;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
public class bobAI extends MovieClip
{
public function bobAI()
{
stage.addEventListener(KeyboardEvent.KEY_DOWN, bob_respond);
enter_btn.addEventListener(MouseEvent.CLICK, bob_respond);
}
private function bob_respond(event:*):void
{
//I want this function to run regardless of the event type
trace("working...");
}
}
}
Problems With Dynamically Making _mc's With Centing Function
edit update resolved:::::::::::::::::::::::::::::::::::::::::
problem with code below
delete onLoadInit
remove that and it works fine.
function onLoadInit wont work, and I don't know why.
Any help would be great.
fyi:
this is a function that makes a dynamically named _mc on the stage.
Then loads a jpg in to the _mc("holder") nested inside of the main _mc ("test_mc"). After words it centers the _mc "holder" where that the index(x,y point) of the main _mc "test_mc" is centered over the image loaded.
This works fine when not using array access notation, but since I need to name the _mc's dynamical I have no idea how to other wise.
when calling the addImage function pass it to strings
1: the name of the _mc you wish to make. needs to be a :String
2: the url of the image you wish to load. needs to be a :String
Code:
addImage("test_mc","tes1.jpg");
function addImage(mc:String,imageName:String) {
var Image:String = mc;
var ImageName:String = imageName;
var nIndex:Number = this.getNextHighestDepth();
var image:MovieClip = this.createEmptyMovieClip(Image, nIndex);
var holder:MovieClip = this[Image].createEmptyMovieClip("holder", nIndex);
var mcLoader:MovieClipLoader = new MovieClipLoader();
mcLoader.addListener(this);
mcLoader.loadClip(ImageName, this[Image]["holder"]);
function onLoadInit(mc:MovieClip){ //<---- heres the problem:: cant't get this to function
trace("test");
this[Image]["holder"]._y = -this[Image]._height/2;
this[Image]["holder"]._x = -this[Image]._width/2;
this[Image]._y = Stage.height/2;
this[Image]._x = Stage.width/2;
}
}
The Oringe Scrollbar - Making A ScrollTo Function?
Hello.
I am currently making a site that uses Oringe.com's old fullscreen scrollbar. It's really perfect.
I was just wondering how hard it would be to implement some sort of scrollTo function. For example, I would have all of the content inside the scrollbar window. In this content, I would have a list of movieclips acting as buttons that would scroll to a specific y value (all of which would be in say 200px increments).
so I would love to have a simple function where I could execute scrollTo(n); where n=a givin y value. Basically acting as HTML anchor tags.
It seems like it wouldn't be too hard, but the code is a bit over my head.
Here is the code (the fla is located at http://www.oringe.com/download/blurScroll.fla):
Thank You!
Code:
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
////BLUR SCROLL v 0.1
////copyright (c) 2006 Benjamin Wong
////http://www.oringe.com
////
////NOTICE:
////Feel free to re-use and modify, but if you do use it, please link
////back to www.oringe.com! Thank you!
////
//////////////////////////////////////////////////////////////////////
//MODIFY the below variables to suit your needs:
//
//set your flash stage width here:
initStageWidth = 872;
//
//set how many pixels you want your content to move when you move
//the mousewheel here:
mouseWheelIncrement = 90;
//////////////////////////////////////////////////////////////////////
//DO NOT TOUCH the below code
//unless, of course, you want to change the script and
//workings of this code.
////////////////////////////
//import the blur filter (requires Flash 8 & actionscript 2)
import flash.filters.BlurFilter;
//blur = new BlurFilter(0, 1, 1);
////////////////////////////
//create a listener for the mouse wheel so the mouse wheel works
mouseListener = new Object();
mouseListener.onMouseWheel = function(delta) {
if (delta < 0) {
mainTargetY -= mouseWheelIncrement;
if (mainTargetY < Stage.height - main._height) {
mainTargetY = Stage.height - main._height;
}
}
if (delta > 0) {
mainTargetY += mouseWheelIncrement;
if (mainTargetY > mainInitY) {
mainTargetY = mainInitY;
}
}
}
Mouse.addListener(mouseListener);
////////////////////////////
//actions for scrollbar
//first init some frequently used variables
mainInitY = main._y;
scrollbarInitY = scrollbar.scrollbutton._y;
scrollOn = false;
mainTargetY = mainInitY;
scrollbarTargetY = scrollbarInitY;
//don't want to use hand cursor for scrollbar
scrollbar.scrollbutton.useHandCursor = false;
//actions for scrollbar button behavior
scrollbar.scrollbutton.onRollOver = function() {
if (!scrollOn) {
this.gotoAndPlay("over");
}
}
scrollbar.scrollbutton.onDragOver = scrollbar.scrollbutton.onRollOver;
scrollbar.scrollbutton.onRollOut = function() {
this.gotoAndPlay("out");
}
scrollbar.scrollbutton.onPress = function() {
scrollOn = true;
this.startDrag(false, this._x, scrollbarInitY, this._x, scrollbarInitY + scrollAreaHeight);
}
scrollbar.scrollbutton.onMouseUp = function() {
if (scrollOn) {
scrollOn = false;
this.stopDrag();
if (!scrollbar.scrollbutton.hitTest(_xmouse, _ymouse)) {
scrollbar.scrollbutton.gotoAndPlay("out");
}
}
}
//this is where the animation happens, within this function:
scrollbar.scrollbutton.onEnterFrame = function() {
if (scrollOn) {
mainTargetY = mainInitY-(main._height-Stage.height)*(scrollbar.scrollbutton._y - scrollbarInitY)/scrollAreaHeight;
} else {
scrollbarTargetY = -(main._y - mainInitY)*scrollAreaHeight/(main._height - Stage.height) + scrollbarInitY;
if (Math.abs(scrollbar.scrollbutton._y - scrollbarTargetY) > 0.2) {
scrollbar.scrollbutton._y += (scrollbarTargetY - scrollbar.scrollbutton._y)/2;
}
}
if (Math.abs(main._y - mainTargetY) > 0.2) {
//this is where we calculate the blur distance
mainOldY = main._y;
main._y += Math.ceil((mainTargetY - main._y)/2);
mainMovement = mainOldY - main._y;
//we flur the blur distance for performance gains
//(in theory, at least; this hasn't been tested)
blur.blurY = Math.floor(Math.abs(mainMovement));
main.filters = [blur];
}
}
////////////////////////////////////
//actions for stage resizing
Stage.align = "T";
Stage.scaleMode = "noScale";
resizer = new Object();
resizer.onResize = function () {
scrollbar._x = Math.ceil((Stage.width - initStageWidth)/2 + initStageWidth - scrollbar._width);
scrollAreaHeight = Stage.height - scrollbarInitY*2 - scrollbar.scrollbutton._height;
}
Stage.addListener(resizer);
resizer.onResize();
Making A OnPress Function Of An Empty Movieclip
i load about 50 photo's in by XML who are put all in a seperate MC (emptyMovieClip). and every MC should have an onPress function how do i do that dynamicly so that i dont have to type 50 photo's ? and if i have 70 photos' that i dont come 20 onPress functions short
(challenge) Making A Panel Function When It's Inside A Mc
Here's the site: http://www.clay.bellmor.com/PFC
Here's the fla: http://www.clay.bellmor.com/PFC/resized.fla
I have a couple things going on in my movie that's not working correctly.
the main problem is that I have a drawer that has a tooltip. When the drawer is clicked a thumbnail panel comes out of it. Problem is that since the panel is inside the drawer mc, the tooltip is attached to it and it won't scroll.
I hope someone can figure it out, I'm new to Flash and I'm quite lost.
Keep in mind that the panel will also be placed inside three other drawers, which is why i figured i would nest it inside the drawer in the first place.
good luck and thank you!
|