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




AS3 - Runtime Expression Evaluation AS3 To AS2 Conversion



Hey guys,

Unfortunately the company I work for uses a AS2 engine which I build components for. I'm trying to build a expression evaluation function for one the the components. Found a great library at sephiroth.it

http://bit.ly/3HPLh9

Unfortunately for me, it's in AS3. I'm going to try and convert it, if anyone would like to help it would be greatly appreciated. The link to the source code is broken but I found another one here

http://bit.ly/1I6dMc

Also, if anyone knows of any already made runtime expression evaluations for AS2, please let me know.

Thanks. I'll post anything I get working.



Ultrashock Forums > Flash > ActionScript
Posted on: 2008-10-08


View Complete Forum Thread with Replies

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

Runtime Expression Evaluation AS3 To AS2 Conversion
Hey guys,

Unfortunately the company I work for uses a AS2 engine which I build components for. I'm trying to build a expression evaluation function for one the the components. Found a great library at sephiroth.it

http://bit.ly/3HPLh9

Unfortunately for me, it's in AS3. I'm going to try and convert it, if anyone would like to help it would be greatly appreciated. The link to the source code is broken but I found another one here

http://bit.ly/1I6dMc

Also, if anyone knows of any already made runtime expression evaluations for AS2, please let me know.

Thanks. I'll post anything I get working.

Adding String Data To An Expression For Evaluation
Hi, I have the following function:


Code:
getInfo = function (input, arrayData, desiredResult)
{
for (i = 0; i < arrayData.length; i++)
{
if (arrayData[i].button == input)
{
return arrayData[i].desiredResult;
}
}
};
arrayData is a multidimensional array containing objects.

What I need returned is arrayData[i].desiredResult, where desiredResult is a string passed to the function. For example:

test("dogs", theArray, "color") needs to return the evaluated value of arrayData[i].color. How can I achieve this? Thanks!

Runtime Code Evaluation
Hello everyone,

i'm pretty new to actionscript and maybe this is a totaly rookie question but:

Is it possible to instanciate a class via a string containing the class name.

ex:

var className:String = "StarSprite";
s:StarSprite = new className; // Cannot compile !

I tried to play around with eval

var className:String = "StarSprite";
s = eval("new"+className);
etc...

But i could'nt manage to get it right. In a more general way, is it possible to generate code, evaluated at runtime ?

thanks for any help

emmanuel:

Swf To Jpg _ Runtime Conversion
Do anybody have any idea about how to convert swf into jpg at runtime.

Actually my task is creat a photo album in flash which user can develop by dragging and dropping different pictures, graphics etc...and after they finish creating their page

I got two ways for that but none of them gives me solution.

1st way
--------
I got a dll, which after incorporating in .NET framework converts single or multiple frames into jpgs at runtime. But this solution only converts the frames kept only on the root. Whereas I want to specify exactly which movieclip I want to publish as jpg.

This is the link http://www.freedownloadscenter.com/P..._To_Image.html


2nd way
--------
This solution requires PHP, which i cant have on my hosting platform.
This is the link


PLEASE GUYS HELP ME OUT...

Text-to-graphic Conversion At Runtime
Hi there,

Thanks for looking at this post. I have a project in which I've got text being loaded in from an external source, to be displayed in a text field object and dynamically moved about and re-scaled. If anyone has tried to do this with dynamic (or, as I've found out, even static) text objects, you might have noticed that it isn't done very smoothly. From appearances, the display of the text seems to be very dependent on the system's own typeface-display capabilities. In rescaling in particular, transitions between size are jerky as it jumps between held font sizes - very unlike Flash's usual smooth scaling.

I've tried the exact same moving/scaling functions as in my project on graphic symbols, and also text objects converted to graphic objects through the 'Break Apart' command. In these cases, the scaling looks great; very smooth with no jumping. So I don't have a problem as long as I do this with all the text I use in the project, but I want it to load data in dynamically, so I'm stuck.

To reiterate what I'm asking: Is there any way to apply this text to graphic conversion on the fly? Or another workaround that anyone can think of? I'm not too sure how well known the jerky-scaling issue is in Flash, but I haven't had much luck trying to read around the subject - so I'd be really grateful for any advice at all.

Thank you!
Adam

:: If Statment Evaluation Help ::
If (this is the second time youve play this in a row)
gotoAndplay (frame 7);
else( go to play frame 1)
}

Basically I want to have a script that if you click a button then click it again it will take you somewhere else. BUT if you click it once, then click something else, then click the first button again it will take you to the original spot.

thanks
n

sorry if that didnt make any sense

Array Evaluation
i have an array that is populated with times...and i was wondering if there was a function to return the lowest value in the entire array? or if there is a loop i would go through to establish what the lowest value is? any help is appreciated, thank you

Array Evaluation
Hey!!!

I'm working on a playlist that makes tracks clickable/'listenable' when
the tracknumber appears in a textfile that gets loaded in. The file
looks likes this:
audioText=1,4,2,8,

I'm trying to loop through a array that looks which looks like this:
for(var i=0; i<audioArray.length; i++)

the array is build by the following script which works just fine:
audioArray = this.audioText.split(",");

To the point now - It doesn't work at all!!! The number of ellements
in my array is correvt, but the wrong tracks are enabled....

Here's my script:

ActionScript Code:
for(var i=0; i<audioArray.length; i++)
    {
        if(audioArray[i] != "")
        {
            // trackID
            var trackID = int(audioArray[i] + 1);
           
            // show icon
            _root["icon"+trackID]._alpha = 100;
            // save id
            _root["track"+trackID].id = i + 1;
            // mouseover
            _root["track"+trackID].onRollOver = function()
            {
                // grow
                this._alpha = 12;
            }
            // mouseout
            _root["track"+trackID].onRollOut = function()
            {
                // shrink
                this._alpha = 0;
            }
            // release
            _root["track"+trackID].onRelease = function()
            {
                // handle markers
                playTrack(this.id); // starts at 0
                audioActive = 1;
            }
        }
    }

In-line Evaluation
Is there any function in flash that allows for 'in-line evaluation'?

For example, in php I can type

eval ( 'php statement here' );

and php will execute 'php statement here' as if I typed it as a command. I'm trying to execute dynamic code is the problem.

In-line Evaluation
Is there any function in flash that allows for 'in-line evaluation'?

For example, in php I can type

eval ( 'php statement here' );

and php will execute 'php statement here' as if I typed it as a command. I'm trying to execute dynamic code is the problem.

Dynamic Evaluation
Hello all,

Working on a project here where I need to dynamically attach movie clips to some predefined movieclips on the stage. I have a resultset that is returned from CF that contains the base movieclip info which needs to be dynamically evaluated then used in the attachMovie() method.

Here is my code for reference:



Code:
getPositions();

function getPositions ()
{
manager.getSlipPos();
}

function getSlipPos_Result(result)
{
for (i = 0; i < result.length; i++) {
id = result.getItemAt(i).ID;
slip = result.getItemAt(i).slip;
pos = result.getItemAt(i).pos;
spaces = result.getItemAt(i).spaces;
type = result.getItemAt(i).typeAbbr;

place(id, slip, pos, spaces, type);
}
}

function place(id, slip, pos, spaces, type)
{

thisMC = "CP1_" + slip + pos + "MC";


CP1MC.thisMC.attachMovie(type, type + "_" + id, CP1MC.thisMC.getNextHighestDepth());
}
The base movie clips used for attachment are names as follows:

CP1_Slip1aMC
CP1_Slip1bMC
CP1_Slip2aMC
CP1_Slip2bMC

. . . etc.

Where "Slip1" variable
And "a" or "b" is variable.

Does this all make sense?

In summary im needing to loop the recordset which is working fine then place a movie clip dynamically with a dynamically SPECIFIED movieclip based on the current looping record.

Please let me know if you have any questions. . .

Multiple Variable Evaluation
Hi

I have a number of clips (drawers (named d1, d2 etc...)) each of these can have their variable (state) set to open or closed.

I need to be able to make a button that when clicked performs one action on the clips that are set to "open" and another action on the clips that are set to "closed"

I thought this would be simple, maybe i am jus havin a memory block :S anyway can anyone help me out with the script i need to put on the button.

cheers

3quid

Establishing Variables For Evaluation...
I'm having a little situation...

I'm scripting a menu which consists of 5 items. I am attempting to script each menu items button so if the user were to select the same item button twice successively, the actions tied to that button will only execute on the first time selected.

The process I've used in the past has been to establish variables for each menu item and test for those variables on(release); i.e.

Code:
//script for menu item 1 (button 1)//
on (release) {
if (button1!=1) {
//execute action//
_root.BG2.gotoAndPlay(1);
}
button1=1;
button2=0;
button3=0;
button4=0;
button5=0;
}
//script for menu item 2 (button 2)//
on (release) {
if (button2!=1) {
_root.BG2.gotoAndPlay(1);
}
button1=0;
button2=1;
button3=0;
button4=0;
button5=0;
}
I have used the above process a number of times without flaw with V5.

Now, for some reason this is not working. I can only seem to get one button to execute its action. After doing so, none of the other buttons function.

I'm a bit lost...any thoughts...

Thanks

Chessgenie In Flash MX For Evaluation
Do you play Chess? I've just created a Chess diagram generator and Chess game Viewer (Chessgenie) written in Actionscript. This is data driven and interactive and currently is used as front-end program to view chess games. Can anyone evaluate my Chessgenie and tell me which area it can be improved. Any suggestions and comments are highly appreciated. You'll find Chessgenie at www.rootyhillchess.org

Nested Evaluation Functions
The problem I am stuck on is that I have a function evaluating if the date has passed. Then within that function I am wanting it to make the first unpassed date red and all the subsequent unpassed dates black. I've tried everything I can think of but I can't get it to work. I tried the statements if, for, while, do while, else if. None of them worked right. Here is the code

Code:
now = new Date();
month = now.getMonth()+1;
day = now.getDate();
year = now.getFullYear();
var event = new LoadVars();
event.load("text/calruns.txt");
event.onLoad = function(success){
if(success){
compare();
for (i=0; i<c; i++){
runslist.htmlText += this["month"+i]+"/"+this["day"+i]+"/"+this["year"+i]+newline+this["notes"+i]+newline+this["loc"+i]+newline+this["url"+i]+newline+"----------";
printMC.pmain.htmlText += this["month"+i]+"/"+this["day"+i]+"/"+this["year"+i]+newline+this["notes"+i]+newline+this["loc"+i]+newline+this["url"+i]+newline+"----------";
}
}else{
//the vars couldn't be loaded.
}
};;
function compare(){
c = (this.event["counter"]);
for(i=0; i<c; i++){
emonth = this["mexpired"+i] = false;
eday = this["dexpired"+i] = false;
if(this.event["month"+i]<month){
emonth = true;}
if(this.event["day"+i]<day){
eday = true;}
if(emonth == true && eday == true || this.event["month"+i] == month && eday ==true || emonth == true){
fcolor = 1;
}else{
/**something needed here to make it change the first one
to red then the rest to black**/
}
switch(fcolor){
case 1:
this.event["month"+i] = "<FONT COLOR="#999999">"+this.event["month"+i];
this.event["day"+i] = "<FONT COLOR="#999999">"+this.event["day"+i];
this.event["year"+i] = "<FONT COLOR="#999999">"+this.event["year"+i];
this.event["loc"+i] = "<FONT COLOR="#999999">"+this.event["loc"+i];
this.event["notes"+i] = "<FONT COLOR="#999999">"+this.event["notes"+i];
this.event["url"+i] = "<FONT COLOR="#999999">"+this.event["url"+i];
break;

case 2:
this.event["month"+i] = "<FONT COLOR="#FF0000">"+this.event["month"+i];
this.event["day"+i] = "<FONT COLOR="#FF0000">"+this.event["day"+i];
this.event["year"+i] = "<FONT COLOR="#FF0000">"+this.event["year"+i];
this.event["loc"+i] = "<FONT COLOR="#FF0000">"+this.event["loc"+i];
this.event["notes"+i] = "<FONT COLOR="#FF0000">"+this.event["notes"+i];
this.event["url"+i] = "<FONT COLOR="#0066CC">"+this.event["url"+i];
break;

case 3:
this.event["month"+i] = "<FONT COLOR="#000000">"+this.event["month"+i];
this.event["day"+i] = "<FONT COLOR="#000000">"+this.event["day"+i];
this.event["year"+i] = "<FONT COLOR="#000000">"+this.event["year"+i];
this.event["loc"+i] = "<FONT COLOR="#000000">"+this.event["loc"+i];
this.event["notes"+i] = "<FONT COLOR="#000000">"+this.event["notes"+i];
this.event["url"+i] = "<FONT COLOR="#0066CC">"+this.event["url"+i];
this.event = "<FONT COLOR="#000000">";
break;
}
}
}
I've also attached the fla, it was made in MX2002.

Text Field Evaluation
Could anyone tell me how to evaluate content of a text field? Such as looking for certain words in an open response, and if they're there, then, score adds, if not score subtracts. Thanks.

MovieClip Path Evaluation
Hi everybody,

please don't you know, how to evaluate string MovieClip path that contains nested MovieClips?

e.g. this won't work:
var path : String = 'window_mc.button_mc';
var clip : MovieClip = _root[path];

is there a simple way (like deprecated eval) or should I have a loop and evaluate each dot-separated tail of the string?

Thanks

Strange: If Evaluation Not Accurate...?
I'm observing a strange occurrence. When I evaluate for the following:
Code:
//Create Logo Holder & Position
if(Stage.width > 210 && Stage.height > 210){
_level0.attachMovie("Logo", "LogoClip1", 1, {_x: 0, _y: 0});
_level0.LogoClip1._alpha = 50;
}
else{
_level0.attachMovie("LogoTile", "LogoClip2", 1, {_x: -15, _y: 5});
_level0.LogoClip2._alpha = 50;
}
I would assume that if my movies dimensions we set to 209 x 209, my second case would execute. However, after some testing I've determined the result is that case 1 will not execute until my movie dimensions are set to 311 x 311. This is weird.

Below is my entire move script:
Code:
//Disable Context Menu
Stage.showMenu = false;

//Set Stage
Stage.scaleMode = "noScale";
Stage.align = "TL";

//Import path
var vidPath = path;

//Create Logo Holder & Position
if(Stage.width > 210 && Stage.height > 210){
_level0.attachMovie("Logo", "LogoClip1", 1, {_x: 0, _y: 0});
_level0.LogoClip1._alpha = 50;
}
else{
_level0.attachMovie("LogoTile", "LogoClip2", 1, {_x: -15, _y: 5});
_level0.LogoClip2._alpha = 50;
}



function positionLogo1(clip) {
clip._x = Math.round((Stage.width/2)-(215/2));
clip._y = Math.round((Stage.height/2)-(60/2));
}

//Create HolderMC & Load sample
var j:MovieClip = this.createEmptyMovieClip("Holder_mc",0);
var mcl:MovieClipLoader = new MovieClipLoader();
var mcl_listener:Object = {};

mcl_listener.onLoadInit = function(target_mc:MovieClip) {
target_mc._visible = true;
positionLogo(_level0.Logo);
}

mcl_listener.onLoadProgress = function(target_mc:MovieClip,bl:Number,bt:Number) {
trace(target_mc + " has loaded: " + bl + " of total: " + bt);
}

mcl.addListener(mcl_listener);
mcl.loadClip(vidPath,j);

positionLogo1(_level0.LogoClip1);

stop();
But I don't see what could be causing that kind of oddity.

Any clues?

Poker Hand Evaluation
I'm creating a Texas Hold'em poker game and I was wondering if there was any poker hand evaluation code around that I could use or learn from. So far I have everything worked out, dealing the cards, etc. I only need to work out this code. Figured I can do it long hand no problem, but it might take me a good 8 hours worth of coding. Hopefully this 2 minutes of thread typing will alleviate that

Thanks
webG

String Evaluation [returns]
Hi,

I was wondering if it's possible to evaluate a string of text to see how many [returns] (lines) it contains. i.e. I have a paragraph in a dynamic textfield and I'd count the # of chr(13) instances in there.

thanks!

*********** JTools 1.2 Evaluation (Trial Version)
Does anyone have the JTools 1.2 Evaluation (Trial)?

Please send to mikalux@gmx.de if anyone have it.

Thank you!

Mikalux

How Can I Do A Limit Day Evaluation Period In A Flash Exe
Hello, I´m new in flash and i need please!!! all infomation about how can i do to set a day evaluation period in a demo of flash aplication
I apreciate all your help
thanks a lot

Logical Evaluation With Dynamic Operator
Hi, all.

I have a function that evaluate numeric values based on a dynamic operator.

Something like:


Code:
function ev(value1:uint, value2:uint, operator:String = ">")
{
return operator == ">" ? value1 > 2 : value1 < value2;
}

For performance improvement issues, I want to remove the first condition (operator == ">"). Is there a way? In AS2 I could use the eval, for example.


Thank you,
CaioToOn!

How Can I Do A Limit Day Evaluation Period In A Flash Exe
Hello, I´m new in flash and i need please!!! all infomation about how can i do to set a day evaluation period in a demo of flash aplication
I apreciate all your help
thanks a lot

AS3 - Logical Evaluation With Dynamic Operator
Hi, all.

I have a function that evaluate numeric values based on a dynamic operator.

Something like:


Code:
function evaluate( value1:uint, value2:uint, operator:String = ">" )
{
return operator == ">" ? value1 > 2 : value1 < value2;
}

For performance improvement issues, I want to remove the first condition (operator == ">"). Is there a way? In AS2 I could use the eval, for example.


Thank you,
CaioToOn!

How To Make Trail Version/Evaluation
Anyone know how to make a Flash (exe) become a Trail Version, so that people can only access/use it for 30 days. Even if they change their system clock back to the previous date also doesn't affect it.
Or can make something like the shockwave.com games trail funtion?

Multiple MC Controld And _current Frame Evaluation
I have 13 movie clips in my root. I want to to activate and deactivate each with on(press). I'm having trouble writing an If And or Else statement that accurately processes where each moving clip current frame is, and to make it deactivate if any or all movie clips are on a certain frame. ie frame 15.

Easy solutions?

Thanks in advance...

[F8] Possible To Set Runtime Sharing Path At... Runtime?
After a weekend of pulling my hair out on this problem it looks like the paths for runtime sharing are relative to the HTML page, not the SWF. This is a problem because the client wants to be carefree in distributing the SWFs around the server. (In fact is demanding it.) So I need a way to set the runtime sharing path at runtime.

Or put another way...
"child.swf" is looking for fonts and graphics in "master.swf" If I move them all (including "master.swf") to some/random/folder/ and embed them from a HTML page at /a/different/folder/ the linkage breaks, even though the files load fine. (The paths to the SWFs are sent via XML.)

Any ideas? I really can't hard-code this and I probably can't compile new versions each time they feel like moving stuff around.

Worst case I'll skip the runtime sharing, but it would make the files needlessly big and slow.

(Publishing to Flash 8 AS2)

How Do I Preload Runtime Shared Libraries Without "import For Runtime Sharing"?
Hi, i have a big shared font library. I want all the font symbols to reside in fonts.swf. I have a loader.swf loading main.swf, and fonts.swf. Even though fonts.swf loads completely, the fonts aren't available to main.swf. I don't want to choose import for the font symbols in main.swf, because that will make Flash compile fonts.swf every time I publish main.swf, won't it? How can I get main.swf to use fonts in fonts.swf without "import in first frame"?
Thanks!

FS Commands During Runtime (not At Runtime)
ignore this, I figured it out !

FS Commands During Runtime (not At Runtime)
ignore this, I figured it out !

With - Can It Be An Expression?
So many of the Flash Actionscript commands allow the arguements to be an expression is this possible for the with statement ..

for example I now have

for (i=0;i<myArray.lenght;i++){
if (i == 0) {
with (BaseMovieOne.PlaceHolderMovieOne){
PlaceHolderMCOne.attachMovie("mc1","mcOne",2)
.... (Other statements )
}
}
if (i == 1) {
with (BaseMovieTwo.PlaceHolderMovieTwo){
PlaceHolderMCTwo.attachMovie("mc2","mcTwo",2)
.... (Other statements )
}
}
}
I think you get the picture -- I would like to be able to get rid of the if's and do an expression with

any ideas?

The Expression Fl
Hello, I am learning Flash MX, and by no stretch of imagination a programmer. I have an effect which I downloaded to attempt to learn the Actionscript source.

I am trying to decipher some actionscript and have found a 'fl' expression in the script. What does this do/mean?

In context
this.fl = 1000;

var.z = random(object.environment.fl*2)-object.environment.fl:

I can't find any reference to fl anywhere?

KCM

Am I Using The Right Expression?
Here's what I have. I've made a scroller. It's a movie clip on the main stage. Within the movie clip (scroller) are a bunch of seperate buttons.

When I click on a button from the main stage, I would like it to jump to frame 3.

Inside the scroller movie clip, I have actionscript on one of the buttons:


on (release) {
gotoAndPlay(3); }

But for some reason, it won't play frame 3 on the main stage. Am I missing something? Is 'gotoAndPlay' the right expression to use?

Expression Syntax
How do I write the following set statement so that I can dynamically set from the value of myNewNumber+i from i in the loop with the value of the conversion of the string?


Code:
for (i=6;i<7;i++) {
myNewNumber1 = Number("cat"+i+"Total");
trace (typeof myNewNumber1);
}
cheers

GotoAndStop(expression?)
how do I make a movieclip gotoAndStop to a frame defined by a variable?

ie: gotoAndStop(_root.variable)....

Help With GotoAndPlay Expression Please
on (release) {
for (j=1; j<=100; j++) {
tellTarget ("_root.object1") {
gotoAndPlay (j);
}
}
}
any clue why this wouldn't work? I works if I put in nextframe or a number - just not if I put in J there.

THanks

How Do U Put Variables In An IF Expression?
Hi,

Ive got a script that validates a form field using an IF statement. The problem I have is that I want to replace the number '1' in the script with a variable value -(Ive set a variable named obne for this example)

Ive put brackets round it but it throws an error.

Im a using the correct syntax or can this not be done?

Cheers...John

PS - THis is the code:

on (release) {
one = "1";
if (s1_end_hour != int(s1_end_hour)) {
gotoAndPlay ("50 error");
}
}

String As Expression?
I'm annoyed off at uni because we have to use an archaic graphing program that really sucks. So I ndecided to make my own in Flash!!

However, i want to type my function in a text box, then use it as an expression.

At the moment, I just put it in the .fla file:

Code:
function drawGraph() {
var i = 0;
for (i; i<=xscale; i++) {
myPoint = "p"+i;
duplicateMovieClip ("p", myPoint, i);
var x = i;
this[myPoint]._y = Math.pow(x,2);
this[myPoint]._x = x;
}
i=0;
}


Can I just call the string and put it in the code? or how else can i do it?

String To Expression?
I'm trying to make a movie where you type into a textbox an expression, which you can run a variable through and get the result out.
However, anything put into a text box comes out as a string! How do I convert the string into an expression?
(the string is something like Math.sqrt(x + 3) + 2*x, so theres quite a few variables in it)

From String To Expression?
Hi,

I know of the toString() function to transform an expression into a string. Is there also a way to do the opposite?
I have the following code:
old_name = "_level0.butt_"+(c-1);
new_name = "butt_"+c;
setProperty(old_name,_name,new_name);

Now, "old_name" should be turned into(/evaluaded as) an expression, shouldn't it?

How best to do this?

ThanX

cYa

Ivo

Dynamic Expression Help Please
Here's what I'd like to accomplish:

blah1 = 1
blah2 = 2
blah3 = 3
and so on... (the variable will not be in order)

I'd like to be able to call the 'blah' variables dynamicly instead of having to enter the specific 'blah's into the expression. (there is going to be blah1 through blah200)

I'd like to be able to do the following but it doesn't seem to work:

first off adder=1

---
set variable x position of _root.leaf to "blah" + adder
set adder = adder + 1
--

the above two lines would be code in frames 1-200 of a movie clip that controls the x position of _root.leaf.

I can't seem to get the dynamic creation of the blah variable to be seen as an expression.

Any and all effort to help is appreciated. Thanks.

How Do You Use The Type Expression
Hello:
I was wondering, how do you use the "type expression" when you select gotoAndPlay.

What is it useful for?
I´m just curious cause yet I still havn´t had the need to use it.

Thanks for anyone who replies.

Addind 1 To An Expression
I have made a flash banner system that allows a user to add as many banners as they would like, select whether they are flash movies or jpgs, and set a timer on how long each is viewable.

there is a variable in my php that says $type=(jpg or swf)
when they chose this, if they add 10 banners, each has to be in that format. I want a user to say, add 10 banners, and X are jpgs and X of them are swfs.

With me so far?
Here is what I have for code so far.. it's probably way off.
//////////////////////////////////////////////////////////////
PHP CODE

<?
$bannerlocate = "banner-snap/banners/";
$num = "0";

$max = "7";
$type1 = "swf";
$type2 = "jpg";
$type3 = "swf";
$type4 = "jpg";
$type5 = "swf";
$type6 = "jpg";
$pause = "5";
$return = "bannerlocate=$bannerlocate&num=$num&max=$max&type =$type&pause=$pause&whenloaded=$whenloaded" ;

echo $return;
?>

/////////////////////////////////////////////////////////////
<b>FLASH CODE- on the root, frame 2<b>
_root.num++;

if (_root.num >= _root.max) {
_root.num = "1";
}
if (this["type"+_root.num] =".jpg") {
loadMovie(_root.bannerlocate+_root.num +".jpg", "loadimage.loadimage1");
}
if (this["type"+_root.num] ="swf") {
loadMovie(_root.bannerlocate+_root.num +".swf", "loadimage.loadimage1");
}


<b>Then, it starts the timer, pauses x seconds, and loops to frame 2. It does not load the movie at all...<b>


Can you help?????!!! Thanks!

Dynamic Expression
Ok ,

I'm trying to make a text effect but I always have a hard time to write the dynamic expretions.

_root.title add i.let.myletmc.setTextFormat(myText);

This happens after my duplicate. and it's with the add i that I have a problem.

I tried
set("/title" add i add "/let/myletmc", setTextFormat(myText));

and it doen'st work. Please let me know the right syntax.

Thanks heeps

Expression Question
Do anyone know what
Code:
_parent.selected != ""
means?

String To Expression
I used an array to create this dynamically created string:
"_parent.MC1.TEXTBOX1"

I am unable to actually target the Textbox1 with this string, and I need to use this string to target the textbox as a path within flash.
What I am doing is attaching a value to the target path using the dynamically created text path.

step1
_root.value_1 = "Introduction";

step2
path_1 ="_parent.MC1.TEXTBOX1";

step3
this[path_1] =_root.value_1;

so

_parent.MC1.TEXTBOX1 = "Introduction";

I am having trouble making step2 work as I want it to in step3.

thanks for any help,
Aubrey

Expression In 'trace'
I working through an MX tutorial and have got myself in a tangle.

I am trying to get the Trace command to return the x or y position of my movie clip. If the position is hard coded it works but if I use an expression it don't....

Here's the code so far:

onEnterFrame = function () {
n++;
attachMovie("mcBall", "new"+n, n);
setProperty("new"+n, _x, _xmouse);
setProperty("new"+n, _y, _ymouse);

trace ("new"+n._y);
};




If I use:

trace (new1._x)

it works, but:

trace ("new"+n._x)

does not?

I think I need to convert the expression to a number or something but I've tried everything I can think of......

GotoAndStop() With Expression. How?
1)there are 10 frames in 10 layers.Each frame has different content, hence kept in different layers
2)there is a input text box with a "go" push button next to it
3)when a user enters 5 in the input text box and clicks on "go" button, movie control should go to frame 5 and stop

How to achieve the above

__________________________________________________ ________


I have tried the following but it is not working


on (release, releaseOutside) {
gotoAndStop(count);
}

where count is the input text box name

I have also tried the following, but it is not working

on (release, releaseOutside) {
gotoAndStop(_root.count);
}

I have also tried the following, but it is not working
on (release, releaseOutside) {
_root.gotoAndStop(count);
}

grateful if you can help

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