# Question about flash5 AS & flashMX AS

**URL:** <https://forum.kirupa.com/t/question-about-flash5-as-flashmx-as/5023>\
**Category:** flash\
**Created:** [August 29, 2002, 8:21am UTC](https://forum.kirupa.com/t/question-about-flash5-as-flashmx-as/5023 "2002-08-29T08:21:59Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jepezi](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jepezi/32/57_2.png) [@jepezi](https://forum.kirupa.com/u/jepezi)\
**Post date:** [August 29, 2002, 8:21am UTC](https://forum.kirupa.com/t/question-about-flash5-as-flashmx-as/5023/1 "2002-08-29T08:21:59Z")

</div>

I have one .fla file that is the cool effect. my question is when i open it in flashMX and then export as Flash6 swf file. it doesn’t work as the Flash5! anybody can tell me why? I spent about 1 hour but I’m not familiar with FlashMX AS much. Any help would be appreciated.  
this is the .fla \>\> [cool.fla](http://www.geocities.com/jepezis/cool.fla)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2002, 8:31am UTC](https://forum.kirupa.com/t/question-about-flash5-as-flashmx-as/5023/2 "2002-08-29T08:31:12Z")

</div>

The only suggestion I can make is to go to [macromedia.com](http://macromedia.com) and check out any current info they have about deprecated script from 5 to MX. They had a lot posted about the transition from 4 to 5 within just a few weeks of the release.

Then you have to look for those things in the FLA and find ways of changing them over.

Seems odd though. I hadn’t heard of anything being deprecated from 5 to MX. I thought all the 5.0 scripts would work fine in 6.0.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2002, 8:41am UTC](https://forum.kirupa.com/t/question-about-flash5-as-flashmx-as/5023/3 "2002-08-29T08:41:59Z")

</div>

Deprecated methods are not the problem. Usually, it’s “just” a matter of variable scope. I’ll have a look at your fla.

pom :asian:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 29, 2002, 9:27am UTC](https://forum.kirupa.com/t/question-about-flash5-as-flashmx-as/5023/4 "2002-08-29T09:27:47Z")

</div>

I try checking the variable scope but find nothing. :pirate: i’ll keep trying.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2002, 7:51am UTC](https://forum.kirupa.com/t/question-about-flash5-as-flashmx-as/5023/5 "2002-08-30T07:51:05Z")

</div>

I examined the code that resides in first frame last night and found that the code doesn’t work when publish in FlashMX swf.  
I don’t know how the code works in FlashMX but one thing that I know is that code works well in Flash5. BUT I need to use it as FlashMX. The following is the code that makes me confused!!  
//it’s simple to duplicate the clip 7 times and positions them in x-axis.  
for (i=1; i\<8; i++) {  
duplicateMovieClip (“object0”, “object”+i, i);  
\_root[“object”+i].number=i;  
\_root[“object”+i].gotoAndStop(i+1);  
}  
MovieClip.prototype.pos= function(){  
\_x = 100\*number;  
}

// the code in the clip  
onClipEvent(load){  
pos();  
}  
BUT this clip doesn’t work in MX!!! anyone know please tell me …  
thanks  
PS. sorry for my english=)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2002, 9:49am UTC](https://forum.kirupa.com/t/question-about-flash5-as-flashmx-as/5023/6 "2002-08-30T09:49:04Z")

</div>

Try the code this way:

//it’s simple to duplicate the clip 7 times and positions them in x-axis.  
for (i=1; i\<8; i++) {  
duplicateMovieClip (“object0”, “object”+i, i);

\_root[“object”+i].number=i;  
\_root[“object”+i].gotoAndStop(i+1);  
}  
MovieClip.prototype.pos= function(){  
this.\_x = 100\*this.number;  
}

Should work, I tried it in MX.  
You forgot the ‘this’-reference in the prototype-declaration.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2002, 10:09am UTC](https://forum.kirupa.com/t/question-about-flash5-as-flashmx-as/5023/7 "2002-08-30T10:09:11Z")

</div>

thank you very much. i never think about “this” before. 😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 30, 2002, 11:50am UTC](https://forum.kirupa.com/t/question-about-flash5-as-flashmx-as/5023/8 "2002-08-30T11:50:50Z")

</div>

Variable scope… And just a few things about the code:

```auto
for (i=1; i<8; i++) {
mc=duplicateMovieClip ("object0", "object"+i, i);
mc.number=i;
mc.gotoAndStop(i+1);
mc.onLoad=pos;
}
MovieClip.prototype.pos= function(){
this._x = 100*this.number;
}

```

pom :asian:
