all groups > flash actionscript > february 2006 >
You're in the

flash actionscript

group:

Need help with variables


Re: Need help with variables -->dan mode
2/15/2006 3:46:09 PM
flash actionscript:
[quoted text, click to view]

_root.myVar = myContainer.myButton1

Then set the text field var to _root.myVar


--

Dan Mode
*Must Read* http://www.smithmediafusion.com/blog
*Flash Helps* http://www.smithmediafusion.com/blog/?cat=11

Need help with variables Fatmat
2/15/2006 9:19:17 PM
Ahhhh, I'm sure this maybe will not make sense but here it goes anyways. Ok I
have a container movie in which I'm loading several other .swf and .txt
variables and jpgs.

I've set up this container to load:

a slideshow.swf, with the following code:

stop();

var slideInfoLV:LoadVars = new LoadVars();
slideInfoLV.load ("vars/slide_info_rotary.txt");

var curFrameNum: Number = 0;



function loadFrame() {

_level0.myCamera.load("vars/r/r" + curFrameNum + ".txt");

_level0.myCustomer.load("vars/r/r" + curFrameNum + ".txt");

_level0.myAir.load("vars/r/r" + curFrameNum + ".txt");

_level0.myImage.loadClip("aircraftimages/r" + curFrameNum +
".jpg",this.image);
}
loadFrame();

//next slide button

this.nextSlideBtn.onRelease = function() {
if (curFrameNum < Number (slideInfoLV.totalFrames) -1) {
curFrameNum++;
}else{
curFrameNum = 0;
}

loadFrame();

}

//\next slide button

//previous slide button

this.prevSlideBtn.onRelease = function() {

if (curFrameNum == 0) {
curFrameNum = Number(slideInfoLV.totalFrames) - 1;
}else{
curFrameNum --;
}

loadFrame();

}

BUT, I also have a thumbnails page that I want to use this same slideshow.swf
page as a master template... so say for example they click on thumbnail number6
say it will take them to the 6th slide. So in this thumbnail.swf I have the
following code:

this.but2.buttonName.text = "Casa 295";

but2.onRelease = function () {
_level0.myMCL.loadClip("fwslideShow.swf", 5);
}

So what this ends up doing is putting the fwslideShow.swf in level 5 in my
container movie.... no how do I read variables and images into the textfields
in this slide per each button....


I hope someone can help me!

Re: Need help with variables Fatmat
2/16/2006 2:22:57 PM
Sorry I don't quite understand what goes where? And could the _root be replaced
by _level0 So in my instance: but1 (in my fw.swf) I would place:

_root.myVar = myContainer.myButton1

And then in the fwSlideShow.swf (where the text field is) I would place:

_root.myVar

Would it be possible to send you my files and you could see what I am trying
to do... anyhelp appreciated as I cannot figure thsi out and am under a great
deal of stress trying to complete the project.
Re: Need help with variables Fatmat
2/16/2006 2:43:59 PM
Sorry I don't quite understand what goes where? And could the _root be replaced
by _level0 So in my instance: but1 (in my fw.swf) I would place:

_root.myVar = myContainer.myButton1

And then in the fwSlideShow.swf (where the text field is) I would place:

_root.myVar

Would it be possible to send you my files and you could see what I am trying
to do... anyhelp appreciated as I cannot figure thsi out and am under a great
deal of stress trying to complete the project.
Re: Need help with variables blemmo
2/16/2006 2:47:19 PM
Hi,
_root in your slideshow.swf will refer to the main timeline of the MC you
loaded the slideshow into (here _level0.MCL), so it should be _level0 instead
(_level0 is always the root's MC timeline).

hth,
blemmo

AddThis Social Bookmark Button