A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Using Flash CS3 MovieClips classes in Flex Builder

Threaded View

  1. #1
    Developer
    Join Date
    Apr 2007
    Location
    UK
    Posts
    324

    Using Flash CS3 MovieClips classes in Flex Builder

    Hi,

    after seeing a tutorial on the gotoAndLearn website for using Flex Builder to code projects (the editor of which is vastly superior to Flash's) I've tried to migrate one of my projects to a Flex ActionScript project. However I've run into a problem.

    I have a MovieClip in my FLA which has a graphic and a button component. The button is called btn.
    I've linked that MovieClip to a class called 'tester'.
    In that class I use this simple code :
    Code:
    btn.label = "yay";
    Im able to compile into a SWF easily from Flash (and the button's label changes as expected).
    However when I move the project to Flex, Flex tells me in the tester class that 'btn' does not exist (which is understandable).
    However I CAN use code like this in my main class:
    Code:
    var t = new tester();
    t.btn.label = "yay"
    and that compiles fine (by the way, I've created an SWC that contains my tester MovieClip which I've told Flex to link to).

    Is there any way to get around this?
    I've tried creating a property called 'btn' in the tester class but this creates an error when I try and compile in CS3.

    Can anyone help?
    Last edited by Cortana; 01-23-2008 at 07:29 AM.
    now known as dVyper

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