A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: KM 7.4.1 - URL undefined when clicked in animation

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    10

    KM 7.4.1 - URL undefined when clicked in animation

    Hi all

    I imported a SWF into a new file on KM 7.4.1 and laid a transparent rectangle on top, Converted the rectangle to a button and set the action to go to a website when clicked.

    Here it is at http://www.atouchofromance.com.au/temp/newclick.html

    The problem is that it comes up as undefined when clicked on instead of http://interestfree.com.au/en/index....002-GECL-00232

    Have set it for network access, and included the necessary files in the same folder.

    Can anyone help me please?

    Thanks heaps,
    Carl

  2. #2
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    The target for the action may also be important. I think you need _blank to avoid a flash security issue.

    Is the flash export 8, 9, or 10?

    What happens if you remove the underlying swf?

    I suggest that you post the KoolMoves popup with the action. It is possible that the url is so long that KoolMoves is truncating it on export. Testing with a simple button at flash 8 export could eliminate that theory.
    Last edited by Bob Hartzell; 03-18-2010 at 08:07 AM.

  3. #3
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Look at the flash log you are generating an error

    Warning: Reference to undeclared variable, 'clickTag'

    This is why using trace and debug players is so important when developing.

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    I suggest that you use the clicktag button action rather than constructing your own.

  5. #5
    Junior Member
    Join Date
    Mar 2010
    Posts
    10
    Quote Originally Posted by Bob Hartzell View Post
    I suggest that you use the clicktag button action rather than constructing your own.
    Hi Bob

    Have tried it with Flash 8 and 10 export and network turned on but wouldn't work either way. Have removed the swf from under the transparent rectangle. I managed to find where the action for clicktag was for the rectangle/button, and added it, but it doesn't have anywhere for me to put in a url to go to when the user clicks on the rectangle.

    Koolmoves has changed so much since I used it 3 or 4 years ago! I got alot of learning to do.

    Any help you can provide or links to tutorials would be great

    Thanks
    Carl

  6. #6
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    I suggest you attach the fun file so people can look at the action.

  7. #7
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    Just did some checking and there are some issues with ClickTag and AS3 but this was posted elsewhere as a working solution:

    code:

    var _url:String = "";
    if (LoaderInfo(root.loaderInfo).parameters.clickTag)
    { _url = LoaderInfo(root.loaderInfo).parameters.clickTag;
    myButton.addEventListener(MouseEvent.MOUSE_UP, handleMouse); }
    function handleMouse(event:MouseEvent):void
    { navigateToURL(new URLRequest(_url), "_blank"); }



    the full discussion is at
    http://www.genelu.com/content/view/98/1#AS3

  8. #8
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    If it isn't working for you with Flash 8, there is something else going on. There are definitely people successfully using clicktag with Flash 8.

  9. #9
    Junior Member
    Join Date
    Mar 2010
    Posts
    10

    Question

    Quote Originally Posted by Bob Hartzell View Post
    I suggest you attach the fun file so people can look at the action.
    Hi Bob

    I've attached the new .fun for for your perusal with the code from above, but it still won't go to the website (http://interestfree.com.au/en/index....002-GECL-00232)

    I've removed all other actions I had for urls, hope someone can help!

    Carl
    Attached Files Attached Files
    Last edited by misterkode; 03-23-2010 at 05:14 AM.

  10. #10
    Junior Member
    Join Date
    Mar 2010
    Posts
    10
    Thanks Bret

    I've bookmarked that link and will check out on Monday

    Carl

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center