A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: loadMovie question...

  1. #1
    Member
    Join Date
    Nov 2000
    Posts
    64

    loadMovie question...

    Can you define an object (jpg or swf for example) using variables within a loadMovie statement? Lets say I have jpgs called nav01.jpg, nav02.jpg...etc
    Is there a way to say nav + "varx" +.jpg ? So, if say varx = 53 then nav53.jpg would be loaded. ???

  2. #2
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    sure ////just use the variable name as the jpg parameter in the loadmovie make sure you enclose the jpeg or swf name in parenthisis cuz the loadmovie parameter requires a string for example ........myVar = "myJpeg.jpg";
    ~calmchess~

  3. #3
    Pumpkin Carving 2008 ImprisonedPride's Avatar
    Join Date
    Apr 2006
    Location
    Grand Rapids MI
    Posts
    2,377
    Yes there is. You just answered it but you wrote it backwards. Encase what you know is static in the name in quotes, and leave the variable without:

    Code:
    MovieClipLoader.loadMovie("image"+someNumber+".jpg", this);
    The 'Boose':
    ASUS Sabertooth P67 TUF
    Intel Core i7-2600K Quad-Core Sandy Bridge 3.4GHz Overclocked to 4.2GHz
    8GB G.Skill Ripjaws 1600 DDR3
    ASUS ENGTX550 TI DC/DI/1GD5 GeForce GTX 550 Ti (Fermi) 1GB 1GDDR5 (Overclocked to 1.1GHz)
    New addition: OCZ Vertex 240GB SATA III SSD
    WEI Score: 7.6

  4. #4
    Member
    Join Date
    Nov 2000
    Posts
    64
    Ok... I think I can apply this ...probably be back with some confusion but I have hope now.
    Thanks so much for the help!

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