Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5947045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:54:32+00:00 2026-05-22T16:54:32+00:00

<?php $someVar = count(scandir(bilder/) – 2); ?> I need to import $someVar in to

  • 0
<?php
    $someVar = count(scandir("bilder/") - 2);
?>

I need to import $someVar in to my .fla-file, I only need its value.:

var timer:Timer = new Timer(1000);
timer.addEventListener(TimerEvent.TIMER, nextSlide2);
timer.start();

var ld:Loader = new Loader();
var bildeArr = [];

var backend: String = 'backend.php';
var loader: URLLoader = new URLLoader;

loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.load( new URLRequest(backend));

trace(loader.data);



ld.x = 20;
ld.y = 20;
for(var i:int = 1; i<9; i++) {
    bildeArr.push("bilde" + String(i));
}

i = 0;
function nextSlide2(evt:TimerEvent):void {
    trace(i);
    ld.load(new URLRequest("bilder/" + bildeArr[i] + ".png"));
    addChild(ld);
    if(i > 6) {
        i = -1;
    } 
    i++;
}

How?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:54:33+00:00Added an answer on May 22, 2026 at 4:54 pm

    You need to add a listener to the loader. It will call a function when the data has loaded.

    the important thing to know is that loading data from a server is asynchronous. It does not happen immediately, and flash does not stop running while it is waiting to get the next data. So you need to make sure you do not call any code that requires the data before the data is loaded.
    This code will continue to call the loop at the bottom before the data has loaded. If you want to use the data in your loop, you will need to move that code into a function and call that function from the onDataReady function.

    var timer:Timer = new Timer(1000);
    timer.addEventListener(TimerEvent.TIMER, nextSlide2);
    timer.start();
    
    var ld:Loader = new Loader();
    var bildeArr = [];
    
    var backend: String = 'backend.php';
    var loader: URLLoader = new URLLoader;
    
    loader.dataFormat = URLLoaderDataFormat.VARIABLES;
    loader.addEventListener(Event.Complete, onDataReady)
    loader.load( new URLRequest(backend));
    
    // Asynchronous call - will be called when the data is loaded.
    function onDataReady(e:Event):void {
        trace(loader.data);
        // Once loaded call another functon to use your data.
    }
    
    
    
    ld.x = 20;
    ld.y = 20;
    for(var i:int = 1; i<9; i++) {
        bildeArr.push("bilde" + String(i));
    }
    
    i = 0;
    function nextSlide2(evt:TimerEvent):void {
        trace(i);
        ld.load(new URLRequest("bilder/" + bildeArr[i] + ".png"));
        addChild(ld);
        if(i > 6) {
            i = -1;
        } 
        i++;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

PHP stores its session information on the file system of the host of the
PHP, for all its warts, is pretty good on this count. There's no difference
PHP Fatal error: Default value for parameters with a class type hint can only
PHP (among others) will execute the deepest function first, working its way out. For
----- PHP and mySQL ----- I have two quick questions need some advice. On
php.ini [mail function] ; For Win32 only. ; http://php.net/smtp SMTP = ssl://smtp.gmail.com ; http://php.net/smtp-port
php isn't really my thing but I would need to get the votes and
PHP's array_search() does this: Searches the array for a given value and returns the
PHP Image resize returns only black background. I read all similar posts here, but
PHP has a great function called htmlspecialcharacters() where you pass it a string and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.