Attempting to create an interactive map with flash - getting errors with my actionscript

I'm currently having an issue creating a set of buttons that are supposed to turn individual layers on and off.  The layers I have are: fishing spots, facilities, trails, map elements, an aerial photo, and parking lots.  It is giving error #s 1119 and 1120.  Could anyone explain possible reasons I'm getting these errors. 
It might be worth mentioning that I used a tutorial made with Flash CS4, but I'm writing the code in CS5.  Here is the exact code I'm using:
spots._visible = false;
facilities._visible = false;
parking._visible = false;
elements._visible = true;
aerial._visible = false;
trails._visible = false;
displayedSpots._visible = false;
displayedFacs._visible = false;
displayedTrails._visible = false;
displayedEles._visible = true;
displayedAerial._visible = false;
displayedPark._visible = false;
fsbtn.onPress = function() {
          if (spots._visible == false) {
                    spots._visible = true;
                    displayedSpots._visible = true;
          } else {
                    spots._visible = false;
                    displayedSpots._visible = false;
facbtn.onPress = function() {
          if (facilities._visible == false) {
                    facilities._visible = true;
                    displayedFacs._visible = true;
          } else {
                    facilities._visible = false;
                    displayedFacs._visible = false;
trbtn.onPress = function() {
          if (trails._visible == false) {
                    trails._visible = true;
                    displayedTrails._visible = true;
          } else {
                    trails._visible = false;
                    displayedTrails._visible = false;
mebtn.onPress = function() {
          if (elements._visible == false) {
                    elements._visible = true;
                    displayedEles._visible = true;
          } else {
                    elements._visible = false;
                    displayedEles._visible = false;
aebtn.onPress = function() {
          if (aerial._visible == false) {
                    aerial._visible = true;
                    displayedAerial._visible = true;
          } else {
                    aerial._visible = false;
                    displayedAerial._visible = false;
pbtn.onPress = function() {
          if (parking._visible == false) {
                    parking._visible = true;
                    displayedPark._visible = true;
          } else {
                    parking._visible = false;
                    displayedPark._visible = false;

Only thing i see is that you are using == instead of = , Fixed Example...
fsbtn.onPress = function() {
          if (spots._visible = false) {
                    spots._visible = true;
                    displayedSpots._visible = true;
          } else {
                    spots._visible = false;
                    displayedSpots._visible = false;
== Is used for equality.
= Is used for setting a value or in this case checking a value.

Similar Messages

  • Creating an interactive map, using buttons, help!?

    Hi,
    I am attempting to create an interactive map of the college I work at.  I have created a button and when you click on the area, it displays info about the particular room or subject.
    I am using Oject States for the room/subject info and when you press the button to select it, when the room info is displayed (as it should), but the button appears on the top of it.
    I would also like to have a back/close button to go back the the original map.
    Please help, I am new to this and would appreciate any help.
    Thanks

    To Bob Bringhurst,
    Maybe you could show your workaround as a step by step approach
    http://blogs.adobe.com/indesigndocs/2010/12/hot-spot-button-workaround -for-indesign-dig-pubs.html
    Having also viewed this video on creating a tooltip.
    Im still having problems after viewing the above video's to get Multi State Objects viewing correctly on the iPad.
    This might resolve a problem for myself, and possibly others.
    Regards
    Vividi

  • How do I create/host interactive articles with embedded video for use in browsers?

    I'm seeking a little guidance -
    How do I create/host interactive articles with embedded video for use in browsers?
    The aim is to bring together video, design, images and writing in one place. A little like Born Presents, but very accessible and user friendly.
    I'm happy using InDesign but want to create interactive articles / magazines that have embeded video files as required. I've been looking at .SWF files but I've come unstuck.
    I want people to view the articles via a blog, ideally with them opening in a lightbox style viewer. It's not intended for tablet viewing and people should be able to view and interact with the files with little effort on their part.
    I think I know how to create these files within InDesign, but I'm not so hot on web design and I'm not sure how to host these online. Does this start coming into the realms of Flash?
    If anyone could point in the right direction I'd really appreciate it - Thank you in advance.

    PDF is one thing. Folios for DPS is another. There is a little bit of
    overlap but not much.
    The interactivity in the folio overlays panel is for DPS only.

  • Problem with "Building interactive maps with Flex" example

    I have been looking at the tutorial by Matt Sheehan Building interactive maps with Flex found at
    http://www.adobe.com/devnet/flex/articles/interactive_maps.edu.html
    I have downloaded  Flash Builder 4.6 trial version and followed the example. I have also copied the source code from the example and pasted that into the file mymodestmap.mxml.
    In both cases the application opens a new page in Google Chrome but does not display any map data.
    No errors or warnings are displayed when I run the code from Flash Builder.
    Although I have got plenty of experience of writing software, I am a total beginner when it comes to developing web applications!
    Any ideas as to what I am doing wrong, I have attached the source below.
    Cheers
    Steve
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx1="library://ns.adobe.com/flex/halo"
                                     minWidth="1024" minHeight="768" creationComplete="init()" viewSourceURL="srcview/index.html" xmlns:mx="library://ns.adobe.com/flex/mx">
              <fx:Script>
                        <![CDATA[
                                  import mx.core.UIComponent;
                                  import com.modestmaps.TweenMap;   
                                  import com.modestmaps.mapproviders.OpenStreetMapProvider;
                                  import com.modestmaps.geo.Location;
                                  import com.modestmaps.extras.ZoomSlider;
                                  import com.modestmaps.extras.HandCursor; 
                                  [Bindable]private var _map:TweenMap;       
                                  private var _mapUI:UIComponent;
                                  [Bindable]private var _initialLat:Number = 40.668903;
                                  [Bindable]private var _initialLong:Number = -111.680145;
                                  [Bindable]private var _initialZoom:Number = 6;
                                  private var _mouseWheelZoomCenter:Location;
                                  private var _mouseWheelZoom:int;     
                                  private function init():void
                                            _map = new TweenMap(mappanel.width, mappanel.height, true, new OpenStreetMapProvider());   
                                            _map.setCenterZoom(new Location(_initialLat, _initialLong), _initialZoom);
                                            mapCore();
                                  private function mapCore():void
                                            _map.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler);   
                                            _mapUI = new UIComponent();
                                            _mapUI.addChild(_map);    
                                            var zoomslider:ZoomSlider = new ZoomSlider(_map);
                                            zoomslider.x = mappanel.width - zoomslider.width*2;
                                            zoomslider.y = 30;
                                            _mapUI.addChild(zoomslider);   
                                            var handcursor:HandCursor = new HandCursor(_map);
                                            _mapUI.addChild(handcursor);
                                            mappanel.addElement(_mapUI);   
                                  private function mouseWheelHandler(e:MouseEvent):void {
                                            if (e.delta < 0) {
                                                      _map.zoomOut();
                                            else if (e.delta > 0) {
                                                      _map.zoomIn();
                                            _mouseWheelZoomCenter = _map.getCenter();
                                            _mouseWheelZoom = _map.getZoom();
                        ]]>
              </fx:Script>
              <s:BorderContainer id="mappanel" width="100%" height="97%"/>
    </s:Application>

    Technically, it's Javascript, not Java :) TOTALLY different beasts. I wish they'd never named it Javascript, it's ambiguous. So anyway, on to the point of the whole thing...
    If you want quotes in your values, you'll need to write a function to replace " with \", and pass the values through it. So instead of javascript:passBack('#ENAME#','#JOB#','#SAL#'); you would have javascript:passBack(addslashes('#ENAME#'),addslashes('#JOB#'),addslashes('#SAL#'));. That would mean that ABC"DEF"GH would be passed to the function as ABC\"DEF\"GH and your quotes would stay intact. Search around on the internet for more specifics as to how to pass double quotes in javascript by using backslashes.
    ~Jer

  • How do I create an interactive map?

    How do I create an interactive map using digital publishing suite in InDesign? Basically it's an amusement park map and when you click on a button I want a description page of a ride to show that has interactivity on it and then it can be closed and another button on the map can be clicked to show another description page of a different ride. Is that possible?

    Use a multi state object. Depending upon how many point of interest you want on that map it can get pretty involved.

  • How to create an interactive magazine with CS3

    I am trying to create an interactive magazine with CS3 and don't know how to do it. First of all, is this possible with CS3 or do I need to upgrade to CS4? And if it is possible, can anyone tell me a step by step plan to follow? Or is there a book or download I can get for more information which is recommended?
    Thanks

    Google is your friend: Interactive Newsletters
    You can make digital newsletters for PDF in CS3 or 4. To make a digital newsletter that can be viewed in a browser (export to swf) you need CS4. Big advantage of swf is much smaller file size than PDF.
    One free bit of advice: design your file horizontally (11 w x 8.5h) since that works best for reading a PDF or swf online.

  • Another site already exists at . Delete this site before attempting to create a new site with the same URL

    Hi Everyone,
    It would be great if you can help me with the below.
    Few days ago one of our content db went into suspect mode.  Our DB team had resolved the issue. But one of the sites that was created probably around the same time is no more available. When I try to create a site on the same URL, I get the following
    error.
    Another site already exists at <URL>. Delete this site before attempting to create a new site with the same URL
    When I try to delete the site or if I try to view the details of the site using Central Administration, I can find the site, but it doesn't display any details like Title, DB Name etc.
    If I use stsad -o enumsites command to list ll the site, for the given site I get the following error:
    <nativehr>0x80070002</nativehr><nativestack></nativestack>There is no Web named <URL>.
    I am not even able to delete it using Powershell.
    Please suggest.
    Thanks,
    Uttkarsh

    You might be dealing with orphaned site. Go through the following blog post and see if it helps you delete the orphaned sites.
    http://www.cjvandyk.com/blog/Lists/Posts/Post.aspx?ID=299
    Amit

  • Can you create a site map with Dreamweaver?

    Greetings,
    Can you create a site map with Dreamweaver?
    Crawkers do not work because many of my pages are not linked.
    Thanks

    I'm not too sure what Crawkers is, but I do not think DW has that capability out of the box.  There are some web based solutions that will scan you site for you and give you a map for search engines.  I choose to go with a commercial option which is pretty good from WebAssist, it's called Surveyor: http://www.webassist.com/dreamweaver-extensions/surveyor/ .

  • I get error code -8058 when attempting to copy and paste in Finder, I get error code -8058 when attempting to copy and paste in Finder

    I get "error code -8058" when attempting to copy and paste in Finder, I get error code -8058 when attempting to copy and paste in Finder. "Alt +Drag" works. Any ideas?

    Have a look at the 'More Like This' to the right - seem to be some solutions offered: >>>>>>>>>>>>>>>>>

  • When i attempt to download an app from iTunes I get error message -45054. What is iTunes telling me?

    When I attempt to download an app from iTunes I get error message -45054. What is iTunes telling me?

    Change your country on iPhone, iPad, or iPod touch
    Tap iTunes Store, App Store, or iBooks Store.
    At the bottom of the Featured page, tap Sign In.
    If you're already signed in, skip to step 5.
    Tap Use Existing Apple ID.
    Enter your Apple ID and password and tap OK.
    Tap your Apple ID.
    Tap View Apple ID or View Account.
    Tap Country/Region.
    Tap Change Country or Region.
    Tap the Store menu and tap your country.
    Tap Next.
    Review the Terms and Conditions and Apple Privacy Policy.
    Tap Agree if you agree to the terms and conditions.
    In the prompt that appears, tap Agree.
    Select a payment method and enter your payment information.
    Enter your billing address and tap Next.

  • How to create a more interactive map with DW hotspot tool

    Hi - I've been asked to put together a map for my client.  I want to avoid getting into GMaps and all of that and just want to make a simple one myself.  Here's an explanation of what I'm trying to do:
    http://designerandpublisher.com/montrose/map.html
    Just trying to create a simple map like you see above so that if they clicked on a state or a point in the state, a little pop-up window comes on like you see in many interactive map applications.  Can someone help me figure out how to do this with DW's hotspot tool?  I'm terrible with code but I do know it would probably start with something like onclick (I think that's what it is).  But even if I get that onclick code working, I'm not even sure how to incorporate it into the <map> code that DW makes for the hotspot.
    Any help is appreciated.  Thanks.
    PS - I use DW4 and also have access to 5.5 on another computer.

    Here's another way you could do it but wil get very long. Also consider Kens tooltip - probably the easiest if you don't want a 'close button'
    <!DOCTYPE HTML PUBLIC">
    <html>
    <head>
    <meta http-equiv="charset=UTF-8">
    <title>Map</title>
    <script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
    <style>
    #map {
        width: 550px;
        height: 390px;
        margin: 0 auto;
        position: relative;
    #nevada {
    position: absolute;
    top: 150px;
    left: 50px;
    background-color:#FFC;
    padding: 15px;
    display: none;
    #nevada {
    position: absolute;
    top: 100px;
    left: 50px;
    background-color:#FFC;
    padding: 15px;
    display: none;
    .close {
        position: absolute;
        display: inline-block;
        background-color:#903;
        color: #fff;
        text-decoration: none;
        padding: 6px;
        right: 0;
        top: 0;
    h2 {
        margin: 0;
        padding: 0;
    p {margin: 0;
    padding: 0;
    </style>
    <script>
    $(document).ready(function() {
    $('.hide').hide();
    $('.newMexico').click(function() {
    $('#newMexico').show();
    $('.nevada').click(function() {
    $('#nevada').show();
    $('.close').click(function() {
    $('.hide').hide();
    </script>
    </head>
    <body>
    <div id="map">
    <!-- New Mexico -->
    <div class="hide" id="newMexico">
    <a href="#" class="close">X</a>
    <h2>New Mexico</h2>
    <p>Some content about New Mexico</p>
    </div>
    <!-- New Mexico -->
    <div class="hide" id="nevada">
    <a href="#" class="close">X</a>
    <h2>Nevada</h2>
    <p>Some content about Nevada</p>
    </div>
    <img src="map.png" width="550" height="390" border="0" usemap="#Map">
    <map name="Map">
    <area shape="poly" coords="157,176,216,183,213,246,173,241,159,244,158,249,147,247,156,177" class="newMexico" href="#">
    <area shape="poly" coords="64,91,118,105,105,180,99,176,96,190,52,131,64,92" class="nevada" href="#">
    </map>
    </div>
    </body>
    </html>

  • What is the best way to create a 3d map for flash/actionscript?

    Hi
    what are good and easy to use tools to create a 3d map/world - terrain, buildings, .... - for use in flash? ideally I would be able to control the objects with actionscript.
    thanks,
    Chris

    first, you should pick a 3d framework (away3d, flare3d etc) to use.  that will determine what format/tools you can use for your 3d objects.

  • Advice on using Edge Animate & Interactive SVG to create an interactive map

    Hello folks, I'm hoping for some guidance on a complicated graphic. My org. has an existing interactive map which was created by a freelancer for us using Ruby and js. It's very nice but I wanted to see if it's possible to recreate using Edge Animate (both as a challenge to myself and as a way of being able to move ownership of it in-house). Here's the map:
    http://csai-online.org/sos
    I have done a fair amount of work in Edge Animate but have mostly stuck with simple interactivity (play, repeat, navigation links, etc.) so this would be a stretch. But I'm thinking that the map itself (with various shadings) could be recreated using Edge Commons' Interactive SVG function. I would create the map in Illustrator as an svg with different layers for each group of states, which would then be activated by the buttons in Edge Animate. (The floating box could be done entirely in Animate.)
    So my questions are,
    - Does this seem doable, and has anyone done something similar?
    - How do I trigger the layer visibility toggle from Edge? There's a tutorial from Edge Commons which changes the color of an object by CSS, but it seems like it would be simpler to use layer visibility.
    - Some of the combinations of checkboxes result in States that are in multiple groups (resulting in a striped fill). I'm guessing I'd need to add some code to indicate that if buttons X and Y were both checked, a third combined layer would be shown. (A further complication is that each of the groups of buttons shuts off the other groups.)
    Alternately, it seems like I could also create each state as a series of differently-colored graphics which are then shown or hidden based on which buttons are checked (using arrays, maybe?), but that seems a messier due to the million separate images.
    Anyway, how would you approach this problem, I guess is my main question.
    Thanks very much.

    This looks pretty simple to me and I don't see why you wouldn't be able to do it in edge animate.
    Create each state as a button and animate the hover effects inside a symbol and then on the main timeline animate the content boxes opacity to on and off and set labels for each "on" state and then in your button link to that label in the mouse over actions preset.u
    As far as calling the bottom content into the div i would just do that by hand by grabbing a simple script off the internet. *theres loads*

  • How to create an interactive magazine with user comments and voting system?

    I need to create an interactive magazine that includes user comments and votes (like/unlike).
    I know that I can create digital swf magazines in indesign and that user comments and like/unlike buttons can be entered with coding in adobe dreamweaver.
    I need this for a school project and I do not know if it's possible or if there is another way of doing it in dreamweaver...
    Thanks

    The easiest way to do like/unlike voting is use facebook´s like/unlike button generator at http://developers.facebook.com/docs/reference/plugins/like/ to create a code. You can set up the appearance and some features of your button and you will end up having an iFrame code. You can add that code into your html-wrapper file with some regular texteditor like wordPad....
    Here´s one example, it´s an InDesign SWF finalized with eDocker but I don´t see any reason why you couldn´t use the SWF exported directly from InDesign as well. If you want to put it to some specific location, you have to wrap it up into a div and set up some css for that div, but it´s not a rocket science either.....=)
    http://www.prepress.fi/keva

  • I have to create an interactive form with java. How can i do it?

    I have to create an application that allows to create an interactive form like the option "Create Form" on google docs!
    What do you suggest me to create it?
    1) I think that I can use a DB to store the structure and then I can restore it with particular queries.
    Thank you for answers, I hope you can help me
    Best Regards,
    Silvio

    Savio85 wrote:
    Ah ok, I'm sorry.
    I also can use swing.
    For "requirements", I wrote an example to show a sample of "Interactive Form" (Google Doc -> Create Form).
    I'm sorry for my bad requirement,
    Best Regard
    Silvio
    Edited by: Savio85 on Jun 10, 2010 4:07 AMSo you expect people to sign up to Google so that they can see Google docs? Why should anyone make any effort to help you if you make this little effort to create any sort of problem description?
    Anyway, if you want to create an "interactive form" using Swing, there is only one thing to do: learn the Swing API. Lucky for you there is a great online resource for that:
    [the swing tutorial|http://java.sun.com/docs/books/tutorial/uiswing/]
    Good luck!

Maybe you are looking for