Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash








Confusion


I just started Action Script in my school , seems so confusing @ beggining , is it really difficult all this variables stuff ???




FlashKit > Flash Help > Flash ActionScript
Posted on: 07-18-2002, 11:32 PM


View Complete Forum Thread with Replies

Sponsored Links:

Confusion
ok ,,, so ,,, i have 5 input text boxes.

worldpay_vars is an MC on the single framed timeline. This had to be because of the worldpay system.
anyway,,,
these are on the actions layer

this.worldpay_vars.ref = ref.text;
this.worldpay_vars.name = name.text;
this.worldpay_vars.business = business.text;
this.worldpay_vars.tel = tel.text;
this.worldpay_vars.address = address.text;
this.worldpay_vars.postcode = postcode.text;
this.worldpay_vars.email = email.text;
this.worldpay_vars.amount = "25";
this.worldpay_vars.country = "GB";
this.worldpay_vars.instId = "11111";
this.worldpay_vars.cartId = "test";
this.worldpay_vars.currency = "GBP";
this.worldpay_vars.testMode = "0";
this.worldpay_vars.desc = "Legal Protect";

the button has this

on (press) {
this.worldpay_vars.getURL("https://select.worldpay.com/wcc/purchase", "_blank", "POST");
}

The question is ,,,,,, why wont it pass what the customer enters into the input boxes. It only works if I use VAR names instead of INSTANCE names....

am i doing anything wrong?

thanks

View Replies !    View Related
If Else Confusion.
I am using tons of if's and else if's and stuff for a game I'm making. I want to understand exactly how Flash steps through these.
Here is what I think it is: if a condition is met, it doesn't do any of the accompanying else's or else if's. If it isn't, it steps through the else's until one is met and than it doesn't step through the rest. Also what does _totalframes evaluate to if the MC doesn't exist? I've been trying to dynamicly put a stop() on the last frame of an animation with

Code:
if (hero.rise._currentframe==hero.rise._totalframes) {
//whatever
}

So please help?

View Replies !    View Related
Little Confusion
Hi

I just upgraded to Adobe Flash 9 ( CS3 ). Now I thought ( and for a long time ) flash was a macromedia product?

View Replies !    View Related
Big Confusion Can Anyone Help Me?
Hi there!

I'm trying to make things work without using the "clip.onPress" order, because this way my buttons are disabled.

Can somebody check my fla file and give me some instructions?
http://www.oneplusdesign.com/menu02.fla

Thanks in advance.

View Replies !    View Related
FLV Confusion
I've been searching many threads here and also help files on Adobe.com, and it seems many people are experiencing this and similar problems with flvs.

Could someone who knows what they're talking about explain why sometimes the video will play locally, but not from the server? I've heard musings about some servers not supporting the flv mime type, and other things about perhaps registering the type with IIS, but nothing very conclusive.

If someone could clear this up once and for all I'm sure I'm not the only one who would be extremely grateful!

View Replies !    View Related
THIS Confusion
I am really confused about the use of the word "this". I am sort of aware of the scope issues, being local to a function or refering to the class. So my ? is, i have a

class Practical extends Mover(){

function Practical(targetMC:MovieClip){
super(targetMC);
}

function startMoving(){
this.targetMC.updatePosition=this.updatePosition
}

}//end of class

am i correctly understanding the use of the word 'this' here :
in a fla file i have the following
var myObject:Practical = new Practical();
myObject.startMoving();

when an instance of the Practical class is created, and then calls the startMoving() method from outside the class.
That another method(from Mover class) called updatePosition in
this.updatePosition('this'. then refers to both the classes Practical as well as Mover?? but must be Mover cause the method is defined there and not in Practical).

"this.updatePosition" is then assigned to the Practical Class method called
this.targetMC.updatePosition as it has inherited this method from the Mover class.?? In this instance this refers to the Practical class, even though the property has not been declared in this class file nor has the method been defined.?? Is this right??

And lastly,following on from the above, if i say

class Practical extends Mover(){

function Practical(targetMC:MovieClip){
super(targetMC);
}

function startMoving(){
this.targetMC.updatePosition=this.updatePosition
this.targetMC.onEnterFrame=function(){
this.updatePosition();
}
}

}//end of class

New code included:
this.targetMC.onEnterFrame=function(){
this.updatePosition();
}

The use of the word "this" in the function method ie
this.updatePosition();
refers to the local function and not the class???

Hope someone can help, appreciated

View Replies !    View Related
XML And AS Confusion
Hi

I have a website where all the menu buttons are made in XML and calling up external swf's (also via XML).

for some reason, when i test it, only every 2nd button works effectively.

what could be the possible error in code?

View Replies !    View Related
Confusion
Why can't I dowload the flash player? It always says "download successful", but when I need it on sites such as peekvids.com or spreadshirts.co.uk it always says I need to dowload it again. Can someone help me?

View Replies !    View Related
Xml Confusion
I'm sure this has all been covered, but I'm having a hard time finding it all. I'm trying to figure out using xml in flash for a photogallery because flash isn't really covered in my class at school.

Anyway, I was trying to use the files from this tutorial: http://www.kirupa.com/forum/showthread.php?t=202132

The problem is that the buttons all load across the bottom in a row. I want them to load 2 thumbnails across by 5 down. How do I specify how I want the thumbs to load. I've been playing with this AS forever and I can't seem to figure it out. Are there any other tutorials on xml photogalleries that will make my life easier? Let me know. Thanks.

View Replies !    View Related
A Bit Of Confusion
So, i can store a array of color values in a ByteArray class, isnt it?
There are those 32bit colors and 16bit,without alpha, colors, rigth?
And i supose that each ByteArray item is only 1 byte, wich have 8 bits, so how can it store 16 bit or 32 bit colors?
Something is wrong but i dont know what

View Replies !    View Related
Bit Confusion Here...
Bit confusion here...
In my main swf I create an mc "Base", which loads an swf...containing a preloader with this script in it....I use penner's tweens, with an onMotionFinished...which should tell the loaded swf to play....but I can,t get there, because the _root.play() command makes my main movie play...how can I get to the loaded swf....I used to just tell the _level where the swf was loaded into to play....but there is just a specific depth now...no _level..

help?



ActionScript Code:
Preload_balk_mc.onEnterFrame = function() {
    this._xscale = Math.round(_root.getBytesLoaded()/_root.getBytesTotal()*100);
    _root.Perc = Math.round(_root.getBytesLoaded()/_root.getBytesTotal()*100)+"%";
    BL = _root.getBytesLoaded();
    BT = _root.getBytesTotal();
    if (BL == BT) {
        //_root.play();
        var easeType = mx.transitions.easing.Regular.easeIn;
        var easeType2 = mx.transitions.easing.Elastic.easeInOut;
        LoaderAlpha = new mx.transitions.Tween(Preload_balk_mc._parent, "_alpha", easeType, Preload_balk_mc._parent._alpha, 0, 15);
        LoaderY = new mx.transitions.Tween(Preload_balk_mc._parent, "_x", easeType2, Preload_balk_mc._parent._x, 1300, 25);
        delete this.onEnterFrame;
                LoaderY.onMotionFinished = function(){
           
            _root.play()
            }
    }
};

View Replies !    View Related
If Then Confusion
im trying to make flash stop when
particular frames come up in a looped animation

im starting with wone framt called "t"
but i have no idea what im doing
this is what im currently trying...


ActionScript Code:
//i hoped it would keep looking
//for the frame t and stopped when
//it reached that there
 
//first is the name of an instance
//t is a frame label
if(first._currentframe = ("t"));
    {
        stop();
    }



thanks for any help in advance

View Replies !    View Related
OnClipEvent Confusion
I have several mc's on which I want to use the same onClipEvent code with a slight variation..

I put a text box in the mc to display the variable active1

on one mc I put

onClipEvent (mouseUp) {
if (active1 == 2) {
active1 = 1;
} else {
active1 = 2;
}
}

on the second

onClipEvent (mouseUp) {
if (active2 == 2) {
active2 = 1;
} else {
active2 = 2;
}
}

why does the value in the active1 textbox change when I click either mc?
this is just a little piece of the code, but It was my idea to make each mc unique by have different "active" variables as the trigger in each one.

confused, mark
[Edited by mgason on 07-16-2001 at 10:54 AM]

View Replies !    View Related
Movieclip Confusion
I have a scrolling showreel of 9 images that I want to use in my movie. I have created a scrollbar too, which has a loop at frame 3 and script for this is placed in an actions layer on the main timeline.

Each image on the showreel is a button and the idea is that when a mouseover event occurs on any image a short movieclip of 10 frames plays, which displays accompanying text relating to the particular image.

I would like it, so that whenever a mouseover event occurs the movieclip plays and when the mouseout event occurs the movieclip stops and disappears.

I’ve saved 9 movieclips in the library to accompany the 9 images on the scrollbar but do understand the best method to use to achieve my intention. I need some help on the syntax of the script and where to place my movieclips on the main timeline. I can probably work the script out actually but I am intrigued as to learn how an experienced scripter would achieve this effect. Is it a problem that I have a gotoandplay “loop” action on the main timeline at frame 3? I suspect it is but get rather confused at this early stage of my scripting.

Please, please, please can someone help me out?

View Replies !    View Related
Movieclip Confusion...
I have a scrolling showreel of 9 images that I want to use in my movie. I have created a scrollbar too, which has a loop at frame 3 and script for this is placed in an actions layer on the main timeline.

Each image on the showreel is a button and the idea is that when a mouseover event occurs on any image a short movieclip of 10 frames plays, which displays accompanying text relating to the particular image.

I would like it, so that whenever a mouseover event occurs the movieclip plays and when the mouseout event occurs the movieclip stops and disappears.

I’ve saved 9 movieclips in the library to accompany the 9 images on the scrollbar but do understand the best method to use to achieve my intention. I need some help on the syntax of the script and where to place my movieclips on the main timeline. I can probably work the script out actually but I am intrigued as to learn how an experienced scripter would achieve this effect. Is it a problem that I have a gotoandplay “loop” action on the main timeline at frame 3? I suspect it is but get rather confused at this early stage of my scripting.

Please, please, please can someone help me out?

View Replies !    View Related
Button Confusion
Hello everyone,
Any help will be greatly apprieciated.
Iam working on a CD for my company. I have many scene that
I've created that are linked together using "next" buttons.
When I use the "test movie" selection within Flash, everything works great. When I export the movie and view it through the flash stand alone player the buttons don't do anything. The rollover functions and stuff works but the actions don't.
on (keyPress "<Enter>") {
nextScene ();
}

Iam using a movie clip that has all my button actions. I then put the instance of the movie clip on the main timeline frame. Can anyone tell me what is going on here?
How come it doesn't work in the stand alone player?
This is totally frustrating.

Thanks

View Replies !    View Related
Bitmap Confusion - Please Help
Would someone please give me the lowdown on using bitmaps?

The site I'm working on will require the display of lots of bitmaps (images previously created in Photoshop, etc.)

I want the entire site to be produced in Flash, or at least I thought I did. Is tracing bitmaps the way to go--or should I incorporate (I guess) a frames-based setup for the display of the bitmaps, seperately?

I see websites with tons of what appear to be traced bitmaps, often full-screen displays (i.e., http://www.heavy.com). How do they pull this off?

What is the darn secret to using bitmaps??? Can someone please point me to a page(s) that addresses this, with tips?

MUCHO THANKS

zievfret

View Replies !    View Related
Simple Confusion
Hello there.

I was wondering if anyone had ever experienced the following simple problem in flash 5.
If you create a text field and set it to input text, and set the maxchars to some value, and then close the text options panel, the maxchars is reset to zero.
I can't see what the manual says you should do about this. What am I doing wrong?

Thanks

zizijy

View Replies !    View Related
Fscommand Confusion . . .
I'm trying to launch an external .exe file from a Flash projector and it just isn't working.

My external file is located in a folder named "fscommand" located in the same folder as the projector.

My code is:

on (release) {
fscommand("exec","fscommand/myfile.exe");
}

I've also tried:

on (release) {
fscommand("exec","./fscommand/myfile.exe");
}

Neither works (the .exe does not run). I've checked the syntax and it seems OK. I do have two fscommands (fullscreen and allowscale) which execute at the front of the projector and these work just fine.

Any help will be appreciated!

View Replies !    View Related
Telltarget Confusion
I want to apply a VERY SIMPLE action to a button, this 1 actually:

on (release) {
tellTarget ("pulsedlpage") {
play();
}
}

(pulsedlpage being the instance of the MC i want to play)
But the button i want this action is in a scrollpane which is in an MC which is on the same MC as the pulsedlpage MC (still with me? i hope u r)... because the pulsedlpage and the button arent in the same MC, it doesnt work. And if i try to put pulsedlpage in the same MC, it means that it will play inside the scrollpane.
PLEASE PLEASE PLEASE reply because it pissin me off..
cheers very very much....
jh

View Replies !    View Related
Loadmovie Confusion
I am making a site entirely in flash with each section being a seperate swf file that gets loaded into a placeholder in the main movie with the "loadmovie" command.

The problem is that each swf I attach has a preloader that seems to confuse the whole thing. It all works fine w/o the preloaders, so I figure they must be the culprit. I figured the attached movie would be its own entity that doesnt mess with the main movie. Is that not true? Is there an easy way to fix this? thanks
Dan

View Replies !    View Related
TellTarget In MX Confusion
Help!

I'm trying to have the user click a button that causes some text to appear elswhere on the stage. I made the text into a movie clip with the text in frame 2 and blank on frame 1 with stops in each. No problem. Named the movie instance in the properties window. Now I'm getting target not found. Looked in some books, they say to pull up instance window to set target path...How do I do that in flash MX?

totaly lost,
Brent

View Replies !    View Related
MX: LoadMovie Confusion
Sorry - I know there are nearly 2000 threads on this matter but I haven't weeded out an answer to this yet.

I have a main SWF published as a projector file.
In it are four blank movie clips used to load external SWFs.
I can load two okay.
One has a row of buttons, with on (release) events that try to load a selection of SWFs (one for each button) into the same "spare" blank movie clip in the base SWF.
Sometimes it works, sometimes it doesn't.

I am really confused.

WinXP HE.
PIII 750MHz 384 Mb RAM.

Any help soon would be appreciated - I have a deadline to meet!

View Replies !    View Related
Loading Confusion
I have two flash movies that work perfectly one is the main menu of the site I am designing the other is the audio plare i built for it. both function correctly indepentently. But when i try to load the audio player as an element of the main menu the audio of the player will not work. The audio is embedded in the player and as far as i can tell it should work.

Help would be most appreciated, maybe i should load it as a pop up window for the menu.

If anyone has some other suggestions please enlighten me.

j5

View Replies !    View Related
Confusion About Levels (mx)
I understand levels perfectly well, or at least I thought I did.

I have a setup where I run three swfs. The first, on level 0 is an intro movie, which automatically loads the main content (menu) on level 1. From level 1 I have another movie that loads into level 2.

This all works fine when I view the swf in Flash, but the level 2 movie doesn't appear when I view the whole lot in the html page (the html page calls the level 0 movie and so forth)

Any ideas?

Bernard

View Replies !    View Related
Mc Code Confusion
I'm trying to have a movieclip change visibility when the microphone picks up a certain volume. This the script I've got written:

onClipEvent (load) {

myMovieClip.attachAudio(Microphone.get());
inputMic = Microphone.get();
inputMic.setUseEchoSuppression(1);
inputMic.setRate(44);
inputMic.setSilenceLevel(10);
inputMic.setGain(35);

var level = inputMic.activityLevel;
if (level=30) {
myMovieClip._visible = "true";
} else {
myMovieClip._visible = "false";
}
}


But when I test the movie, it does't work. The MC's visibility status ends up being whatever I tell it to be the first half of the else statement.

View Replies !    View Related
GetURL Confusion
Okay, i have a web page I am working on.

What i need to do is have a button within flash take me from say

"www.website.com/dir/" to "www.website.com/otherdir/stuff/thing.html"

but when I through all the urls into the appropriate slots in the getURL interface, the button ends up taking the browser to "www.website.com/dir/www.website.com/otherdir/stuff/thing.html",] and naturally the browser finds nothing.

I have tried fiddeling with the absolute/relative radio buttons in the target window, and nothing seems to work. I have tried all the different window settings, and i am going insane!

I have been battling for the last 4 hours, some pity and sympathy is all i ask.... whimper...

newbie geek

View Replies !    View Related
Script Confusion
I have duplicated a movie clip of a dynamic text scroll and edited in new text for the second scroller so there are two scroller movie clips in my main movie, the trouble is only one scroller works. I think the tell target or some of the actionscript is conflicting but am not really sure what to change. I did try changing the names in the script but when I publish the movie the targets cannot be found. can anyone help?

here is some of the main action script I am using for the scroller, maybe someone could point out what script I should change for the second scroller:




top = "-136";
scrolllength = "60";
speed = "10";
bottom = Number(top)+Number(scrolllength);
amount = "0";
height = getProperty("text", _height);
originally = getProperty("text", _y);

---------------------------------------------------------------------------------------

button logic movie:


if (Number((getProperty("../scrollhandle", _y)))>Number((Number(../:top)+Number((../:speed/(../:height/../:scrolllength)))))) {
setProperty ("../scrollhandle", _y, (getProperty("../scrollhandle", _y)-(../:speed/(../:height/../:scrolllength))));
} else {
setProperty ("../scrollhandle", _y, ../:top);
}
tellTarget ("../scrollhandle") {
gotoAndPlay (3);
}

.................................................. .................................................. .................

scroller movie
button:

on (press) {
tellTarget ("buttonlogic") {
gotoAndPlay ("up");
}
}
on (release, releaseOutside) {
tellTarget ("scrollhandle") {
gotoAndStop (1);
}
tellTarget ("buttonlogic") {
gotoAndStop ("stop");
}
}

View Replies !    View Related
Javascript Pop-up Confusion....
Hi,

I've been trying to get my website to pop-up in it's own window so it won't have the bulky web tools & stuff.

I am having difficulty, can you please help?!

Basically, it's an HTML page that has an html enter button and when clicked it launches the .swf in its own window.

OK, here is the code I inserted into the body of the HTML page that was published with the .swf.
(Is that where I put the javaScript...within that Flash site published HTML page or my home regular HTML page?)

<script>

function openpopup(){
var popurl="thepageyouwanttoload.htm" <-- why does it read 'htm', should'nt I put the .swf title there?????????
winpops=window.open(popurl,"","width=400,height=33 8,")
}

</script>


Well, just doing that isn't giving me any results. Am I supposed to put something else somewhere?
Am I supposed to add some actionScript to the .swf? I wouldn't see why I would.

Please help. I've been struggling with this for a while.

Thanks,

Christine

View Replies !    View Related
Newbie With Confusion
Ok, I'm like a COMPLETE newb. So, here's my question. I made a ball in the library, a MC (movie clip right?) one. When I name the MC, what's the name for? Can AS use it? another thing, I named my instance... but in the AS, I dunno where to put the name before a property.
Anyway, What I really want to know is:
HOW DO I MAKE THAT FRIKIN' BALL MOVE LEFT, RIGHT, DOWN AND UP??? I couldn't figure out the tutorial or the sample, thus, I bother u guys, lol.
Btw, if you were to write a sample, can you tell what it's doing in each step and maybe make it as simple as possible (whoa, asap, lol)?

View Replies !    View Related
Looping Confusion
What I'm trying to do sounded simple to me, but is proving to be a tad frustrating using actionscript in MX even with a pile of books! Any help would be much appreciated!

I want to click on a movie clip to make another movie clip move until it reaches the same co-ordinates then display a message to confirm this. Just now I am just trying to get the 'x' direction sorted...

I have 2 movie clips which are initialised and located on stage in frame 1 of the main timeline...

//this is the location I want the hero to run to.
attachMovie("location1", "loc1", 0);
loc1._x = 250;
loc1._y = 200;
//this is the character
attachMovie("hero", "hero", 1);
hero._x = 300;
hero._y = 50;
loc1xmet = false;
gotoAndStop(2);

Frame 2 comprises...

loc1.onRelease = function() {
if (loc1xmet == false) {
attachMovie("action_go1", "action_go1", 1);
} else if (loc1xmet == true) {
//this is the confirmation message
attachMovie("xtext", "xtext", 0);
xtext._x = 100;
xtext._y = 100;
}
};



The "action_go1" mc comprises (frame 1)...

if (_root.hero._x<_root.loc1._x) {
_root.hero._x += 5;
} else if (_root.hero._x>_root.loc1._x) {
_root.hero._x -= 5;
} else if (_root.hero._x == _root.loc1._x) {
_root.loc1xmet = true;
}

and frame 2...

gotoAndPlay(1);



At the moment, the hero and the location appear on stage, but when I click the location, the hero mc disappears...and that's all that happens. Not ideal really.

I hope its not rude to past code in like this, I've just joined the forum today.

Thanks.

View Replies !    View Related
If Statement Confusion
Hello,
i'm trying towrite an IF statement that checks if three movies (m_suitnav, l_suitnav and accessories_nav) aren't loaded and only if they are to load ad_filler on same level i've been over the help menus and AS dictionary and this is what i came up with but it doesn't work,
Can anyone shed some light on it for me

on (release) {
if (_level25.m_suitnav.swf._visible)
(_level25.l_suitnav.swf._visible)
(_level25.accessories_nav.swf._visible){
loadMovieNum("ad_filler.swf", 25) = true;

}
}


Thankyou

View Replies !    View Related
Preloader Confusion
Hello

I am confused...I have developed a flash file, and the swf is 745k. I need to develop a preloader for it because of its size. (First of all, is this filesize huge for a flash file?)

My file is a side scroller built on 6 different layers, and I need to know how to create the preloader, which is what i cannot seem to understand.

I thought maybe I could do it in an external swf, that would link to my main swf when it was loaded, but i am not sure how to make this all happen. I just want a simple real-time progression bar, no bytes detection or anything fancy.

If anyone can guide me in the right direction, it would be much appreciated.

Thanks
Ffoeg

View Replies !    View Related
Coordinate Confusion.
Hello all need help on newbie question,

I place a pic onto scene 1.
Then, I make a new MC contains that pic.

The problem is I don't know how to place the pic on the MC, same place as the pic on scene 1. Tried to key in the X and Y coordinate of the pic in MC same as the coordinate of pic in scene 1 but still dislocate.

View Replies !    View Related
HitTest Confusion
Ok, before I start, I realize there are tons of HitTest posts all over the FK forums, but I can't seem to find a solution to my problem.

I need to perform a hitTest() on a MC that lives inside about 4 other MCs. Something like this:

_root.mc1.mc2.mc3.mc4 -- I need to do a hitTest() on mc4, but when I try to do this, it returns "false" or "undefined" every time... I never get a true. Code is similar to this:

_root.mc1.mc2.mc3.mc4.hitTest(_root._xmouse, _root._ymouse, true);

Any ideas?

Thanks in advance

--Brad

View Replies !    View Related
Linkage Confusion
I am creating a flash menu and I am having a problem getting a button on my main timeline to control a timeline of another movie on the stage.

If anyone could take a look at my movie and help me out it would be really helpful.

The menu should load in. Click on "projects". The 2 instances should slide in. If you click on the button "pusher" it is suppose to control the timeline of "projectSheetMC" (the white sliding frame) and goto frame 2. Where the text "pop" shouild fade in.

I tried everything I know to link the button to the timeline of projectSheetMC.
on (press) {
_root.projectSheetMC.gotoAndPlay(2);
}

but it is not working.

_thanks in advance for any help.

View Replies !    View Related
Actionscript Confusion
What does this mean?

_root.mc["hold"+i]._y = 128+113*i;

How does the 128+113*i work?

I am adjusting a script that was done for me, to make it so scrolling goes up and down instead of left to right (clients never make up their minds)

this.createEmptyMovieClip("mc",3);
mc._y =15;
mc._x =0;
for(i=0;i<7;i++){
mc.createEmptyMovieClip("hold"+i,i);
_root.mc["hold"+i]._y = 128+113*i; // This is the line I need to adjust by 10/15 pixels downward
_root.mc["hold"+i]._x = 15;
_root.mc["hold"+i].loadIt();
}

View Replies !    View Related
Hittest Confusion Please Help
Hi I have a magnifying glass effect using masks in flash. Located on my map is a flashing circle identifying a certain place. I need the flashing circle to disappear when the magnifying glass moves onto it.


the flashing circle is called : circle
and the magnifying glass is called myRim

I attempte this code, but it just got confusing as i am nt a great scripter.

onClipEvent (enterFrame) {
if (this.hitTest(_root.myRim)) {
_root.circle.alpha = 0;
if (_root.circle.alpha =0) {
_root.circle.alpha = 100;
}
}
}

View Replies !    View Related
Path Confusion
Sometimes writing this stuff out helps ...but it didn't seem to here. I'm having a brain cloud and can't figure out this pathing. In my main FLA I have two external SWF's that get loaded on a frame action or button click. I have buttons in one of these SWF's I want to target frames in the other SWF.


TARGET info ...
The frames I am trying to target are sitting in a SWF I load using this code:

_root.portfolioindies.loadmovie("portfoliodisplay. swf");

Within the portfoliodisplay.swf, there is a MC named "maindisplay". Within that MC there is a MC named "test". The frames within "test" are the frames I am trying to target. For discussion sake, we can say these frames are labeled "one", "two", and so on.


INFO ON MC I AM TRYING TO TARGET FROM ...
This SWF is called to the main FLA on a button click using this script:

on (release) {play();
_root.external.loadMovie("portfolio.swf");
}

within the portfolio swf is an MC named "button" within this MC is another MC named "buttonmain" The buttons within this MC are the ones I need to affect the frame action in the targeted SWF mentioned above.

I've tried placing code on one of the buttons and it doesnt work.

on (release) {
_root.portfolioindies.maindisplay.test.gotoAndStop ("two");
}


Any thoughts? Thanks

View Replies !    View Related
Operator Confusion
Guys,can u explain what are the differences in the following:
++a and a++

sry,i'm a newbie,giving these lame questions.Thxs

View Replies !    View Related
Scrollpane Confusion
hi, i have added a scrollpane and set the contentpath to "content" in the parameters. "content" refers to a mc in my lib with linkage activated and identifier "content". the mc contains a small pic but it doesn t matter whats inside because the scrollpane stays empty. now the confusion begins. if i copy the scrollpane and the content mc to a new project it works. no changes at all and it works. any ideas on this ? same problem with textarea btw.

View Replies !    View Related
Preloading Confusion
i have a .swf that i want to call another .swf that is like a advertisement kind of animation. its about 1.51 Mb in size, so im pretty sure i need to preload it. i really dont know anything about a preloader. what is the most simple way to preload? it doesnt even have to be pretty...thanx all. -da hui

View Replies !    View Related
Preload Confusion
I think I have been looking at my preloader wrong. I'm a little confused. I have site which has 5 frames on the timeline in the root. My preloader is sitting on frame 1 of course, but is this preloader just looking at frame 2 and then loading or is it checking all the frames on the timeline? My main stage is sitting on frame 5, there are other various animations which happen in the previous frames.

onClipEvent (enterFrame) {
loading = _parent.getBytesLoaded();
total = _parent.getBytesTotal();
percent -= (percent-((loading/total)*100))*.25;
per = int(percent);
percentage = per+"%";
loadBar._width = per;
if (percent>99) {
_parent.gotoAndPlay(2);
}
}

View Replies !    View Related
UnloadMovie Confusion
I have a problem that is probably really simple to solve for everyone except me!!

I have a button that when clicked loads an SWF into an MC (instance name: "section") that obscures all of the main stage, I want the child SWF that has loaded into the MC to unload again by clicking a button in the same SWF, so that it reveals the parent SWF.

Phew!

S

View Replies !    View Related
Bar Chart Confusion
I have a chart being run from an xml four xml documents.

1. Holds data to create dynamic mc's
2. Holds data to color the dynamic blocks
3. Holds data controlling menu for the key
4. Holds data for the # is blocks I want to stack in each column of my bar chart.


So, I've been able to setup the first have of the program. the key is made. I've made an array of the dynamic mc's and an array of vars hold the # of blocks(movie clips) I wish to duplicate or stack in each column. See below:

code:
//Total Graph Width
graphWidth = 780;
//Vertical Alignment between the blocks
vAlignBlocks = 5;
//Horizantal Alignment between 2 column
hAlignColumns = 1.6;

// Number of blocks per column vars array
blkNum = ["mcBlkNum1", "mcBlkNum2", "mcBlkNum3","mcBlkNum4", "mcBlkNum5", "mcBlkNum6","mcBlkNum7", "mcBlkNum8", "mcBlkNum9","mcBlkNum10", "mcBlkNum11", "mcBlkNum12", "mcBlkNum13","mcBlkNum14", "mcBlkNum15", "mcBlkNum16"];
nG = blkNum

// kG is # of columns
kG = blkNum.length;

// mc instance names dynamiclly created in frame 1 to create key
Nameblk = ["mcBlock0", "mcBlock1", "mcBlock2","mcBlock3", "mcBlock4", "mcBlock5","mcBlock6", "mcBlock7", "mcBlock8","mcBlock9", "mcBlock10", "mcBlock11", "mcBlock12","mcBlock13", "mcBlock14", "mcBlock15"];
nB = Nameblk




My question is. How would I duplicate each nB nG number of times in each column kG. I've been rippin my hair out over this for 4 days. Could anyone help me out? Thanks.

View Replies !    View Related
Coordinate Confusion
I found some code that allows me to move an object across the stage and ease it into position:

onClipEvent (load) {
point_a = -25;
point_b = 400;
this._x = point_a;
speed = 7;
}
onClipEvent (enterFrame) {
this._x += (point_b-this._x)/speed;
}

I used this code on some symbols that I planned to add to the root timeline at some point. In fact I put the afore mentioned symbols into another symbol (B) to be added to the timeline.

I noticed that when i put the coded symbols into symbol B that the objects didn't slide into the correct position on the stage when I previewed.

After wracking my brain I realized that the coordinates of the root and preview timelines are different than symbol timelines. Symbols tend to put the 0,0 position in the middle of the screen. The root/preview timelines puts 0,0 in the upper left.

To rectify this I put my coded symbols into the lower right corner of symbol B (all positive _x._y values.) This worked but it squeezed me into the corner. I don't have access to the full 800 px width of the _root movie.

Is there a better way to do this? Why does Flash treat the coordinates of the main stage and the symbol stage differently? How come when I center a graphic in a symbol it only shows the positive area of the symbol when I preview it?

Any thought or help would be appreciated.

Thanks.

D

View Replies !    View Related
LoadVariables Confusion
I'm having a bit of trouble finding the correct paths to the variables once I've called them in, take a look below:

If I have this script on one frame:
Code:
_root.loadVariables("urls.txt");
textFileArray = new Array();
var loadTextContent = new LoadVars();
loadTextContent.load("urls.txt");
loadTextContent.onLoad = function(success) {
if (success) {
textFileArray[1] = this.Time;
}
};
How would I call the 'Time' argument into a frame with this script on?
Code:
clearInterval(intID);
var intID = setInterval(function () {
_root.nextFrame();
}, _root.Time);
At the moment I've just typed '_root.Time', which doesn't work, but I've tried all sorts of different paths and I can't get anything else to work either. Theres probably a really simple solution to this, but I'm too dumb to work it out
I'd be very greatful for your help.

View Replies !    View Related
Listbox Confusion?
Hi,
I need to delete every last entry in the list box ie on click every last entry should get deleted.Can that be done,if yes,can anyoune tell me how?

Also how can I disable selection in a listbox after it is populated from an array.I have written a script for single selection,as well as multiple selection but just not getting this one.I want to know how to disable selection in a list box. Can anyone help?

Thanking you.

rinkoo

View Replies !    View Related
Timeline Confusion... Help?
Hi all,
ok...

I have this example of a navigation bar (see attachment). I want to put this inside it's own movieclip so that I can loadMovie into a container that exists in another swf. However, I've tried changing all the '_root' paths, but it doesn't work when i load the movie into the new swf.
I'm now confused about what I should be changing...
Could anyone out there take a look at this code and help me by telling me which paths I need to change and, to what? Should I change '_root' to '_parent'?

onClipEvent (load) {
//----- Setup Functions -----
function elastic (target1, target2, track) {
if (!track) {
track = 197;
}
diff = track-target1._x
move = (diff*speed)+(move*elastisity);
target1._x += move;
target2._x = (-1*target1._x)+400;
}
//----- Setup Vars -----
speed = 0.9;
elastisity = 0.45;
this._alpha = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
elastic(_root.slider, _root.buttons, _root._xmouse);
_root.exit = _root._xmouse;
} else {
elastic(_root.slider, _root.buttons, _root.exit);
}
}


Thanks to anyone who wants to help, I appreciate it.
Amal

View Replies !    View Related
_root Confusion
I am having some trouble getting a button to work within a movie. The following is what and where my movies and buttons are located.


I have a scene call “Photos”, from there it goes into a MC called “photos”, in that movie are many different buttons that inside, turn into a MC and scale out. The first button within “photos” is called “Bposter1” and that turns into a MC called “Pscale1”. This is the MC that scales the image.

I when I roll over “Bposter1”, what action script would use to make this happen and where would I place it.

This is what I have tried and has not worked.

on (rollOver){
_parent.gotoAndPlay(2)
}

on (rollOver){
_root.gotoAndPlay(2)
}


And many different combinations: this code is placed on the button. Can someone tell me where I am going wrong?

View Replies !    View Related
GetURL Confusion
I am really confused about the type of window the getURL function opens. Could somebody please explain the difference between self blank parent and top? I looked in the actionscript dictionary and I didn't really understand what it had to say.
any help?

View Replies !    View Related
Copyright © 2005-08 www.BigResource.com, All rights reserved