[Flash 8] Problema de actionScript

Hola, hace mucho que no me pasaba por aquí. Tengo un
problema de actionscript:
Un botón que necesito que al hacer clic la primera vez
vaya a un sitio, y al voler a hacer clic vaya a otro sitio.
Sólo me obedece la primera parte:
BTN4.onRelease=function( )
var active:Boolean = false;
if (active = true)
this.gotoAndPlay( "over" );
else
this.gotoAndPlay( "out" );
Gracias y saludos,
XL

Hola de nuevo Xiskya, hacía bastante que no te
leía...
Bien, tu función tiene un problema y es que siempre te
va a marcar la
variable como false, ya que cada vez que entras en la
función la defines
como tal, además en ningún punto del código le
cambias el valor, una posible
solución sería:
var active:Boolean = false;
btn4.onRelease = function {
if (active == true) {
this.gotoAndPlay("over");
active != active;
}else {
this.gotoAndPlay("out");
active != active;
Ten en cuenta que este código te irá alternando
entre active = true y active
= false, si quieres que sólo se ejecute una vez el false
entonces sácale la
línea de active != active; del condicional true.
Espero que esto te sirva de ayuda.
Un saludo, Álvaro.
"xiskya_lucy" <[email protected]>
escribió en el mensaje
news:fnfjoe$d6r$[email protected]..
> Hola, hace mucho que no me pasaba por aquí. Tengo
un problema de
> actionscript:
>
> Un botón que necesito que al hacer clic la primera
vez vaya a un sitio, y
> al
> voler a hacer clic vaya a otro sitio. Sólo me
obedece la primera parte:
>
>
> BTN4.onRelease=function( )
> {
> var active:Boolean = false;
>
> if (active = true)
> {
> this.gotoAndPlay( "over" );
> }
> else
> {
> this.gotoAndPlay( "out" );
> }
> }
>
> Gracias y saludos,
>
> XL
>

Similar Messages

  • Adobe Flash Player Problem: "Movie Not Loaded"

    new user to mac.
    i'm getting more and more frustrated with this computer.
    what's bugging me the most right now is
    i am unable to view videos on certain websites.
    rather than showing the content,
    a white box appears.
    when i right click on the white box,
    it says "movie not loaded" (in gray) and adobe flash player 9 (in black).
    i can't click on the gray line.
    when i click on the black line, it brings me to the adobe website and tells me adobe flash player 9 has been successfully installed.
    i am fairly sure this has nothing to do with heavy traffic.
    any insights on how to resolve this issue?
    cheers.

    Adobe Flash Player Problem
    http://www.adobeforums.com

  • Strange flashing cursor problem

    Hi,
    I've just finished installing Vista 32bit on my Macbook Air (1.6) and its working fine apart from one small problem - when starting up it freezes on a black screen with a flashing cursor for 2-4 mins and then will start loading Vista fine. Once in there is no problem and its stable and what not. I have had a look at some on the articles on here and other forums and the flashing cursor problem usually refers to when people try to first install a MS OS and not once one has been installed successfully.
    I only have to boot into Vista every now and then and only for a few minutes at a time so I usually spend as much time in Vista as it does loading.
    Any help appreciated.

    General purpose Mac troubleshooting guide:
    Isolating issues in Mac OS X
    Creating a temporary user to isolate user-specific problems:
    Isolating an issue by using another user account
    Identifying resource hogs and other tips:
    Using Activity Monitor to read System Memory and determine how much RAM is being used
    Starting the computer in "safe mode":
    Mac OS X: What is Safe Boot, Safe Mode?
    To identify potential hardware problems:
    Apple Hardware Test
    General Mac maintenance:
    Tips to keep your Mac in top form
    Direct you to the proper forum for MacBook :
    MacBook Series Forums 
    https://discussions.apple.com/community/notebooks?view=discussions
    http://www.apple.com/support/macbookpro
    Mac OS X Forum
    https://discussions.apple.com/community/mac_os?view=discussions
    This forum deals with a desktop/tower 65lb Mac Pro
    http://www.apple.com/support/macpro
    TimeMachine 101
    https://support.apple.com/kb/HT1427
    http://www.apple.com/support/timemachine
    Mac OS X & Mountain Lion Community
    https://discussions.apple.com/community/mac_os
    https://discussions.apple.com/community/mac_os/os_x_mountain_lion?view=discussio ns
    Recovery Mode
    http://support.apple.com/kb/HT4718
    Unless you did a clean install, and I can't tell what your system maintenance is whether it is what I would do. Backup / clone your system, use ML RECOVERY and erase the system partition and update with just Apple updates, don't restore anything.
    Run Apple Hardware Test.
    Take it in for a free check and diagnosis.

  • Flash player problem after updating to belle on my...

    flash player problem after updating to belle on my nokia c7.when I try to play .flv videos screen goes blank as show in image,previously these videos runs fine on symbian anna plz help plz  help or tell me the way to downgrade to anna
    Attachments:
    scr000002.jpg ‏10 KB

    1) product code  059B7W0
    2) software version 111.030.0609
    3) it is actually stored .flv files on my phone  workes fine on symbian anna
    Attachments:
    Scr000003.jpg ‏17 KB
    Scr000004.jpg ‏15 KB

  • Pixelation problems occurs in my videos when using adobe flash but using chromes pepper flash no problemes so its definitely adobe problems on my WIndows 8.1

    pixelation problems occurs in my videos when using adobe flash but using chromes pepper flash no problemes so its definitely adobe problems on my WIndows 8.1

    Problem is:
    Flash Player for IE11 (which is the worst browser ever developed - BAR NONE) is a Microsoft product, when it comes right down to it.
    Adobe writes the base code and yes, they do collaborate on updates for it, but the gang in Redmond alter the plug-in and add "proprietary" code before embedding it, and at that point it's "their baby".
    There are two (2) registry keys - 1 for 32 bit IE and the other for 64 bit IE, as well as a KB patch that prevent all but the most experienced Windows users from ever touching the Flash Player plug-in for IE. So there's NO WAY you could have done a clean install of the ActiveX plug-in in Windows 8. Unless you're an uber-geek, you can only update it through Windows Update.
    WIn 8 is an abomination and IE11 made it worse. IE has always been the "problem child" of browsers, failing to handle CSS, Javascript, some PHP and most design "tweaks" that good webmasters can use with other browsers, trouble free.
    I have IE8 on XP, 9 on VIsta, 11 on 7, 10 on 8 and 11 on 8.1... but they're all for testing only. I'd have to be out of my mind to ever think of using IE as my primary browser. ActiveX controls have to be disabled formost stuff and that opens millions of security holes in IE.
    You've got a good video card and a decent sound card. It's a shame to waste them on a pile of garbage like IE, just because it came with Windows.

  • When did these flash player problems begin?

    So, I had a computer running Win98 and IE6, which worked
    great until Flash Player 8 autodownloaded about 4 months ago,
    causing the beginning of an extreme headache. Several
    communications with Adobe support (they eventually stopped
    responding) over several weeks went nowhere None of the fixes
    suggested by them, nor the ones here worked. Countless manhours led
    me to think it was time to bite the bullet, buy a new computer. So,
    as of two months ago I have a new computer running XP and IE6 with
    SP2. I didn't know it until today, when I started having crashes,
    but I have Flash Player 7.0.19.0. When i go to Adobe's Test page,
    both Shockwave and Player windows show the animations (and no
    crash).
    On certain pages, which I believe have flash content, I get
    the "IE has experienced a problem and must close" message. It
    specifically mentions the flash.ocx file as the offender. It is
    repeatable when visiting certain pages.
    So, before I jump into the abyss of attempting to fix this, I
    am wondering when these types of problems began. I have been using
    Windows and IE since 1998 with no trouble until this year. I hoped
    moving to a new computer would solve my Flash compatibility
    problems. Could the root problem be new types of spyware, etc that
    change something in the registry? Some of the fixes suggested by
    Adobe were regarding keys changed in the registry. Unfortunately
    those fixes didn't work (in Win98).
    Finally, does anyone know if attempting to fix flash player
    under XP is any easier than 98? Also, I will admit I may have
    visited some sites recently that downloaded some adware, etc. Any
    suggestions on cleaning that may solve the flash player problem? I
    know this post is all over the map - I don't know where to begin...
    Thanks in advance, Don

    Hi
    Which browser is giving you the error? Is it IE11?
    Are you saying when you go to Adobe's website and download flash player it gives you an error?
    Hope this helps. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Adobe Flash Player 10: An ActionScript error has occurred?

    Whenever I browse the web with Firefix, I get this sort of error message if the site uses Flash:
    Adobe Flash Player 10
    An ActionScript error has occurred:
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://content.openforum.com/membersproject/getContentList.jsp?numitems=3&pillar=CAUSES
        at dtas.mp.polite::Politeness/dataLoaded()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/onComplete()
    This only started happening when I upgraded to CS4 Professional. Does anyone know why this is happening?

    first go here and check if you have the debug player:  http://kb2.adobe.com/cps/155/tn_15507.html
    if yes, you can download from here:  http://get.adobe.com/flashplayer/
    (be sure to untick that mcafee garbage.)

  • Macbook air flash drive problem

    my air mid 2012 has flash drive problem cant update and theres written apple would replace it free of charge but theres no official service center in my country what to do?Is it possible that they could send me flash drive or smthing like that

    Apple Authorized Service Providers
    https://locate.apple.com/country
    Best.

  • [help] Flash cache problem?

    Operating Environment: IIS6+ASP.Net 2.0+Flash
    Framework / Procedure:
    When running, Flash will run ASP.NET program. ASP.NET then
    extracts data from the database and generates a XML file for Flash.
    Flash reads the XML file and parse it into a readable format
    for the users.
    Problem:
    When Flash displays the XML content and user leaves/exits the
    webpage, this process creates a change in the database.
    Then if this Flash function is executed again, ASP.NET
    generates a new XML file, but Flash still displays the old XML
    content.
    We discovered that when IE's "Temorary Internet Files"
    setting is set to AUTO, the above problem would occure, we suspect
    this is related to IE cache.
    Is there any way to resolve this Flash cache problem?

    Did you try returning the XML via an ASP script?
    In other words have the ASP generate an ASP wrapper that
    returns XML.
    Then if necessary, you can then add a random URL var to the
    Flash XML load url variable. "theXMLWrapper.asx?x=" +
    getTimer()

  • Problem with actionscript window in Flash CS3 IDE

    The actionscript window doesn't open up for any frames on the
    timeline. When I press 'F9' or try to access via context menu the
    action window tab appears at the top in minimized form. No matter
    how many times I click on it or on the maximize button the window
    doesn't open up. I tried reinstalling Flash CS3 but it didn't help.
    Any help with this issue is appreciated.
    Thanks!

    Found a solution for this atlast ! Delete the Users/AppData
    folder for flash CS3 and things will be back to normal. It seems
    the Flash IDE screws somewhere while saving the local users
    settings. Clearing these settings restored my action window
    !

  • Please help me with a simple flash game problem

    I am trying to learn how to make flash games with Adobe flash 5.5. I am doing a tutorial from a book and am stuck.
    The game is called concentration and you are suppose to match 2 tiles of the same shape. there are 10 shape tiles
    and 1 question mark tile. These tiles are held in an array. 20 tiles are suppose to be displayed 5 to a row with 4 rows
    and the question mark is suppose to be up on all 20. My problem is I get a blank screen when I test the movie. I
    think the code is good but I beleive I have not uploaded the tiles right. I did upload the 11 tiles to the library and have
    those 11 tiles and tile_movieclip in the library. Here is the code:
    package {
    // importing classes
    import flash.display.Sprite;
    // end of importing classes
    public class Main extends Sprite {
    public function Main() {
    // variables and constants
    const NUMBER_OF_TILES:uint=20;
    const TILES_PER_ROW:uint=5;
    var tiles:Array=new Array();
    var tile:tile_movieclip;
    // end of variables and constants
    // tiles creation loop
    for (var i:uint=0; i<NUMBER_OF_TILES; i++) {
    tiles.push(Math.floor(i/2));
    trace("My tiles: "+tiles);
    // end of tiles creation loop
    // shuffling loop
    var swap,tmp:uint;
    for (i=NUMBER_OF_TILES-1; i>0; i--) {
    swap=Math.floor(Math.random()*i);
    tmp=tiles[i];
    tiles[i]=tiles[swap];
    tiles[swap]=tmp;
    trace("My shuffled tiles: "+tiles);
    // end of shuffling loop
    // tile placing loop
    for (i=0; i<NUMBER_OF_TILES; i++) {
    tile=new tile_movieclip();
    addChild(tile);
    tile.cardType=tiles[i];
    tile.x=5+(tile.width+5)*(i%TILES_PER_ROW);
    tile.y=5+(tile.height+5)*(Math.floor(i/TILES_PER_ROW));
    tile.gotoAndStop(NUMBER_OF_TILES/2+1);
    // end of tile placing loop
    Can someone please explain to me what I am suppose to do to make the this work? I beleive the problem is it doesnt know where the tiles are.
    Thanks.

    To create the tiles, draw 10 distinct shapes in the first 10 frames of your symbol, and
    the back of the tile in the 11th frame. You are free to draw them as you want, but I suggest you make them as 90 pixels squares with registration point (starting x and y position) at 0, because these are the properties of the tiles used in this chapter's
    examples. At least, they should all be the same size.
    It didnt say put in a library. It is saying to draw them in frames of symbol but it didnt walk me through that. Can you guide me through this? I also was looking at how to add the link identifier but it said I need a popup window but I cant see one. I thought that was done
    when I went to insert new symbol. It said something about actionscript linkage. I am familliar with perl, java and c++ so I can follow the code so far but I dont have much understanding of the flash interface. I made the 10 shape tiles and the 1 question mark tile
    in paint. They are .jpeg images.

  • SWC buttons not working in a Flash Builder 4.7 ActionScript Project

    Howdy,
    I have this BIG issue. Every button in my swc causes issues when compilling in Flash Builder 4.7. Two things will happen, one or the other:
    1. I get this error in the class that extends a linked library item:
    Error #1107: The ABC data is corrupt, attempt to read out of bounds.
    2. The swf compiles with no errors but all buttons display the wrong art.
    Both problems go away when I remove the buttons.
    I found this article:
    http://inflagrantedelicto.memoryspiral.com/2012/12/flash-builder-4-7-useflashsdk/
    I tried this solution but it did not work.
    This problem occurs with all my projects. I'm creating SWCs via Flash Pro, and using them in a Flash Builder ActionScript Project.
    Does anyone have any solutions?
    Thanks!

    Hi,
    I followed the directions here: http://inflagrantedelicto.memoryspiral.com/2012/12/flash-builder-4-7-u seflashsdk/
    But the only "Use Specific SDK:" options are Flex 4.6.0 and Flex 3.6a.
    When I select Flex 4.6.0 (under "Use Specific SDK:"), I get errors, it seems that some sub classes don't have access to their parents protected methods and properties. The only way to fix this is to delete the project and create it again.
    I downloaded the apache flex SDK, and added it via the Flash Builder preferences. Then went into the project and set "Use Specific SDK:" to the appache flex. This brought up more errors, double clicking the errors wouldn't take me to any class, they where mostly something about bitmap...
    And the only way to fix it is to delete the project and create it again.
    Should I not use Flash 4.6? or not use SWCs? This is really frustrating.

  • 2 player web-based Flash game problem

    I have a two player web-based Flash game. The Flash calls a
    JavaScript function on the webpage to get and store the user's IP.
    Then an XML file with user's game data is loaded and parsed. The IP
    address is used to identify which player is player 1 and which is
    player 2 according to the XML file. There is a Java applet to send
    and receive messages between the players.
    The first player loads everything just fine. All the first
    player's messages regarding the progress in loading different parts
    of the code sent by the game for debugging are displayed in the
    Java applet's text box, but none of the second player's messages
    sent by the game for debugging are displayed.
    The problem is that the second player's ActionScript code
    appears not to be executing except that I do get a message in the
    game that the XML file attempted to load but was not successful.
    The IP address call is not made and no messages can be sent to the
    other player. The second player's Java applet displays only the
    messages for debugging that came from the first player's game and
    any chat messages sent by the first player.
    This problem always happens to the second player, never to
    the first player. Both player's are always using IE6 or IE7.
    Does anyone have some idea(s) what could cause only the
    second player's ActionScript code not to execute and/or not to load
    an XML file correctly?
    This is just a general question, so any general answers would
    be appreciated. Code specific answers are hopefully not required.
    Thank You in advance.

    Hi,
    I am not very familiar with the multiplayer Game development. For multiplayer games, you'll need to set up a matchmaking server and have the clients connect to it. It can then pair them off and facilitate communications. If the clients have publicly available
    network addresses then it can introduce them and they can talk directly to each other.There isn't anything built in for this so you'll need to either build your own or find a third party implementation. If you are using Unity3d then check out
    http://docs.unity3d.com/Documentation/Components/net-MasterServer.html
    Also, you can use Xbox services, and I find an article below:
    https://msdn.microsoft.com/en-us/library/bb975801.aspx
    For windows Azure problem, you should go to windows Azure forum.
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

  • Uploading flash website problem

    I made a website in flash and everything is working fine in
    the files. When I tested the site on my computer everything was
    working just the way it should. However when I finally uploaded it
    to my server not everything worked. I had 3 galleries that wont
    load, videos that start playing automaticlly( I have them stopped
    until the user hits play) and a music player that works great
    except one song does not play. I am so confused as to what is
    happening I do not even know how to fix it. I have tried loading
    the site to 2 different servers and the same problem happens on
    both, my files work fine, just not on the internet. Has this happen
    to anyone and more importantly do you know how to fix it? I really
    need to get this site up soon and I don't know what to do.
    Any suggest would be greatly appreciated.
    Thank you

    Hi manada,
    Issues like these are usually something very simple, just not
    always obvious.
    >I had 3 galleries that wont load, videos that start
    playing automaticlly
    >and a music player that works great except one song does
    not play
    I assume you are loading these externally into your main
    movie?
    If so, are you using actionscript which references the _root
    timeline?
    If you are, try to add:
    this._lockroot = true;
    on the first frame on the _root timeline of each movie. See
    if this helps!
    Another issue would be that the server might not allow script
    access from Active content...but you have uploaded to 3 different
    servers, it's hard to believe none of them allow it.
    maybe its worth looking into?
    Try that, and see how it goes. if you are still having
    problems, post a link to the site, and i'm sure we will find a
    solution.

  • Help pls! Flash game problem.

    Update* 
    Now getting this error:
    Symbol 'levelcomplete'
    1046: Type was not found or was not a compile-time constant: nextlevelBtn.
    Hi guys, Beginner here having some trouble creating my first flash drag and drop jigsaw puzzle game.
    The drag and drop jigsaw puzzle works to some extent, but it is the "level complete" movieclip which is causing problems.
    On testing the movie i get this error:
    1061: Call to a possibly undefined method addEventListener through a reference with static type Class.
    Scene 1
    Frame 1 = Welcome screen, click "start" to play, play goes to Frame 2, works fine.
    Frame 2 = The first level, if completed within the timelimit, load object to stage "levelcomplete" movieclip which contains a button to move to the next level. The button does not work, although everything else appears to.
                    The "Next Level" button nested in the "levelcomplete" movieclip does not send the playhead to the Frame 3.       
    This is the ActionScript 3 which loads the 'levelcomplete' movieclip onto the stage:    
         var fl_MyInstance:levelcomplete = new levelcomplete();
                   stage.addChild(fl_MyInstance);
                                  fl_MyInstance.x = 350;
                                  fl_MyInstance.y = 250;
    This is the AS3 which I want to work on the next level button, which is contained within the "levelcomplete" movieclip:
    nextlevelbtn.addEventListener(MouseEvent.MOUSE_UP, gonextlevel);
    function gonextlevel(e:MouseEvent):void
              gotoAndStop(3); // Frame where level 2 is waiting
    Frame 3 = Level 2, movie does not get this far.
    Frame 4 = Level 3
    Scene 2
    Frame 1 = Game over screen with a retry button, which sends you back to Scene 1 Frame 2
    Am not sure if am going about this the correct way, could anyone give me any feedback please?
    Thanks
    Kev

    You're response makes me think I am completely going about this the wrong way
    Am using the actionscript editor in Flash, and not an external .as file. Should i be using an external .as file to create a flash jigsaw puzzle game ?
    If so I need to re thinking the game and get back to reading this book i borrowed.
    Am very new to actionscript, I can not stress this enough, I am currently reading through things, but am having some difficulty understanding.
    Sorry for being abit stupid.

Maybe you are looking for