Skip to main content
Z__Murphy
Known Participant
June 16, 2011
Question

Warning 1058: migration issue

  • June 16, 2011
  • 3 replies
  • 1064 views

Hi,

I've been learning flash and have scoured the internet for my specific solution, but I can't find it.

I have a scene with my content I'm publishing to AS1 and it works wonderful. I am trying to now link up external URLs for buttons I have. I tried to convert my AS1 into AS3 and when I do i get a compiler error 1058 on Line 47 of Frame.

Which contains:

load_link = "page" + _level.pressed + ".swf";
stop();

When I publish to AS3 My content loops endlessly. Which I'm guessing is a syntax error between the two versions of the script and this frames code.

I'm at a loss I understand scripting, but I don't know all the methods or where to start.

I'm eager for a solution.

My website is www.blackelementpmc.com

My question would be how do I turn the above statement into a AS3 compatible line?

Or, how do I create buttons for URLs in AS1?

I prefer to convert to the newer technology.

Thanks for the help

If you post using any acronyms please define them. I've been working with flash for only 2 weeks now, and I'm technically an accountant

This topic has been closed for replies.

3 replies

kglad
Community Expert
Community Expert
June 16, 2011

use the flash help files where the classes are listed along with valid methods, properties and events.  most likely, it has all the information you need.

you didn't show any problematic code but if you're using getURL(), that's now navigateToURL().  and, in as2, the target url was accepted as a parameter in getURL, while in as3, all target strings must be converted to urlrequests using the urlrequest() class:

getURL("http://www.adobe.com"); // as2

// equiv

navigateToURL(new URLRequest("http://www.adobe.com"));  // as3

Ned Murphy
Legend
June 16, 2011

PS - I don't know if it is a matter of typos, but you make a request for AS1 code.  If you really want to pursue AS1, you should post in the AS1/2 forum.

Ned Murphy
Legend
June 16, 2011

In AS3 there are no _level's, so the first thing you could try is to remove that from that line, though it depends on what/where "pressed" is located...

load_link = "page" + pressed + ".swf";

and then see what else might be revealed for errors

When you get errors, it is common for the file to not run and /or to continuously play thru the timeline.

Z__Murphy
Z__MurphyAuthor
Known Participant
June 16, 2011

So, I went to my main.fla file and converted this to the AS3 and wa-la a hole bunch of compile errors came up. I have about 20 frames that are "looking like" they are defining the variables which are used in the other pages and that is where it's "calling" on the variables I think based on what the designer was doing.

So, Based on that I think I will just need to read up on the methods. AS1 is using a _root which I get an error saying it's not compatible...

Then I think I have to re-program the incompatible coding to AS3.

This should be a fun little task to bring me up to speed in my little hobby.

Thanks for the help!

Ned Murphy
Legend
June 16, 2011

Resolving one error at a time is part of how I came up to speed with using AS3 after years of AS1/2 coding.  Don't be surprised if you solve the last one and another flurry of errors show up.  Some errors won't necessarily appear until others are eliminated.

One generalized thing to remember... in AS1/2, properties that include a leading underscore character (as in _root, _level#, _x, _y, _width, etc) are not going to have the underscore in AS3 ('level' doesn't exist at all).