ActiveDen

Problems loading AS2 swfs into AS3 application

2309 posts
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Beta Tester
  • Exclusive Author
  • Sold between 100 and 1 000 dollars
  • Bought between 1 and 9 items
  • United States
  • Referred between 10 and 49 users
theflyingtinman says

In a website I’m making for a client in AS3 the client has supplied a few AS2 components (video store, video gallery, image gallery, news, etc) which he wants including in the site.
The video gallery loads and runs perfectly without changing it.
The video store took me 4 days to integrate but i got it working.

Now for the problems:
1) The image gallery loads thumbnails okay. The result of clicking a thumbnails is different if run in Flash or on my server: In Flash clicking thumbs does not load a large image: Debugging shows it executes code correctly all the way up to calling MovieclipLoader.loadClip(), with correct parameters, but none of the MovieClipLoader onLoadXxxx callbacks are ever invoked. I tried implementing them all: onLoadInit(), onLoadProgress, onLoadStart(), onLoadComplete() and onLoadError() .. but none are ever called.
On my server the result is similar, but it will always load exactly one large image before failing.

2) The news scroller simply does not appear to receive mouse events – no onRollOver / onRollOut … no onRelease.

Anyone ever experience (and hopefully solve) either of these issues in their AS3 application loading AS2 swfs?

It does not appear to be anything in the AS3 website code that is causing the problem; I made a bare AS3 loader application that does nothing but load the AS2 modules and they fail just the same in that.

3 years ago
2015 posts
  • Has been a member for 4-5 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Romania
  • Referred between 10 and 49 users
fifty_tons says

I’ve had a buyer of one of my files complain about that. I worked perfectly as it was, and loaded into an AS2 project, but when loaded into an AS3 project thumbs an images weren’t loading, plus there were some issues in the functionality of the file, that were not present in the file, nor when it was loaded into an AS2 project. Very weird.

3 years ago
6471 posts
  • Has been a member for 4-5 years
  • Won a Competition
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Grew a moustache for the Envato Movember competition
  • Community Moderator
  • Beta Tester
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • United Kingdom
  • Referred between 10 and 49 users
MSFX says

mmm, grosse.

Ive only ever loaded in background and whatnot, nothing that loads stuff in.

You say the video gallery works, does that load images? Does it use the exact same method to load them, if not copy it if you have the source..?

If you get no luck here try actionscript.org

3 years ago
MSFX is a moderator
113 posts
  • Has been a member for 3-4 years
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • United States
teamtunez says
In a website I’m making for a client in AS3 the client has supplied a few AS2 components (video store, video gallery, image gallery, news, etc) which he wants including in the site.
The video gallery loads and runs perfectly without changing it.
The video store took me 4 days to integrate but i got it working.

Now for the problems:
1) The image gallery loads thumbnails okay. The result of clicking a thumbnails is different if run in Flash or on my server: In Flash clicking thumbs does not load a large image: Debugging shows it executes code correctly all the way up to calling MovieclipLoader.loadClip(), with correct parameters, but none of the MovieClipLoader onLoadXxxx callbacks are ever invoked. I tried implementing them all: onLoadInit(), onLoadProgress, onLoadStart(), onLoadComplete() and onLoadError() .. but none are ever called.
On my server the result is similar, but it will always load exactly one large image before failing.
2) The news scroller simply does not appear to receive mouse events – no onRollOver / onRollOut … no onRelease. Anyone ever experience (and hopefully solve) either of these issues in their AS3 application loading AS2 swfs? It does not appear to be anything in the AS3 website code that is causing the problem; I made a bare AS3 loader application that does nothing but load the AS2 modules and they fail just the same in that.

Not sure if this helps but I have been told , not sure if this is true but I believe it to be as my instructor is pretty badass at Flash, that you cannot guarantee success when trying to have multiple files with different AS. He thinks that there is problably no “100% fix for all browser” solution. Again not sure if this is totally accurate but I did have an issue myslef when trying to load an AS3 file into an AS2 template. The Author researched it and told me that it could not be done and work correctly. Hope This helps. Luciano

3 years ago
2015 posts
  • Has been a member for 4-5 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Romania
  • Referred between 10 and 49 users
fifty_tons says
In a website I’m making for a client in AS3 the client has supplied a few AS2 components (video store, video gallery, image gallery, news, etc) which he wants including in the site.
The video gallery loads and runs perfectly without changing it.
The video store took me 4 days to integrate but i got it working.

Now for the problems:
1) The image gallery loads thumbnails okay. The result of clicking a thumbnails is different if run in Flash or on my server: In Flash clicking thumbs does not load a large image: Debugging shows it executes code correctly all the way up to calling MovieclipLoader.loadClip(), with correct parameters, but none of the MovieClipLoader onLoadXxxx callbacks are ever invoked. I tried implementing them all: onLoadInit(), onLoadProgress, onLoadStart(), onLoadComplete() and onLoadError() .. but none are ever called.
On my server the result is similar, but it will always load exactly one large image before failing.
2) The news scroller simply does not appear to receive mouse events – no onRollOver / onRollOut … no onRelease. Anyone ever experience (and hopefully solve) either of these issues in their AS3 application loading AS2 swfs? It does not appear to be anything in the AS3 website code that is causing the problem; I made a bare AS3 loader application that does nothing but load the AS2 modules and they fail just the same in that.
Not sure if this helps but I have been told , not sure if this is true but I believe it to be as my instructor is pretty badass at Flash, that you cannot guarantee success when trying to have multiple files with different AS. He thinks that there is problably no “100% fix for all browser” solution. Again not sure if this is totally accurate but I did have an issue myslef when trying to load an AS3 file into an AS2 template. The Author researched it and told me that it could not be done and work correctly. Hope This helps. Luciano

AS3 can’t be loaded in AS2 at all. Only vice versa. Still, there seem to be some issues. I’ve heard others say this as well.

3 years ago
4213 posts
  • Has been a member for 3-4 years
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Community Superstar
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Bought between 100 and 499 items
  • United States
  • Referred between 50 and 99 users
CodingJack says

Tinman,

if possible send me one of the problem fla’s and I’ll take a look at it for you.

3 years ago
6471 posts
  • Has been a member for 4-5 years
  • Won a Competition
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Grew a moustache for the Envato Movember competition
  • Community Moderator
  • Beta Tester
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • United Kingdom
  • Referred between 10 and 49 users
MSFX says

you can load AS2 within AS3 but you cannot directly access the functions within the AS2 SWF (thats right yeah?)

tinman, would it not be quicker to code it up in AS3 or is it alot? :(

3 years ago
MSFX is a moderator
2309 posts
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Beta Tester
  • Exclusive Author
  • Sold between 100 and 1 000 dollars
  • Bought between 1 and 9 items
  • United States
  • Referred between 10 and 49 users
theflyingtinman says
you can load AS2 within AS3 but you cannot directly access the functions within the AS2 SWF (thats right yeah?)

Right, I can use LocalConnection to control the AS2 files from AS3 where I need to (muting mp3 player when video is started, etc) but these two problems just exist in the loaded swf’s internal functionality regardless of any attempt at external control.

The problem appears to run deeper than just the onLoadxxxx callbacks not firing; I wrote a patch for the callbacks to explicitly detect when the target MovieClip receives loaded content; the patch works; the movieclip is empty when I call LoadClip (or loadMovie, I tried both) but when the “new” content arrives it does not match the image at the url passed to the loader .. it is always the same as the first url used – even if I create a new MovieClipLoader for each load.!! Well, I have no more hair left to tear out over this one … I may have to bite the bullet and translate to AS3

tinman, would it not be quicker to code it up in AS3 or is it alot? :(

I already spent about 4 hours on that but the end is still not in sight :(

3 years ago
2309 posts
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Beta Tester
  • Exclusive Author
  • Sold between 100 and 1 000 dollars
  • Bought between 1 and 9 items
  • United States
  • Referred between 10 and 49 users
theflyingtinman says

@crackerjack : Thanks, I’ll put something together for you to look at.

3 years ago
6471 posts
  • Has been a member for 4-5 years
  • Won a Competition
  • Contributed a Tutorial to a Tuts+ Site
  • Contributed a Blog Post
  • Grew a moustache for the Envato Movember competition
  • Community Moderator
  • Beta Tester
  • Exclusive Author
  • Sold between 1 000 and 5 000 dollars
  • Bought between 50 and 99 items
  • United Kingdom
  • Referred between 10 and 49 users
MSFX says
you can load AS2 within AS3 but you cannot directly access the functions within the AS2 SWF (thats right yeah?)

Right, I can use LocalConnection to control the AS2 files from AS3 where I need to (muting mp3 player when video is started, etc) but these two problems just exist in the loaded swf’s internal functionality regardless of any attempt at external control.

The problem appears to run deeper than just the onLoadxxxx callbacks not firing; I wrote a patch for the callbacks to explicitly detect when the target MovieClip receives loaded content; the patch works; the movieclip is empty when I call LoadClip (or loadMovie, I tried both) but when the “new” content arrives it does not match the image at the url passed to the loader .. it is always the same as the first url used – even if I create a new MovieClipLoader for each load.!! Well, I have no more hair left to tear out over this one … I may have to bite the bullet and translate to AS3

tinman, would it not be quicker to code it up in AS3 or is it alot? :(

I already spent about 4 hours on that but the end is still not in sight :(

Damn man :( what a pain :(

And the moral of this story children, never mix your langauges :P

Hope you get a lucky break Mr T :)

3 years ago
MSFX is a moderator
by
by
by
by
by