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




My Problem With XML.... Please Explain .



I have avoided xml for a long while, because it reminded me html which I don't like, and because I didn't see much value in it.I mean, from what I can tell, the main reason for it's use in flash is to have the ability to keep your images and text outside of the flash and organized with one file, that is easier to change around for a non webmaster type.But in all the XML video tutorials that I've seen, they show some really simple things...like, yeah the thumbnails and text and images are being brought in using XML. But there are no roll over effects, things don't fade in, no transitions. It's pretty clunky.I guess I'm wondering if it's possible to load XML content into movieclips that I can then control....once the item has been successfully loaded in. Like, can I load in an image to a movie clip that has it's alpha off, and then when the xml has loaded, I can fade it up?I suppose I'd also appreciate any advice on how to house the content? Do I dynamically create movie clips to contain the incoming image/text? Any tips on that would be appreciated.Thanks.



KirupaForum > Flash > ActionScript 3.0
Posted on: 07-13-2008, 03:07 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Can Someone Explain This?
Code:
onClipEvent (enterFrame){
value = substring(this.myInput, 1, 4);
trace ("value: "+ value);
}
and

Code:
onClipEvent (enterFrame){
value = substring(this.myInput, 0, 4);
trace ("value: "+ value);
}


are the same? I got the same result for both codes.

please note the different: 1 and 0

Can Someone Explain This To Me?
Can someone take a second and explain exactly what this code is doing? I got this .fla off of here I think. But I am not really sure what all of it means. Just when I think I understand it, I don't. I understand the if (seconds... stuff. Its the math.floor and the /1000/60... and the 24*60*daysround stuff. Not following the math. Thanks.


Code:
now = new Date();
euro = new Date (2002, 01, 01, 23, 59, 59);
days = (euro-now)/1000/60/60/24;
daysRound = Math.floor(days);
hours = (euro-now)/1000/60/60-(24*daysRound);
hoursRound = Math.floor(hours);
minutes = (euro-now)/1000/60-(24*60*daysRound)-(60*hoursRound);
minutesRound = Math.floor(minutes);
seconds = (euro-now)/1000-(24*60*60*daysRound)-(60*60*hoursRound)-(60*minutesRound);
secondsRound = Math.round(seconds);
if (secondsRound == 1) {
sec = " second ";
} else {
sec = " seconds ";
}
if (minutesRound == 1) {
min = " minute ";
} else {
min = " minutes ";
}
if (hoursRound == 1) {
hr = " hour ";
} else {
hr = " hours ";
}
if (daysRound == 1) {
dy = " day ";
} else {
dy = " days ";
}
timeRemaining = daysRound+dy+hoursRound+hr+minutesRound+min+secondsRound+sec;

I Can't Really Explain This But...
Go to http://www.angelfire.com/darkside/ad...nipergame.html, as you can see I'm making a sniper game, also, if you noticed you have to hold the mouse down to make him stay down and fade out, I was wondering if there is anyway I can make it so you just have to click the guy once and not hold it down and he'll stay down and fade out. All he is is a button, with a few extra frames so he'll fade out.


[Edited by CHiPMuNk71 on 02-09-2002 at 10:56 PM]

Can Someone Explain This Please?
Code:
onClipEvent (load) {
speed = .25;
dragging = 0;
}
onClipEvent (enterFrame) {
if (_name != "card") {
if (dragging == 0) {
_x += speed*(x-_x);
_y += speed*(y-_y);
}
}
}


In particular, I don't understand what these three lines are saying:

if (_name != "card") {

_x += speed*(x-_x);

and

_y += speed*(y-_y);

Can Someone Explain?
Hi,

If you go to this site

http://www.glaesernemanufaktur.de/

click on the english link where it says welcome.

I am trying to recreate the navigation on the right where it says philosphy.....

which ever one you click on moves to the top and the others fall in line. I am not a very good actionscripter and was wondering if someone knew how to do this and could help.

Thanks

brian

Can Someone Explain This?
I'm using an ASP page to pull from a database, and I got it to work, but I can't get the function containing:

function go(){

_root.myMC._visible=0
//count comes from asp currently 5
for(i=0;i<count;i++){

myMC.duplicateMovieClip("data"+i, i+10)
//arrResult is the array of data I want to pull in
set("data"+i+"/:dataTXT", eval("_root.arrResult"+i))
_root["data"+i]._y=(_root.myMC._height*i)+_root.myMC._y

}
}


to fire immediately and all the variables show. If I put it into a button that calls the function, they pop up. Or, if I put a pause before the function call(that's not using a button) it works. Here's the kicker...after putting the pause in and deleting all the code for it it works. just like I want it to.

And I'm glad... but perplexed.

If anyone has any idea of what I talking about and might be able to give me a clue about it, thanks in advance.

Can Someone Look At My .fla And Explain?
I've got buttons with rollover and rollout movieClips. The rollover/rollout effects work beautifully, but i can't get the actual button to "getUrl" on release.

I can try to explain the setup, but i figured it might be easier to show my .fla and figure it out that way.

Anybody want to take a stab?

Please Can Someone Explain These
on (rollOver) {
for (i=1; i<=5; i++) {
set("/a"+i+":alpha", 0);
}
set("/a"+substring(_name, 2, 1)+":alpha", 100);
}


onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
_alpha += (alpha-_alpha)/5;
}

Would Someone Please Explain To Me In
How to go about making a preloader? I've tried to follow the tutorials, but I'm obviously missing something here. Thanks.

Can Someone Please Explain This?
Why does this NOT work:

Code:
this.onload = function (success) {
if (success) {
sliderFileTotal = 5;
for(n=1;n<sliderFileTotal;n++) {
trace(n);
}
}
}
But if I remove the if (success) statement, it works:

Code:
this.onload = function (success) {
sliderFileTotal = 5;
for(n=1;n<sliderFileTotal;n++) {
trace(n);
}
}
????? I'm extremely confused. Thanks for your help.

Can Anyone Explain This One?
can anyone explain this?!
http://www.cyberglass.co.uk/assets/Flash/psychic.swf

What To Do Now? ASP? PHP? Some Please Explain.....
Word people. This isnt really flash related but since this forum has given me better advice than anywhere else...

Ok, im pretty darn good at the old flash thing now, and im up on my photoshop and dreamweaver skils. Now i wanna get into more serious server styleeee stuff.. but what should i do? the most ive done so far is use the odd CGI script for feedback forms.... I think i might learn ASP because ive used Ultradev to make ASP documents, seraching databases etc.. but is ther any preference between PHP and ASP? what the hell is ASP.NET and is it alot different? Should i learn some Perl so i can do my own cgi scripts instead of nicking them?

Basically i wanna start by buying one good book and start learning. where. should. i . start?

Love you all

Rich xxx

Can Anyone Explain?
Why this is happening to my file.

I want to display a picture, but have a little fun doing so. So I created 4 different "presenters", movie clips that cover the picture and dissolve to display the picture.

But I want it to be random.

All this works perfectly, buuut not when I publish it. In flash when I test the movie, by hitting ctrl enter, its beautiful, works exactly as I want. Goes to random section to display the picture.

But when I publish it, there is a little hiccup. It starts the first one, then jumps to another one at random.
And I notice now that it is published sometimes you have to hit refresh,even a couple of times, because it comes up blank.

There is another question, related but not, directly to this problem. Right now I have it set up that the picture is imbedded in the swf, this is just to test the movie clips. Later I plan to put in load movie script to get the picture from the website. How would I put in a delay, that would allow the picture to be fully loaded before it goes to the random display section.

Thank a lot.

click on the picture to cycle through the 4 different displays.

Download Flash file
View the swf file

Can Someone Plz Explain This For Me
Ok, I am trying and trying to get this stupid motion guide(which I would think should be easy :s) to work...neways I find that if I place the object, then place a keyframe, then add tweeen, I cannot move the object in the first frame...and when I move it before I add the tween the object cannot touch the motion guide line...it is really f*ing stupid so someone plz explain why it is doing this :@

Who Can Explain?
Hi,
I have a movie as a preloader and replace this movie completely with another movie (level0) with several frames and stop in each frame. When I play the movie as a swf everything is fine but when I play it in a browser window, the movie with frames goes to frame 2 and stops there. When I go back to frame 1, everything plays fine. It happens in both IE5.1 and NS7. It has to do with the loading, because when I directly play the childmovie w/o the loading movie everything is fine.
Anybody experienced something similar?

Can Anyone Explain...
http://www.hyperblitz.com/

This site claims to be created with Flash... However, the animation is so swift and crisp. So much moreso than I've ever seen on a Flash site.

Can any of you gurus out there give me some idea as to how this site animation is developed so well?

Thanks,
Daniel
daniel@simplemediagroup.com

Can Someone Explain Why...
Hi,

I've got my flash menu in my top frame, and it points every link to my main frame:

on (release)
{
getURL("main.html", "pagesFrame");
}

It works, or worked fine until I decided to have one (and only one) of my buttons point to an absolute address (ie: http://www.thedomain.com/thepage.html).

The menu will work fine until I try to click on the button with the absolute link. It loads the correct page into the correct frame and then sort of "kills" any button that points to a relative link...?

This problem only occurs when I'm running the page from my computer though, when I upload to the server and use it, it works fine... I was just hopeing someone could explain why it does this. Is it something I'm doing wrong? I then changed another button to an absolute link to see if I could find the problem and It does the same thing. Once I click on either one of the absolute addresed buttons, all other buttons are nonfunctional, but the two remain functional...?

Not an emergency seems how it works on the server, but thanks for any help. Peace.

Can Someone Explain This To Me?
found this scrolling content thing on this site.

I was wondering if someone could take a look at this and maybe try to explain it to me, i really cant figure out how it works

Thanks
Brian

Can Someone Explain This
I KEEP ASKING THE SAME QUESTION...

AND NOT GETTIN ANSWERS...

IF I LOAD A .SWF FILE INTO A MAIN TIME LINE..

SAY ITS A BUTTON

HOW DO I GET IT TO DO THE ACTIONS I TOLD IT TO DO ..

BUT ON THE MAIN TIMELINE ..

SOMONE MENTIONED.....SOMTHING ABOUT _PARENT OR _ROOT THING

I NEED HELP THANKYOU

Can Someone Explain, Please?
Please go to this link and click on the 'enter flash site' button.

www.madonna.com

Notice that when it opens the original browser is forced to the maximum, and a pop up flash file appears in the centre of the screen, with no toolbars etc.

I know there is someone clever enough reading this that knows how to do this! Please could someone explain it to me, i would really appreciate it!!

Nuff respect
T

Explain How To Use This...
http://www.macromedia.com/support/fl...oyment_readme/


how do you change the flash_detection file, like I opened it in flash so i can put my own "flashcontentURL" in and to change and version it detects for to 6, and I did, then it wouldnt let me test the page , so I cant save that .swf and I couldnt save the file because I tried to overwrite the previous one because--
flash_detection.swf - this name should not be changed.
--
Is what the read me said and it said failed to save...... helpppp

Please Explain
This was an answer on how to control movie size but i dont know how to use these commands can sombody please explain



Are you using the fscommands- Autoscale and fullscreen?

These two commands should make your projector fit the screen exactly no matter what size monitor it is being played on.

Help With.. Can't Explain..
I need help. How would I begin to do animated transitions like seen on [miserysignals.net]. Would I make an animation (load in and out, but ;stop in middle and continue the animation when another thing is pressed) ? what coding would i use? I've jumped back and forth with flash a few times, but this confuses me, becuse i'm new..

Can Someone Explain To Me...
Can someone explain to me how to make a preloader. I searched but, the seach didn't work.

Thanks,

Help Explain This?
can someone please help me by explaining how this works? i'm trying to do the same effect but with pictures.

thanks

Can You Explain It ..........
code: fields = new Array();
for (var i = 0; i<125; i++) {
if (this["b"+i].ttext != undefined) {
//["b"+i].ttext is input field's instant name
fields.push(this["b"+i].ttext);
}
}
fieldIndex =0;
function setFocusOnChanged() {
// The change may be deleting the contents of the field
if (this.text.length) {
fieldIndex++;
if (fieldIndex<fields.length) {
Selection.setFocus(fields[fieldIndex]);
Selection.setSelection(0, 1);
}
}
}
function setFieldIndex(oldFocus) {
// This is necessary in case the user manually selects a field they are not supposed to
if (fields[fieldIndex] != this) {
for (var i = 0, found = false; i<fields.length && !found; i++) {
if (fields[i] == this) {
found = true;
fieldIndex = i;
}
}
}
// Make the field empty to guarantee trigger of onChanged event
this.text = "";
}
function checkForEmptyFields() {
for (var i = 0, filled = true; i<fields.length && filled; i++) {
filled = fields[i].text.length;
}


}
for (var i in fields) {
fields[i].onChanged = setFocusOnChanged;
fields[i].onSetFocus = setfieldIndex;
}



do you know it ......i just know some of them

Can Someone Explain...
Why these movies don't work they way they do when I don't load them into a movie clip?

This is the movie loader movie.

This is the "Annoy your co-workers" movie.

This is the "Fight" movie.

I think it has something to do with the referencing being absolute versus relative or something like that, but I'm not sure.

Also, when I have the fight movie loaded, I can't get the cursor back. I know that I turned the cursor off, but is there a way to only turn it off when I'm over the movie? Perhaps a on frame enter type thing?

Thanks in advance.

Explain This...
say i'm making a rpg game,
at some point you choose a name, and then when people talk to you in the game they use your sepecified name, but,
how do i make the text box look flowing when the name is used for example:

your name: areallylongname


hello arealylongnameand how is...
or...

your name: short

hello short and how is... there is meant to be a large gap between the SHORT and AND HOW IS

how do i make it so its

hello your name whatever the length is flowing with the correct spacing,

and may be that made sence... so reply
thanks

Can Someone Please Explain Why...
Can someone please explain why...

...if I create a new button symbol on the stage with the instance name "blankButton", and in it I create a dynamic text field inside that with the instance name "buttonTitle", why can't I reference that text field using "_root.blankButton.buttonTitle"???

Surely I should be able to do things like:
_root.blankButton.buttonTitle.text = "This is my text!";

or have I missed the point completely?

(and I though calculus was supposed to be complicated!)

Not Sure How To Explain This...
hi everyone,

i am new to Flash and i have been reading through this forum for quite some time and it has helped me alot. however, i have bumped into one problem which i cant seem to find a solution to in here... hope you can help.

i wish to create a flash website, but i seem to be having problems with the nav buttons. visit this site which i will use as an example --> http://www.linotravel.com/

whenever u hover over a nav button or move away from it, there is an animation for it. so for that i use the actionscript:

on (rollOver) {
gotoAndPlay (75);
}

on (rollOut) {
gotoAndPlay (85);
}

then if i were click on that nav button, it loads a content on the right side of the screen. so i use this:

on (release) {
gotoAndPlay (125);
}

the problem is now, after i click on the button, the content animates in as i want it but when i hover over the nav button again, the content disappears as the scene is now playing frame (75) whereas the content animation is on frame (125).

the bottom line is, i am asking help on how to let the desired content remain the frame eventhough i hover over nav buttons.


i hope u understand my problem and i hope u can help me with it....


i wish to thank you in advance.

p.s: i am using Flash 8.

[MX] Explain?
Code:
// this sets up the timer and tells it to display in the text box called textbox
this.onEnterFrame = function() {
time = getTimer();
miliseconds = time;
minutes = Math.floor(miliseconds/1000/60);
miliseconds -= minutes*1000*60;
seconds = Math.floor(miliseconds/1000);
miliseconds -= seconds*1000;
miliRound = Math.round(miliseconds/10);
min = (minutes<10 ? "0" : "")+minutes;
sec = (seconds<10 ? "0" : "")+seconds;
ms = (miliRound<10 ? "0" : "")+miliRound;
textbox.text = min+":"+sec+":"+ms;
startTime = getTimer();
};

could someone please explain this code line by line? so i can understand how the timer works

Could Someone Explain This For Me?
I was just doing some coding and came across this little tidbit, it's not a problem anymore, I would just like to understand the reasoning if anyone knows.
why can I do this (in regards to deleting)

Code:
for (var i = 0; i<=6; i++) {;
_root["flag_" +i].onRelease = function() {
trace("incorrect clicked");
_root.q_1.gotoAndPlay("wrong");
delete _root.correct.onRelease ;
delete _root.flag_0.onRelease;
delete _root.flag_1.onRelease;
delete _root.flag_2.onRelease;
delete _root.flag_3.onRelease;
delete _root.flag_4.onRelease;
delete _root.flag_5.onRelease;
delete _root.flag_6.onRelease;
}
};
but I cant delete this

Code:
for (var i = 0; i<=6; i++) {;
_root["flag_" +i].onRelease = function() {
trace("incorrect clicked");
_root.q_1.gotoAndPlay("wrong");
delete _root.correct.onRelease ;
delete _root["flag_" +i].onRelease ;
}
};
is there some devine flash logic that im not seeing?

thanks in advance

Mark

[F8] Plz Help Explain Example.
here is an example from the help menu of flash 8

Code:
import flash.display.BitmapData;

var myBitmapData:BitmapData = new BitmapData(100, 80, true, 0xFFAACCEE);

var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());

var alpha:String = (myBitmapData.getPixel32(0, 0) >> 24 & 0xFF).toString(16);
trace(">> alpha: " + alpha); // ff

var red:String = (myBitmapData.getPixel32(0, 0) >> 16 & 0xFF).toString(16);
trace(">> red: " + red); // aa

var green:String = (myBitmapData.getPixel32(0, 0) >> 8 & 0xFF).toString(16);
trace(">> green: " + green); // cc

var blue:String = (myBitmapData.getPixel32(0, 0) & 0xFF).toString(16);
trace(">> blue: " + blue); // ee

trace("0x" + alpha + red + green + blue); // 0xffaaccee
now i know what most of this does, except for the " >> 24 & 0xFF" , " >> 16 & 0xFF", "8 & 0xFF" and "& 0xFF". i have no idea what any part of those mean. can someone go through each part? for example what is ">>"

Maybe Somebody Can Explain This.
hi ....here was the problem ....I had a dynamic text box instance name of msg3 and had text being put in it with msg3.text = "text"; It worked great for hours then it stopped working when i finally tracked down the problem by changing it to msg5 .....I had almost lost my mind....I checked for confilcts by changing all the msg3 to msg5 but everything worked fine ...the whole problem was the instance name being msg3.......what caused this craziness ?

Some One Can Explain To Me This A.s.
eval(target) . _y =
clip_top-(((_root.botondesplazar._y-top)/bar_length)*clip_height);


I don't understand what is the "clip_top"

[CS3] Who Can Explain This..
Ok I have this piece of code. The first line needs to work. But it doesnt.


Code:
loadMovie(_global.gamen+".swf",1);
trace(_global.gamen+".swf");
trace(loadMovie(_global.gamen+".swf",1));
trace(loadMovie("breinsommen.swf",1));
This piece of code outputs:


Code:
breinsommen.swf //trace1
undefined //trace2
undefined //trace3
451//trace3
Somehow, this piece of code works:

Code:
loadMovie("breinsommen.swf",1)
but not:

Code:
loadMovie(_global.gamen+".swf",1);
while (as you can see in the output),

Code:
_global.gamen = "breinsommen"

Can Anyone Explain?
Can anyone explain this to me?
http://www.tonypa.pri.ee/tbw/tut17.html

The part i have problem with is
the work function, more specifically
Code:
game.xmouse=Math.round((_root._xmouse-game.tileW/2)/game.tileW);
game.ymouse=Math.round((_root._ymouse-game.tileH/2)/game.tileH);

I know what it does so please dont give me an explanation of it takes the mouses x value, subtracts....

No, i want to know why it works the way it does.
Math.round((_root._xmouse-game.tileW/2)/game.tileW);
This gets the horizontal tile the mouse is on.
Why is game.tileW/2 in there, how does it help the script?

What i want to know is why does half the tile need to be subtracted?
I guess it finds teh center of the tile or someting... It just doesnt make sence to me....
(_root._xmouse-game.tileW/2)

If anyone can explain, i would love that!

Can Someone Please Explain This AS Should Help Everyone
I came across this AS for an image slider... some of it I don't understand. If anyone does understand I would appreciate the explanation!


ActionScript Code:
menu.onRollOver = menuOver;
function menuOver() {
    this.onEnterFrame = scrollmenu;
    delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollmenu() {
    if (_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax) {
        this.onRollOver = menuOver;
        delete this.onEnterFrame;
    }
    if (menu._x>= 390) {
        menu._x = 390;
    }
    if (menu._x<=-8) {
        menu._x = -8;
    }
    var xdist = _xmouse-1000;
    menu._x += Math.round(-xdist/7);
}

Thanks!
-ZG

How Can You Explain This?
Have a look at this code. The mask "msk" should have no effect, however it decreases the parameter alpha of the area of the picture gal5.jpg where it is applied, if cacheAsBitmap of the clip "_level0.clip" is set to true. If cacheAsBitmap is set to "false", "msk" has no effect (look at the file "problem.pjg" or try this code with a picture gal5.jpg with dimensions greater that 200x100 to see the effect)


Code:
_level0.createEmptyMovieClip("clip",1)
_level0.clip._alpha=30


_level0.clip.createEmptyMovieClip("image",0)
_level0.clip.image.loadMovie("gal5.jpg")

//creates a clip "msk" with a white rectangle inside, apply a filter to msk
// in order to set the alpha of white pixels to 255 (they are opaque) and
//mask the clip "image" with the blendMode "alpha"
_level0.clip.createEmptyMovieClip("msk",1)
with (_level0.clip.msk) {
beginFill(0xFFFFFF,100);
moveTo(0,0);
lineTo(200,0);
lineTo(200,100);
lineTo(0,100);
lineTo(0,0);
endFill();
}
_level0.clip.msk.filters=[new flash.filters.ColorMatrixFilter([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1/3, 1/3,1/3,0, 0])]
_level0.clip.blendMode="layer"
_level0.clip.msk.blendMode="alpha"
_level0.clip.cacheAsBitmap=true

Can Someone Please Explain This To Me ?
I have created a few classes and two of them extends the movieclip.

Now on my MAIN flash file i have a movie clip and is linked to the first AS file and calls it's constructor.

so then on my flash there exists a movie and linked to it is the class DOCUMENT.

now in the document class I create anoter object of the class PAGE that also extends movieclip.

But when i envoke it's contructor it works , but it does not create a movie in the tree and i desperately want one.

How can i create a movie clip inside my DOCUMENT class that has the functions of the class PAGE ?


so i want my tree to look like this



ActionScript Code:
ROOT---
      |
       DOCUMENT_MC (DOCUMENT CLASS)---
                                     |
                                  PAGE_MC (PAGE CLASS)

PLEASE !! ANY HELP !

Could Someone Please Explain This?
hi,

i was working on some project and run into one issue that i just can't explain to my self.

will try to show it with a simple example,

structure:
A --> B --> C


ActionScript Code:
// document class A.as
package {
    import flash.display.Sprite;
    import flash.events.Event;
   
    public class A extends Sprite {
        public function A() {
            addEventListener( Event.ADDED_TO_STAGE, addedToStage );
        }
        private function addedToStage(e) {
            trace("A added to stage");
           
            var b = new B();
            addChild(b);
        }
    }
}

// B.as
package {
    import flash.display.Sprite;
    import flash.events.Event;
   
    public class B extends Sprite {
        public function B() {
            addEventListener( Event.ADDED_TO_STAGE, addedToStage );
        }
        private function addedToStage(e) {
            trace("B added to stage");

            var c = new C();
            addChild(c);
        }
    }
}

// C.as
package {
    import flash.display.Sprite;
    import flash.events.Event;
   
    public class C extends Sprite {
        public function C() {
            addEventListener( Event.ADDED_TO_STAGE, addedToStage );
        }
        private function addedToStage(e) {
            trace("C added to stage");
        }
    }
}

and trace looks like this:

Code:
A added to stage
B added to stage
C added to stage
C added to stage
Why is C added twice?? not to mention if you add a D class from C what happens ...

help!

Can Anyone Explain?
Open up a new document and in frame 1 of the main timeline post the following code:

function myFunction(){
trace("stage height" + Stage.height);
trace("stage width" + Stage.width);
}
setInterval(myFunction, 20);

the stage is set to default 550 x 400 but the output window shows changing values for height and width as the function is executed. The first returns values are 550 and 400 but thereafter they change.

Any ideas

Thanks

Can You Explain It ..........
ActionScript Code:
fields = new Array();
for (var i = 0; i<125; i++) {
    if (this["b"+i].ttext != undefined) {
    //  ["b"+i].ttext   is a input field 'instant name
            fields.push(this["b"+i].ttext);
    }
}
fieldIndex =0;
function setFocusOnChanged() {
    // The change may be deleting the contents of the field
    if (this.text.length) {
        fieldIndex++;
        if (fieldIndex<fields.length) {
            Selection.setFocus(fields[fieldIndex]);
            Selection.setSelection(0, 1);
        }
    }
}
function setFieldIndex(oldFocus) {
    // This is necessary in case the user manually selects a field they are not supposed to
    if (fields[fieldIndex] != this) {
        for (var i = 0, found = false; i<fields.length && !found; i++) {
            if (fields[i] == this) {
                found = true;
                fieldIndex = i;
            }
        }
    }
    // Make the field empty to guarantee trigger of onChanged event
    this.text = "";
}
function checkForEmptyFields() {
    for (var i = 0, filled = true; i<fields.length && filled; i++) {
        filled = fields[i].text.length;
    }
   
   
}
for (var i in fields) {
    fields[i].onChanged = setFocusOnChanged;
    fields[i].onSetFocus = setfieldIndex;
}
i do not know ..........can you try your best to explain it

MD5 - Explain ?
Hello guys, brand new to this site (Ive been reading it while working with flash for the last 3 days and its been very helpful)

But there a problem I just cant seem to get my head round (Tried every post here and elsewhere with MD5 in it lol), Im sure its astoundingly simple, and I cant understand why I cannot grasp the concept myself yet.

Im trying to use MD5 encryption, I understand MD5 returns either hex, b64 or string ? I understand that there is a public and a private key involved somehow. Ive been going through scripts for about 3 hours now looking for a place to insert this information, but I cannot find it, (I have however, been able to make successful adjustments that returns my info, but I am unable to decrypt it to check)


ActionScript Code:
//   ---------------------------
//   Sting.prototype.md5();
//   return a based md5 crypted string
//   Based on Javascript implementation
//   of MD5:
//   [url]http://pajhome.org.uk/crypt/md5/index.html[/url]
//
//   A JavaScript implementation of the RSA Data Security,
//   Digest Algorithm, as defined in RFC 1321.
//   Version 1.1 Copyright (C) Paul Johnston 1999 - 2002.
//   Code also contributed by Greg Holt
//   See [url]http://pajhome.org.uk/site/legal.html[/url] for details.
//   ---------------------------
String.prototype.md5 = function() {
    function safe_add(x, y) {
        var lsw = (x & 0xFFFF)+(y & 0xFFFF);
        var msw = (x >> 16)+(y >> 16)+(lsw >> 16);
        return (msw << 16) | (lsw & 0xFFFF);
    }
    function rol(num, cnt) {
        return (num << cnt) | (num >>> (32-cnt));
    }
    function cmn(q, a, b, x, s, t) {
        return safe_add(rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
    }
    function ff(a, b, c, d, x, s, t) {
        return cmn((b & c) | ((~b) & d), a, b, x, s, t);
    }
    function gg(a, b, c, d, x, s, t) {
        return cmn((b & d) | (c & (~d)), a, b, x, s, t);
    }
    function hh(a, b, c, d, x, s, t) {
        return cmn(b ^ c ^ d, a, b, x, s, t);
    }
    function ii(a, b, c, d, x, s, t) {
        return cmn(c ^ (b | (~d)), a, b, x, s, t);
    }
    function coreMD5(x) {
        var a = 1732584193;
        var b = -271733879;
        var c = -1732584194;
        var d = 271733878;
        for (var i = 0; i<x.length; i += 16) {
            var olda = a;
            var oldb = b;
            var oldc = c;
            var oldd = d;
            a = ff(a, b, c, d, x[i+0], 7, -680876936);
            d = ff(d, a, b, c, x[i+1], 12, -389564586);
            c = ff(c, d, a, b, x[i+2], 17, 606105819);
            b = ff(b, c, d, a, x[i+3], 22, -1044525330);
            a = ff(a, b, c, d, x[i+4], 7, -176418897);
            d = ff(d, a, b, c, x[i+5], 12, 1200080426);
            c = ff(c, d, a, b, x[i+6], 17, -1473231341);
            b = ff(b, c, d, a, x[i+7], 22, -45705983);
            a = ff(a, b, c, d, x[i+8], 7, 1770035416);
            d = ff(d, a, b, c, x[i+9], 12, -1958414417);
            c = ff(c, d, a, b, x[i+10], 17, -42063);
            b = ff(b, c, d, a, x[i+11], 22, -1990404162);
            a = ff(a, b, c, d, x[i+12], 7, 1804603682);
            d = ff(d, a, b, c, x[i+13], 12, -40341101);
            c = ff(c, d, a, b, x[i+14], 17, -1502002290);
            b = ff(b, c, d, a, x[i+15], 22, 1236535329);
            a = gg(a, b, c, d, x[i+1], 5, -165796510);
            d = gg(d, a, b, c, x[i+6], 9, -1069501632);
            c = gg(c, d, a, b, x[i+11], 14, 643717713);
            b = gg(b, c, d, a, x[i+0], 20, -373897302);
            a = gg(a, b, c, d, x[i+5], 5, -701558691);
            d = gg(d, a, b, c, x[i+10], 9, 38016083);
            c = gg(c, d, a, b, x[i+15], 14, -660478335);
            b = gg(b, c, d, a, x[i+4], 20, -405537848);
            a = gg(a, b, c, d, x[i+9], 5, 568446438);
            d = gg(d, a, b, c, x[i+14], 9, -1019803690);
            c = gg(c, d, a, b, x[i+3], 14, -187363961);
            b = gg(b, c, d, a, x[i+8], 20, 1163531501);
            a = gg(a, b, c, d, x[i+13], 5, -1444681467);
            d = gg(d, a, b, c, x[i+2], 9, -51403784);
            c = gg(c, d, a, b, x[i+7], 14, 1735328473);
            b = gg(b, c, d, a, x[i+12], 20, -1926607734);
            a = hh(a, b, c, d, x[i+5], 4, -378558);
            d = hh(d, a, b, c, x[i+8], 11, -2022574463);
            c = hh(c, d, a, b, x[i+11], 16, 1839030562);
            b = hh(b, c, d, a, x[i+14], 23, -35309556);
            a = hh(a, b, c, d, x[i+1], 4, -1530992060);
            d = hh(d, a, b, c, x[i+4], 11, 1272893353);
            c = hh(c, d, a, b, x[i+7], 16, -155497632);
            b = hh(b, c, d, a, x[i+10], 23, -1094730640);
            a = hh(a, b, c, d, x[i+13], 4, 681279174);
            d = hh(d, a, b, c, x[i+0], 11, -358537222);
            c = hh(c, d, a, b, x[i+3], 16, -722521979);
            b = hh(b, c, d, a, x[i+6], 23, 76029189);
            a = hh(a, b, c, d, x[i+9], 4, -640364487);
            d = hh(d, a, b, c, x[i+12], 11, -421815835);
            c = hh(c, d, a, b, x[i+15], 16, 530742520);
            b = hh(b, c, d, a, x[i+2], 23, -995338651);
            a = ii(a, b, c, d, x[i+0], 6, -198630844);
            d = ii(d, a, b, c, x[i+7], 10, 1126891415);
            c = ii(c, d, a, b, x[i+14], 15, -1416354905);
            b = ii(b, c, d, a, x[i+5], 21, -57434055);
            a = ii(a, b, c, d, x[i+12], 6, 1700485571);
            d = ii(d, a, b, c, x[i+3], 10, -1894986606);
            c = ii(c, d, a, b, x[i+10], 15, -1051523);
            b = ii(b, c, d, a, x[i+1], 21, -2054922799);
            a = ii(a, b, c, d, x[i+8], 6, 1873313359);
            d = ii(d, a, b, c, x[i+15], 10, -30611744);
            c = ii(c, d, a, b, x[i+6], 15, -1560198380);
            b = ii(b, c, d, a, x[i+13], 21, 1309151649);
            a = ii(a, b, c, d, x[i+4], 6, -145523070);
            d = ii(d, a, b, c, x[i+11], 10, -1120210379);
            c = ii(c, d, a, b, x[i+2], 15, 718787259);
            b = ii(b, c, d, a, x[i+9], 21, -343485551);
            a = safe_add(a, olda);
            b = safe_add(b, oldb);
            c = safe_add(c, oldc);
            d = safe_add(d, oldd);
        }
        return [a, b, c, d];
    }
    function binl2hex(binarray) {
        var hex_tab = "0123456789abcdef";
        var str = "";
        for (var i = 0; i<binarray.length*4; i++) {
            str += hex_tab.charAt((binarray[i >> 2] >> ((i%4)*8+4)) & 0xF)+hex_tab.charAt((binarray[i >> 2] >> ((i%4)*8)) & 0xF);
        }
        return str;
    }
    function binl2b64(binarray) {
        var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
        var str = "";
        for (var i = 0; i<binarray.length*32; i += 6) {
            str += tab.charAt(((binarray[i >> 5] << (i%32)) & 0x3F) | ((binarray[i >> 5+1] >> (32-i%32)) & 0x3F));
        }
        return str;
    }
    function str2binl(str) {
        var nblk = ((str.length+8) >> 6)+1;
        var blks = new Array(nblk*16);
        for (var i = 0; i<nblk*16; i++) {
            blks[i] = 0;
        }
        for (var i = 0; i<str.length; i++) {
            blks[i >> 2] |= (str.charCodeAt(i) & 0xFF) << ((i%4)*8);
        }
        blks[i >> 2] |= 0x80 << ((i%4)*8);
        blks[nblk*16-2] = str.length*8;
        return blks;
    }
    function strw2binl(str) {
        var nblk = ((str.length+4) >> 5)+1;
        var blks = new Array(nblk*16);
        for (var i = 0; i<nblk*16; i++) {
            blks[i] = 0;
        }
        for (var i = 0; i<str.length; i++) {
            blks[i >> 1] |= str.charCodeAt(i) << ((i%2)*16);
        }
        blks[i >> 1] |= 0x80 << ((i%2)*16);
        blks[nblk*16-2] = str.length*16;
        return blks;
    }
    function hexMD5(str) {
        return binl2hex(coreMD5(str2binl(str)));
    }
    function hexMD5w(str) {
        return binl2hex(coreMD5(strw2binl(str)));
    }
    function b64MD5(str) {
        return binl2b64(coreMD5(str2binl(str)));
    }
    function b64MD5w(str) {
        return binl2b64(coreMD5(strw2binl(str)));
    }
    function calcMD5(str) {
        return binl2hex(coreMD5(str2binl(str)));
    }
    return calcMD5(this);
};
//   -------------
//   usage:
//   
//   myString = 'sd';
//   crypted = myString.md5();
//   trace(crypted)
//   --------------

I presume the useage is actually explained at the bottom there, though (sorry... Im not massively experienced ) I cannot understand quite what it means.

Using EncryptedData = hexMD5(MyData) will return a hex MD5 value (which is what I think I need, I am sending the data on to worldpay and I need to know what my 'secret code' is, so which part of the script should I replace with my code ? (An educated guess would be "var hex_tab = "0123456789abcdef";" and modifying this seems to change the response, though I guess changing a lot of things in this would do that) Also, just a general overview of how the hell this private and public key stuff actually works would be great.

Im probably missing something blatant but ive been working for 8 hours on this stuff today

(So : Where should I be putting my 'private key' in this ? And breifly how do all the private and public keys fit together in all this code ?)

Someone Explain This?
Here is the deal... If you look at my site I'm building
www.verticalterrain.com/evergreenengineering.com/

you will notice that the flash slideshow I built has a border all around it
except for on the right and bottom sides. This is completley rediculous
because my .fla file has a border all the way around. Basically all I did
was take a rounded rectangle, convert it to a graphic with no fill, just the
edges and made it it's own layer on top of the entire slideshow. Does
anyone know why it's doing this?

--
Best Regards,

Chris Jumonville
iMedia Web Design
503.277.3553

Can You Explain This For Me?
Hi Guys,
I'm a novice at best here, and get great satisfaction tinkering and figuring things out with web sites. I have a question about how to program a flash page that has a main navigation menu on the left side of the page that stays constant while the right side of the screen switches pages when you click a button.
I lifted the code from one of the navigation buttons and it reads as follows:
on (rollOver) {
gotoAndPlay("s1");
}
on (releaseOutside, rollOut) {
gotoAndPlay("s2");
}
on (release) {
if (_root.b<>2 and _root.m<>1) {
_root.cont1.gotoAndPlay("start");
_root.b = 2;
}
}
I know the "on realease" command will call a separate page on to the screen but in order to acheive this, what do I have to do to fly in the separate page? What's the connection?
Can you explain to a true novice what is happening here or give me a resurce to learn more about this technique?
I really appreciate your time and knowledge.
Thanx again

Not Sure How To Explain This LOL
I was wondering if its possible to have a packaged Flash file (either SWF or EXE) and be able to write code in a text box such as _root.createMovieClip.... etc... then have that code RUN on the stage... is this possible? is there anything in Flash that will allow you to do it, or is all ActionScript have to be packaged internally?

How Do I Explain This?
I'm a relative newbie at a complete loss.

I believe I have two identical files however... "institution2" has the interactivity I'm looking for, but the form components don't show up. "institution3" has working form components but the action script doesn't work.

The action script I developed (with help) to solve another problem. I'm not too familiar with all the code, but I'm pretty good with copy/paste and instance naming. Would someone please look at my files and tell me what's been smacking me in the face these last few hours.

myFile

ThanksLoads

Please Explain This To Me
Hey everyone,
I am working on a progress bar and I have pulled the code right out of the flash CS3 help, but when I input my own SWF file to upload and test the movie I get these errors. Yes I have saved the file in the same folder as my gallery SWF, and the gallery is spelled right. Please help me if you can here are my errors and my code

1172: Definition fl.controls:ProgressBar could not be found.
1172: Definition fl.controls:ProgressBarDirection could not be found.





























Edited: 01/13/2008 at 12:46:20 PM by Ryan138

Not Sure How To Explain This.......
I am trying to make a software sim for my company.
I have multiple ways to get to a specific screen (Timeline frame)
But I want the ability to link back to the frame from prevous. and there are multiple ways to get to this.

ok let me try to show by example.
i am on frame 1 and i click on a button that take me to frame 10.
I also have a button on frame 5 that take me to frame 10.
what i want to do is have a button on frame 10 that goes back to the correct frame that was clicked on from before.

so if i was on frame 1 and went to frame 10 and i cleck the button to go back to frame 1.

is there an action script that will know what to redirect back???

Any help would be great..
Thanks

Copyright © 2005-08 www.BigResource.com, All rights reserved