A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Input Value from another stage?

  1. #1
    Junior Member
    Join Date
    Mar 2013
    Posts
    2

    Question Input Value from another stage?

    Here are my 2 stages and how my FlashDevelop is looking currently ( swf's and .fla )
    http://imgur.com/tfW8FDn,Y9GcQ70,4brzb0W

    Making a game, just started with flash today.

    What I want is the following:
    Put in Name at Input Text in StartScreen.fla
    Press Submit
    Get Name at Dynamic Text in MainScreen.fla

    I really have no clue how to do this, I guesse it's by using FlashDevelop?
    Did I do anything wrong?

    Also what does AddChild and Spirit do exactly? Can't find an answer...

  2. #2
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    .fla files are just Flash Professional files for creating your app. The .swf files that those generate are the ones that actually get loaded in to html and run.
    Getting a value from one to the other depends on how you're using them. If they were in separate pages of .html for instance, then you would need to store the values on the users computer via SharedObjects and then retrieve it on the next page. If you're loading a child swf into a parent swf, you can just look up a variable or a property. You'll need to read up on variable scope, specifically how it applies to loaded swfs to understand how that works. It's all just thinking about hierarchy like a staircase and walking up and down the stairs to gain access to different things. Sometimes you walk up one staircase and down another.

    FlashDevelop is AWESOME but you might want to just stick with publishing out of Flash Professional until you understand the process a little better.

    addChild() is a method provided to any flash entity that is capable of placing a graphical element (display object) on the screen (stage). Sprites (not spirit) are the most bare bones type of these entities. Basically, if it doesn't need frames of animation (timelines), then use a Sprite.

  3. #3
    Junior Member
    Join Date
    Mar 2013
    Posts
    2
    Quote Originally Posted by jAQUAN View Post
    .fla files are just Flash Professional files for creating your app. The .swf files that those generate are the ones that actually get loaded in to html and run.
    Getting a value from one to the other depends on how you're using them. If they were in separate pages of .html for instance, then you would need to store the values on the users computer via SharedObjects and then retrieve it on the next page. If you're loading a child swf into a parent swf, you can just look up a variable or a property. You'll need to read up on variable scope, specifically how it applies to loaded swfs to understand how that works. It's all just thinking about hierarchy like a staircase and walking up and down the stairs to gain access to different things. Sometimes you walk up one staircase and down another.

    FlashDevelop is AWESOME but you might want to just stick with publishing out of Flash Professional until you understand the process a little better.

    addChild() is a method provided to any flash entity that is capable of placing a graphical element (display object) on the screen (stage). Sprites (not spirit) are the most bare bones type of these entities. Basically, if it doesn't need frames of animation (timelines), then use a Sprite.
    Thanks!

    I will only have a preloader with the StartScreen and MainScreen so what do you suggest on how I should approach this? ( You enter name and other things in startscreen and they show up at the mainscreen )

    Learned alot these 2 days and theres still so much to learn haha

    I just read up on the variable scope but don't understand it 100% yet Is it possible in flash to do what I want with 2 the different swf's in the images or do i HAVE TO use flashdevelop?
    I know how to get the global var strName from GetName.text using trace if I'm correct? ( haven't tested it yet ) But after that I have no idea how to put it in my dynamic myName.text which is in the Mainscreen.swf not the Startscreen.swf.

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