• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can I link from one flash document to another with buttons?

New Here ,
Nov 26, 2012 Nov 26, 2012

Copy link to clipboard

Copied

Hi,

From the question above, you can tell that I'm very new to flash, especially with scripting. Total noob.

I watched my instructor's videos and I'm still stumped. He didn't explain it very well.

For starters, I am using Flash CS6, but I clicked on AS1.0 and AS2.0 from the drop down mention in the actionscript window for the script below, since that is what my instructor used.

What I have now are various pages I've already created in flash that are different pages in my website, including a splash page with an enter button.

For example, I want the enter button to link to another .swf or .html file when it is clicked. This file will be the main page.

I tried using this script that my instructor mentioned in the video on the button layer:

on (release); {

    getURL("page1.swf");

}

the "page1.swf" file is already in the same folder in my computer as my splash page and I even imported it to the library of my splash page.

From my instructor's video demo, that should be apparently all that is needed.

But I cannot get this to work.

I tested the file and this is what flash comes up with:

In the output tab:

ReferenceError: Error #1065: Variable TCMText is not defined.

In the compiler errors tab:

Scene 1, Layer 'Layer 28', Frame 1, Line 11180: Call to a possibly undefined method on.

Scene 1, Layer 'Layer 28', Frame 1, Line 11120: Access of undefined property release.

Scene 1, Layer 'Layer 28', Frame 1, Line 21180: Call to a possibly undefined method getURL.

Any thoughts? My instructor also recommended that I embed the .swf into an .html, but he obviously didn't tell us how to do that!

Also, why doesn't script assist work with AS3?

Thank you so much!

TOPICS
ActionScript

Views

2.3K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 26, 2012 Nov 26, 2012

Copy link to clipboard

Copied

Those compiler errors are what you get when you are publishing for an AS3 file.  If you intend to use AS1/2, then you need to start with an AS1/AS2 file.  You can convert the file to an AS1/AS2 file by going into the Publish Settings and choosing AS1/AS2 in the actionscript version options

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 26, 2012 Nov 26, 2012

Copy link to clipboard

Copied

LATEST

Okay so I changed it to AS1/AS2.

Now it says this:

Scene=Scene 1, layer=Layer 28, frame=1, Line 1Mouse events are permitted only for button instances

Scene=Scene 1, layer=Layer 28, frame=1, Line 4Syntax error.

I am very confused.

Also, since all my other pages are in AS3, is there some way I can use another script in AS3 that accomplishes the same task?

Can someone please provide me with the correct script to use?

Thank you so much! I feel that people here are much more responsive than my instructor is! Thank God for this forum!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines