A Flash Developer Resource Site

Results 1 to 14 of 14

Thread: New Plan

  1. #1
    Senior Member
    Join Date
    May 2010
    Posts
    178

    New Plan

    I want to develop a mobile application with flash lite. This application will base on music and video albums of online stores. I plan to make a view of cover page of albums with content inside. The thing I realize that it will be easy to the users if it have a horizontal or vertical scrolling lists of cover pages. There will be thousands and hundreds of albums to buy from, which also need a short list. So the users can place order through mail with all he/she shortlisted.

    How to manage such huge lists of albums?

    As I want this program to run in all type of flash lite mobile. I shall try from flash lite 1.1 player first.

    Can anyone give suggestions to this project, how to start and how to handle all the aspects needed for this program?

    Thank you in advance

    Poltuda
    Last edited by poltuda; 06-02-2010 at 07:31 PM.

  2. #2
    Senior Member
    Join Date
    May 2010
    Posts
    178
    Hello,

    Is there any suggestion from this forum for me?


    Poltuda

  3. #3
    Member
    Join Date
    Nov 2000
    Location
    South East UK
    Posts
    91
    I'd say this is best done using a server based XML sent to the handset app in manageable chunks, with a database backend.

    Sounds straightforward, but like most projects the reality is that its far from simplistic in terms of execution!

    I'd say your biggest problem here is the fact that you'll need to scrape the web and populate your own database in your designed structure using source websites. (Aggregation).

    Most industries and websites don't use a standard way of accessing data remotely - and lets be honest - why would they want to - as it deprives them of sales, advertising revenue etc - or you pay through the nose for licensed access - I've seen this in the past with Postcode data for Property websites/apps.

    So basically you have either the above approach or build a tool to spider the web, aggregating content from multiple sources - this needs some specialised webpage scraping tech, or each company needs a data API so you can only pull the bits you need - some might also use RSS feeds possibly.

    Good luck - nice idea, but in all honesty worth doing in "Full Flash" these days as Flash Lite's usefulness will be numbered after Android 2.2 OS comes out - more memory to play with etc, better framerates etc.

  4. #4
    Senior Member
    Join Date
    May 2010
    Posts
    178
    derekcfoley,

    Its really great to hear you with all your suggestions.

    New device must have more facility than what is in the market, but billions of active devices are still have a life of 3 yrs and more. Who will care where there is hardly matter to have all the facilities in your hand. You also have to look for the largest selling handset of your need. Thats why I am planing from 1x. As we all know developers still maintaining some old standard in website designing, whats ever you have better hardware in market. To develop apps for handset you have to do in all screen size and for all platforms.

    I got how to load pictures in flash lite 1.1 and that hardly a matter of some extra process. But the thing is that when a user shortlist his/her favorite albums and then want to look at it, then how will it work? mean how do I make it work in actionscript?

    Any technical suggestion will help me to move forward..........


    Poltuda
    Last edited by poltuda; 06-03-2010 at 03:51 PM.

  5. #5
    Member
    Join Date
    Nov 2000
    Location
    South East UK
    Posts
    91
    you need to store all the info for user settings on a webserver via a database, then as a user selects favourites, your Flash app would need to upload the settings using a POST command (like a HTML form), most probably using XML - then next time they run the app, it downloads the relevant settings (favourites etc) as an XML feed, based on the user's IMEI device ID.

    This could be done with PHP or .Net / Java etc on a relevant server - and of course you'd need a database like MySQL etc.

    Sounds like you need to try out plenty of XML tutorials (there are plenty on the web free as well as on Lynda.com) you'll also need either a local LAN webserver with MySQL and PHP (try easyPHP - nice package of both - (if testing on device with Wifi). If you want to test online, then you'll need a hosting account on the net for development testing via Wifi/GPRS/3G etc - again with a server technology and database of your choice.

    Hope that helps.

  6. #6
    Senior Member
    Join Date
    May 2010
    Posts
    178
    Will it be possible for large number of albums just in a small handset?

    What I am thinking is to make separate swf files for each albums with data content of that album which will be easy to add in shortlist.

    But how to manage if the list will for more than 100 or so.. Managing Memory there should be some limits to load and unload from server.

    The program must maintain tracks for previous lists that user browse.

    So what will be the steps further...


    Your posts helps me lot toward solutions.. Thank you


    Poltuda

  7. #7
    Senior Member
    Join Date
    May 2010
    Posts
    178
    Flash Lite not allowing multiple loadMovie() and loadVariables() funtion which will needed to form a album list menu.

    for(i=1;i<=4;i++){
    loadMovie("test" add i add ".swf", _level add i.i);
    }

    This code only loads the test0.swf and send an output:

    FTPS035: A Call to loadMovie(test1.swf) found, limitations might apply.
    FTPS035: A Call to loadMovie(test2.swf) found, limitations might apply.
    FTPS031: Too many instances of URL Request calls found, see device browser for maximum count allowed per frame
    FTPS035: A Call to loadMovie(test3.swf) found, limitations might apply.
    FTPS031: Too many instances of URL Request calls found, see device browser for maximum count allowed per frame
    Connected to file://C:\test\test1.swf.
    Loaded data from file://C:\test\test1.swf.
    Finished request for file://C:\test\test1.swf.

    What is the alternatives to solve this?

    Poltuda

  8. #8
    Member
    Join Date
    Nov 2000
    Location
    South East UK
    Posts
    91
    Hi Poltuda - hehe - This is one quirk of Flash Lite Development.

    You need to put your data requests on different frames, the compiler is trying to tell you this - "Too many instances of URL request calls found".

    Basically you need to let the timeline play a couple of frames before issuing the next one, thats what the message "maximum count allowed per frame" means)

    Remember Flash Lite is not full Flash on a PC, so you have to build an app almost like Pre-Flash 5 Actionscript, with code proceedurally spaced along the timeline and gotoAndStop / gotoAndPlay events on interactive elements that trigger your load events.

    The hard bit with loadMovie and loadVariables is detecting if they are finished loading. For that put a value on the end of the loadVariables text file e.g. configLoaded=yes, then put a test on a frame for its existence, otherwise loop back to an earlier frame so it keeps checking. Once the condition is met, proceed to the next point.

    Its cumbersome, but it doesn't overload Flash Lite, which is what happens when you use loops to trigger loading, so all the AS 2.0 putting code on frame 1 methodology isn't really suitable for Flash Lite. You can put all your functions on frame 1, and then call them with minimal function calls throughout the timeline when you need it for coding convenience.

    The reason for this is that Flash Lite is designed so it doesn't kill mobile CPUs in terms of processor usage, which a badly designed for/next loop can do even on a PC Flash app. This is why conventional approaches that you might use for Desktop PC based Flash apps aren't always the best way of working when approaching a Flash Lite project.

    When it comes to movieclips, you'll notice that Flash Lite 2.0 can't handle the loadClip command, which normally has a convenient listener in AS2, Which is the modern way of loading a movieclip, but this isn't supported in FL 2.1

    But don't worry - again there is a workaround - just put variable values inside external .swf files (on its timeline) - e.g. ready="yes" - thats the best way of detecting if a .swf is ready to go - fairly easy to do from the parent movie, again put in a condition to check, and loop if not to an earlier timeline frame.

    Remember also that loaded flash elements can stream, e.g a bigger loaded .swf will start playing from frame 1 before the whole of it has finished loading. So in the example above, you'd put the ready variable in with care. Just remember its very easy in Flash to build a proceedural app, only to get confused when it runs as to why its malfunctioning. The usual reason is that things being loaded "aren't ready" yet, e.g. fully loaded and available.

  9. #9
    Senior Member
    Join Date
    May 2010
    Posts
    178
    If Flash Lite act as you described, by putting loadMovie() in every frame, then how will it possible to make it dynamic when the list content maximum number of 5 and minimum on 1?

    To make my problem clear, suppose there are x number of swf cover page photos which will load into the main movie to form a display list. And the maximum display at a time will be 5, and also the x number will not divisible by maximum number which is 5 so the last list will be less than maximum number.

    How will it be manage by your way, please try to post a sample for me to understand Flash Lite 1.1 better.

    derekcfoley, your post is really helping me to move ahead for this project. Please do stay with your kind helps and thoughts.

    Thank you

    Poltuda

  10. #10
    Member
    Join Date
    Nov 2000
    Location
    South East UK
    Posts
    91
    hmmm... I see. I think what I'd do is first determine what the frame loading limit is.

    The key here is though to remember that Flash Lite needs your movie to change timeline movie frames for any of this to work. If you try and do the conventional Actionscript 2.0 and 3.0 approach of putting all your code on one frame, it won't work - which is the problem you're having.

    So you have 2 options,
    1) split the loading across different frames and put a condition on it, e.g. if items=4 then loadMovie etc. then call a generic loading function on a frame to load each one into each different object. If you only have 5 items, then thats not too much code.

    This then easily splits the loading across frames, although this would work, its not the most elegant of solutions.

    2) Another way is to use what I call in my development process a "widget". (although its a bad name, as most people think of it as a component - it sort of does that - its actually a movieclip). As a physical object on a layer - you can easily paste this repetitively onto frames where you need it - it can also work in harmony with any code on a frame. Its kind of a physical component with code inside.

    I often put a movieclip off the edge of the stage, with code inside that loops. This gets over problems of having onEnterFrame code all over your timeline.

    On the main timeline I define a limit, Inside the "widget" (movieclip), I then check for a limit of loops=x; When you hit the limit - you do something, e.g. call a function and or advance the playhead to another frame on the root timeline.

    E.g. inside it you might have something like this.....
    PHP Code:
    this.onEnterFrame=function(){
        
    _root.loops++;
        if (
    _root.loops==20){
             
    //call your loader function...
              
    _root.loader();
        }

    then on the main timeline, inside a loader() function, after you initiate your loader, move the timeline frame to another frame, and increment a variable counter to load the next item, so it repeats until hitting your item limit.

    Another approach is to use the getTimer function, (look it up in the Flash help) and use that timer instead to move the _root movie playhead to another frame, execute code, and so on when it hits a limit.

    The key to all this is app structure - Make your movie like this (square brackets indicate frames and frame labels)

    [start] [load] [check] [user input]... and so on

    your functions will then jump from frame to frame - remember to use gotoAndPlay and stop() commands on each frame's actions layer so that it does the relevant action combined with your functions which tell the timeline to advance etc.

    This sort of development is very similar to oldschool Flash 4 methodology - might be worth trying to dig out some old tutorials on the web explaining this - remember Flash Lite 2.1 likes rather than using current techniques. Ironically although Flash Lite 2.1 understands Actionscript 2.0 commands (well some of them) it means you still need to use the old timeline approach to app building due to the OS limitations to stop it killing the CPU. So the brute force ECMA script style object orientated approach has to be adapted somewhat to work in the Flash Lite environment.

    Re the help, no problem, You're welcome - there are precious few tutorials about Flash Lite on the net - few bother to explain the working process you have to use to deal with the differences with "Full Flash".

    Timeline playback is the key to success in Flash Lite!

    I had to discover most of this by trial and error over the last 3 years, and I wish someone could have helped me back then!
    Last edited by derekcfoley; 06-08-2010 at 04:00 PM.

  11. #11
    Member
    Join Date
    Nov 2000
    Location
    South East UK
    Posts
    91
    you can also put this on each frame as you need it, but using my approach, you can extend the layer's keyframe so the object runs across your whole timeline if required at each point.

    Hope that makes sense, its hard to explain!

  12. #12
    Senior Member
    Join Date
    May 2010
    Posts
    178

    Great Explanation

    Though you described for flash Lite 2.x and I am developing it is Flash Lite 1.1, but it’s just a difference of the syntax between the two versions of Flash Lite.

    As this has a limit of display size (Screen Size), so it will able to display 5 album at a time then when the user scroll down it will scroll up to display the next albums till it comes the nAlbums ( maximum number of albums).

    Technically, I am planning to load all the cover 1, 2, 3, 4…into albumsCoverList movieClips and move Y position of that movie clip to scroll up and down. Might this will work for scrolling list, and my plan is to load 10 albums in first load and then in the last album display or the when the user scroll the ninth album it will go to load the album from 10 to 20. What will be your suggestion?

    What you described is really hard to understand all at this moment, but it has definitely a sense. The “if loop” is working perfect to load a .swf which I tested to load 1 swf file with the code:

    Code:
    if (_level1._framesloaded >= _level1._totalframes) {
        tellTarget ("albumsCoverList") {
            gotoAndStop("myList");
        }
    } else {
        // loop...
    }
    But I am not sure what it actually doing. Is it really looping till it loads the total cover page album movie? Or it pass by without looping for the last frame?. This question arise because in each album cover page swf file I built, only have a single frame with a jpg embedded inside with some text info in it. So it is hard to realize for me what Flash actually does in this situation. On your suggestion the idea of widget is really great but the count of variable will depend on the frame rate and might pass the loop before it loads the total movie. However, if the _totalframes function will work properly, it will only go to load the next movie after the successful load of the previous movie. What you say? Is there any _totalBytes function in Flash Lite 1.1? I saw getBytesTotal() function in Flash Help, what similar code in Flash Lite 1.1?

    Frame by frame programming is not going for dynamic album list for me here, as per my planning. So, what alternatives you suggest?
    Will not frame by frame coding structure takes extra file size in mobile application? I might be wrong.

    URL:
    http://wiki.forum.nokia.com/index.ph..._in_Flash_Lite

    The example which I found is not exactly the same what I need but it’s very close what I am looking for my program. The visual is almost like this list but here saw it used array and instead of loading external swf file it attach movie clips from library. This will have limitations using attachMovie() function for my application. I tested it on emulator and also found some bugs when go back to the first menu list. In my case the number of albums will be huge. It must have to be shorted first by vocal/instrumental then by name or artist or the most rated albums. On iPod, I saw such things on music stores to play streaming music, and I feel it is also be interesting to make a music album stores on Flash Lite, from where users can play a demo version and user can order for the hard copy in CD’s.

    Many Thanks


    Poltuda
    Last edited by poltuda; 10-07-2010 at 02:24 PM.

  13. #13
    Senior Member
    Join Date
    May 2010
    Posts
    178
    The album list will look like the attachment.

    I am not a graphic guy. But this is what I made for this application. Please also suggest for a better visual.

    I think this visual will make more clear to give suggestions for this project.

    Thank you all of you for helps


    Poltuda
    Attached Images Attached Images
    Last edited by poltuda; 06-14-2010 at 06:35 AM.

  14. #14
    Senior Member
    Join Date
    May 2010
    Posts
    178

    Suggestion

    Your help needed.

    I am storing/saving the cover pages as .swf file for Flash Lite 1.1.

    Which will be the best place to store album information and contents? Is it inside of each .swf or in a database or in .txt file.

    What you suggest to do for this projects? Actually I need to know, by which process the application will run smoothly with a good memory control on every Flash Lite 1.1 handset.

    I feel that putting informations in every .swf file will be messy to edit afterward. But if I put outside of .swf, then how it combine with each albums.

    It also need to load the exact number of informations with album cover pages .swf so that the program will not over burden on handset memories.


    Poltuda

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