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

New to Flash AS3, Need help with some weird issues, have .fla link attached...

Guest
Apr 14, 2009 Apr 14, 2009

Copy link to clipboard

Copied

Basically, the buttons are not visible when siteplan_mc is replayeed after floorplan closes, but they still work. Most things are only working on double click for soe reason, tho I have them to function on click. and the back button only woorks on unit 1 floorplan, tho the code it the same for all floorplans. I have a feeling it has something to do with levels... but I really have no idea... hopefully someone can help!

thanks in advance,

Sarah

http://www.30eastroosevelt.com/RRHA_SITE.fla

TOPICS
ActionScript

Views

305

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 ,
Apr 14, 2009 Apr 14, 2009

Copy link to clipboard

Copied

LATEST

There are at least two things you're doing wrong. You can't go to a frame where something exists for the first time, and immediately do something to it. Like in your playunit functios for example:

gotoAndStop("unit1")

unit1_mc.alpha = 1

unit1_mc hasn't yet drawn itself on stage to have its alpha set, and so there's an error. That is something that was improved in Flash 10, so if you had set the Flash to publish for Flash 10 and not Flash 9, then the floor plans and the back buttons appears ok. It would sometimes work with double clicks because by the second time you clicked, the movieclip now existed. You might be able to do what you want by having all of the room units on frame 1 of the siteplan_mc, and then set their visible to true or false as you need them, instead of doing the gotoAndStop().

The other problem is that you're trying to set listeners on the Back buttons that don't yet exist. Wait until you're on the frame where the buttons exists, and then set its listener for the mouse click.

Other things you're doing could be improved too, but really you might want to get together with someone who has done more AS3, to help you become more familiar with how it works.

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