Skip to main content
Known Participant
September 22, 2019
Question

trouble pointing animate to class library

  • September 22, 2019
  • 12 replies
  • 1560 views

I am following a tutorial from a book. This time instaead of using flash builder the author is using Flash Pro. I use Animate so thought this would be easy book to follow

 

According to instructions i should point animate at a special class library called com/friendsofed/utils/:StatusBox

 

I know that the files are there and the folder structure is correct. 

I go to file actionscriptsettings and in the source path I navigate to the com folder.

When I compile I get the message: Library path (FlexSDK)/framework/libs/flex.swc does not reslve to a valid file.

 

Am I going wrong in my advanced actionscript settings, setting the source path wrong.

Any help is greatly appreciated. 

    This topic has been closed for replies.

    12 replies

    JoãoCésar17023019
    Community Expert
    Community Expert
    September 25, 2019

    Please make sure you have a folder called src where your FLA is located.

    Known Participant
    September 25, 2019

    Wow thought we had solved this. lol.

    I have the .fla inside the src folder.

    Known Participant
    September 25, 2019
    I cannot even get the hello world version going. I can only use the one you sent me. I am losing my mind here.
    JoãoCésar17023019
    Community Expert
    Community Expert
    September 25, 2019

    Excellent!

     

    Yeah... That text is very unnoticeable!

     

    You can also double-click that box. But I didn't apply any of these interactivities.

     

    But I'm glad that now you can continue following the book!

     

    Have a wonderful week!

     

     

    Regards,

    JC

    JoãoCésar17023019
    Community Expert
    Community Expert
    September 25, 2019

    By the author. I didn't generate that.

    Known Participant
    September 25, 2019

    Haha Its there. Hello World. Next to the red box. I can grab hold off the text and move the red box. Did you put this functionality in there :). Now I am happier.

    Anyway I think the text was there all the time Its just so small.

    I am unsure why the text is coming out so small but it looks like I will be able to work through the other examples in the book.

    So if I save that .fla file you sent  it should have the correct folder structure set up in the actionscript setting tab to deal with the other examples from the book. That is by putting the com folder in src folder for each example. I can live with that.

     

    Hopefully I can continue. Your help has been great. 

    Thank You 

     

     

    Known Participant
    September 25, 2019
    aah sorry. I try the next example with the same setup and now I get ./src/ does not resolve to a valid directory.
    JoãoCésar17023019
    Community Expert
    Community Expert
    September 25, 2019

    Hi again.

     

    Sorry. I didn't have the time to take a good look at that PDF.

     

    But, anyway, the hello world message is being show for me.

     

    And when I suggested to you to insert a text field I didn't me that you should insert your own text. I suggested this approach so you could embed a font via the IDE and not via code.

     

    I hope it makes sense.

    Known Participant
    September 25, 2019

    Hi your help is invaluable really. Sorry to bug you on this topic. So the Hello World image you sent there was created by the authors code not yours?

    JoãoCésar17023019
    Community Expert
    Community Expert
    September 24, 2019

    What I did in fact was to just reorganize the code structure. I just added that rectangle so you can see that it is working.

     

    About your text not showing up, as I said before, it has to do with font embedding.

     

    An easy way to see your text will be to comment out the following line in the StatusBox class:

    _textField.embedFonts = true;

     

    What I suggest to you is to create a text field in the IDE, then embed the fonts you need and then you can throw the text field away.

     

     

    Regards,

    JC

    Known Participant
    September 24, 2019

    Thanks JS you are very good help to me. 

    I commented out the line you said.

    I don't want to make my own text appear though. I want to see the text appear from the original code. Then I will be able to trust and go ahead with the rest of the examples in the book.

    Did you possibly take a peek at the pdf I uploaded? Can I be cheeky and ask you to look at it.  It says there exactly what I am trying to do. Its in the first few pages of the document in the section Introduction/Setting Up Your Work Environment. If you cannot replicate this workflow then I will have problems with my limited knowledge.

    As far as I can see Animate must point to the com folder but not in the projects src folder as this will mean copying the com folder into each and every examples src folder. Then when its pointed at the new classes folder Animate also needs to point to flexSDK. If im understanding this right.

    Thanks again for your interest.

    John

     

    Here is the link. I hope you dont mind taking a look for me. You have the HelloWorld folder.

     

    https://we.tl/t-bqhhtpcyEl

    JoãoCésar17023019
    Community Expert
    Community Expert
    September 24, 2019

    Hi.

     

    Yeah. I placed the code inside of the StatusBox class.

     

    If you want to use, for exemple, the VectorMath class, your import statement would be:

    import com.friendsofed.vector.VectorMath;

     

    Remeber to always start the import path from within the root folder.

     

     

    Regards,

    JC 

    Known Participant
    September 24, 2019

    JC I see what you are saying that you placed a cube in the StatusBox.as script. I see the cube but the statusbox script should show a HelloWorld message.

    I have uploaded the pdf I am working from. I am on page xxiii

     

    Here is the link. I hope you dont mind taking a look for me. You have the HelloWorld folder.

     

    https://we.tl/t-bqhhtpcyEl

     

    regards 

    John 

    JoãoCésar17023019
    Community Expert
    Community Expert
    September 23, 2019

    I added a red rectangle and a traced a message indicating that the main class started so you can the structure works.

     

    But if you're not seeing the text it was supposed to be displayed, then probably it has something to do with the way fonts are being embedded.

    Please review this and you should get what you want.

    Known Participant
    September 23, 2019

    So you placed the code for a red box in the StatusBox class in the com/friendsofed floder?

     

    I asked this because I need to access special classes from the com folder. If I am accessing the new classes inside that folder then I will know its all working.

     

    Thanks for helping me.

     

    JoãoCésar17023019
    Community Expert
    Community Expert
    September 23, 2019

    Thanks.

    Here is:
    http://bit.ly/2kTcUVb

     

    I changed the structure to a more common approach when using Animate.

    Please notice that you don't need to provide meta infos inside classes (for stage dimensions, framerate, and so on) because you're using an IDE so you can set this there.

    I hope this helps.

     


    Regards,
    JC

    Known Participant
    September 23, 2019

    Hi Thanks again. I'm not sure I understand what is going on here. according to the book I should get a swf with a message saying Hello World. 

     

    Perhaps there is a mistake in the book. Status box is drawing the red rectangle isnt it?

     

    JoãoCésar17023019
    Community Expert
    Community Expert
    September 23, 2019

    Yeah. There is.

     

    You can upload it to a file sharing service like Google Drive, Dropbox, OneDrive, or WeTransfer and then paste the link here.

    Or you can PM me if you prefer.

    Known Participant
    September 23, 2019

    Here is a WeTransfer link. I uploaded the project files and the com folder containing extra classes from source files from a book im working othrough. https://wetransfer.com/downloads/0d9f5b9c84042573e7577094c8a660b320190923175455/46344eea7daafce57519457a8266da8d20190923175455/1a3363

     

    I  almost finished his first book more or less. Foundation Games Design with actionscript3. For that book he was using Flash builder. I had no problems following with Animate. Now he is using Flash Pro in = Advanced Game Design with Flash book and so I thought this would be very starightforward to set up. The author is Rex van der Spuy. He is very good. 

    JoãoCésar17023019
    Community Expert
    Community Expert
    September 23, 2019

    Remove the second line.

    Known Participant
    September 23, 2019

    Thanks, i removed the second line. Now when I compile I get no errors but nothing is compiling

     

    I could zip the project up and  upload it if there is a way.